Skip to content

Phase 12: Server Specs as .t27 (session, project, provider, routes)#148

Merged
gHashTag merged 4 commits into
masterfrom
feat/server-specs-phase12
Apr 6, 2026
Merged

Phase 12: Server Specs as .t27 (session, project, provider, routes)#148
gHashTag merged 4 commits into
masterfrom
feat/server-specs-phase12

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

@gHashTag gHashTag commented Apr 6, 2026

Summary

  • Add 5 new .t27 specs for OpenCode server: session, project, provider, routes, agent-runner
  • Fix bootstrap parser to handle module body syntax and type refs with array literals
  • All specs parse successfully (113 total declarations)

Changes

  • specs/server/session.t27 - Session management (28 decls)
  • specs/server/project.t27 - Project management (22 decls)
  • specs/server/provider.t27 - LLM provider config (24 decls)
  • specs/server/routes.t27 - HTTP routes (5 decls)
  • specs/server/agent-runner.t27 - Agent Runner (34 decls)
  • bootstrap/parse_t27.py - Parser fixes for module bodies, enums, consts, type refs

Constitutional Laws

Closes #147

gHashTag added 3 commits April 6, 2026 18:35
…routes)

- Fix bootstrap parser for module body syntax (module Foo { ... })
- Fix enum parsing to support optional backing type
- Fix const parsing to stop at declaration keywords
- Fix type_ref parsing to handle array literals [N]
- Add specs/server/session.t27 (28 decls) - Session management
- Add specs/server/project.t27 (22 decls) - Project management
- Add specs/server/provider.t27 (24 decls) - LLM provider config
- Add specs/server/routes.t27 (5 decls) - HTTP routes

Constitutional Law #4: De-Zig-fication - .t27 is source of truth
Constitutional Law #5: De-Zig Strict - no new Rust business logic
- Add specs/server/agent-runner.t27 with AgentReport, ToolResult, AgentState
- Include StopReason enum and turn management functions
- Add 8 tests and 2 invariants for validation
- 34 total declarations

Constitutional Law #4: De-Zig-fication - .t27 is source of truth
Constitutional Law #5: De-Zig Strict - no new Rust business logic
- Add specs/server/agent-runner.t27 (34 decls) with AgentReport, AgentState, ToolResult
- Fix Rust compiler: const decl parsing stops at module body boundaries
- Fix Python bootstrap: require semicolons for module body consts
- All 5 server specs now parse successfully

Constitutional Law #4: De-Zig-fication - .t27 is source of truth
Constitutional Law #5: De-Zig Strict - no new Rust business logic
@gHashTag gHashTag force-pushed the feat/server-specs-phase12 branch from 655a10f to 3cdf64a Compare April 6, 2026 11:35
- Add specs/server/api.t27 with Message, ContentBlock, ApiResponse types
- Fix routes.t27: add semicolon to module-level const
- All 6 server specs now parse successfully
@gHashTag gHashTag merged commit 4d8fcc8 into master Apr 6, 2026
2 of 3 checks passed
gHashTag pushed a commit that referenced this pull request May 15, 2026
…EC_EXIT 0xE7→0xEB

Resolves hard opcode collisions on master:
- OP_NULL_PE@0xE6 collided with OP_HOLO_MUX_X4@0xE6 (W39)
- OP_SPEC_EXIT@0xE7 collided with OP_DFS_GATE@0xE7 (W40)

Canonical rectification aligned with W41 FRR ledger:
  0xE6 OP_HOLO_MUX_X4 (W39 H) — KEEP
  0xE7 OP_DFS_GATE    (W40)   — KEEP
  0xEA OP_NULL_PE     (W38)   — RELOCATE from 0xE6
  0xEB OP_SPEC_EXIT   (W39 E) — RELOCATE from 0xE7

Companion lanes:
  Q2 RTL    → trinity-fpga rtl/nullor/, rtl/spec_exit/
  Q3 Rust   → tt-trinity-max-true witnesses
  Q4 JSON   → trios assertions/nullor_witness.json, spec_exit_witness.json

Constitutional: R1 RUST/ZIG, R5 HONEST, R7 falsification, R15 SACRED-SYNTH-GATE, R18 LAYER-FROZEN preserved.
Anchor: φ² + φ⁻² = 3 · γ = φ⁻³ · C = φ⁻¹ · G = π³γ²/φ · DOI 10.5281/zenodo.19227877

Closes #148

Signed-off-by: Vasilev Dmitrii <admin@t27.ai>
gHashTag pushed a commit that referenced this pull request May 15, 2026
…EC_EXIT 0xE7→0xEB

Resolves hard opcode collisions on master:
- OP_NULL_PE@0xE6 collided with OP_HOLO_MUX_X4@0xE6 (W39)
- OP_SPEC_EXIT@0xE7 collided with OP_DFS_GATE@0xE7 (W40)

Canonical rectification aligned with W41 FRR ledger:
  0xE6 OP_HOLO_MUX_X4 (W39 H) — KEEP
  0xE7 OP_DFS_GATE    (W40)   — KEEP
  0xEA OP_NULL_PE     (W38)   — RELOCATE from 0xE6
  0xEB OP_SPEC_EXIT   (W39 E) — RELOCATE from 0xE7

Companion lanes:
  Q2 RTL    → trinity-fpga rtl/nullor/, rtl/spec_exit/
  Q3 Rust   → tt-trinity-max-true witnesses
  Q4 JSON   → trios assertions/nullor_witness.json, spec_exit_witness.json

Constitutional: R1 RUST/ZIG, R5 HONEST, R7 falsification, R15 SACRED-SYNTH-GATE, R18 LAYER-FROZEN preserved.
Anchor: φ² + φ⁻² = 3 · γ = φ⁻³ · C = φ⁻¹ · G = π³γ²/φ · DOI 10.5281/zenodo.19227877

Closes #148

Signed-off-by: Vasilev Dmitrii <admin@t27.ai>
gHashTag added a commit that referenced this pull request May 15, 2026
…EC_EXIT 0xE7→0xEB (#671)

Resolves hard opcode collisions on master:
- OP_NULL_PE@0xE6 collided with OP_HOLO_MUX_X4@0xE6 (W39)
- OP_SPEC_EXIT@0xE7 collided with OP_DFS_GATE@0xE7 (W40)

Canonical rectification aligned with W41 FRR ledger:
  0xE6 OP_HOLO_MUX_X4 (W39 H) — KEEP
  0xE7 OP_DFS_GATE    (W40)   — KEEP
  0xEA OP_NULL_PE     (W38)   — RELOCATE from 0xE6
  0xEB OP_SPEC_EXIT   (W39 E) — RELOCATE from 0xE7

Companion lanes:
  Q2 RTL    → trinity-fpga rtl/nullor/, rtl/spec_exit/
  Q3 Rust   → tt-trinity-max-true witnesses
  Q4 JSON   → trios assertions/nullor_witness.json, spec_exit_witness.json

Constitutional: R1 RUST/ZIG, R5 HONEST, R7 falsification, R15 SACRED-SYNTH-GATE, R18 LAYER-FROZEN preserved.
Anchor: φ² + φ⁻² = 3 · γ = φ⁻³ · C = φ⁻¹ · G = π³γ²/φ · DOI 10.5281/zenodo.19227877

Closes #148

Signed-off-by: Vasilev Dmitrii <admin@t27.ai>
Co-authored-by: Vasilev Dmitrii <admin@t27.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 12: HTTP Server as .t27 Spec

1 participant