Build #438 slice 4: next routes the map (tracer bullet) #443

Closed
opened 2026-08-20 14:31:45 +00:00 by jared · 2 comments
Owner

Parent

#438 (map-driven os-sdlc runner build spec). Design: docs/os-sdlc-rebuild/map-runner-design.md. Settled decisions + guard-manifest process: docs/os-sdlc-rebuild/interface-sketches.md.

Pre-build gate

First step before any code: run the seam-design pass per docs/os-sdlc-rebuild/seam-design-prompt.md to produce this slice's interface sketch. The sketch is the guard manifest: any class, public method, or signature change beyond it → stop, comment on this ticket, do not write it.

What to build

The E2 entrypoint routes: on a pass verdict it advances position along the map's pass edge, stamps target_agent_type on the pending handoff from the map edge, and returns the next node's instructions; on reaching a terminal it returns the implementation_complete payload. This is the tracer bullet: the toy map runs end-to-end (open → dispatch → handoff → verdict → route → terminal). An APPROVED guard manifest already exists in docs/os-sdlc-rebuild/interface-sketches.md — the pre-build gate here is re-validating it against the built slices 1-3 and surfacing deltas as ticket comments, not redoing the pass. Router is pure (Decision out, no writes — D4); NextStep (renamed from InstructionQuery) applies the Decision; next answers await_completion while a dispatch is pending (the PostToolUse hook pings at dispatch time); repeated next calls are idempotent, keyed on the dispatch's routed_at stamp; delete state_machine.rb and its test (D5).

Acceptance criteria

  • Toy map end-to-end: entry pass verdict yields terminal implementation_complete payload
  • Pending handoff's target_agent_type stamped from the map edge during routing
  • next while a dispatch is pending returns the await answer and changes nothing
  • Repeated next calls return identical JSON and create zero rows
  • state_machine.rb and its test are deleted
  • Undeclared verdict edge raises a loud named error (exit 3)

Blocked by

Origin

  • Trigger: /to-tickets decomposition of #438 (2026-08-20, user-directed)
  • Improvised this session: none
  • Chain: DESIGN (docs/os-sdlc-rebuild/map-runner-design.md, docs/os-sdlc-rebuild/interface-sketches.md, ADR-0133/0134/0135)
  • Root candidate: #438
## Parent #438 (map-driven os-sdlc runner build spec). Design: docs/os-sdlc-rebuild/map-runner-design.md. Settled decisions + guard-manifest process: docs/os-sdlc-rebuild/interface-sketches.md. ## Pre-build gate First step before any code: run the seam-design pass per docs/os-sdlc-rebuild/seam-design-prompt.md to produce this slice's interface sketch. The sketch is the guard manifest: any class, public method, or signature change beyond it → stop, comment on this ticket, do not write it. ## What to build The E2 entrypoint routes: on a pass verdict it advances position along the map's pass edge, stamps target_agent_type on the pending handoff from the map edge, and returns the next node's instructions; on reaching a terminal it returns the implementation_complete payload. This is the tracer bullet: the toy map runs end-to-end (open → dispatch → handoff → verdict → route → terminal). An APPROVED guard manifest already exists in docs/os-sdlc-rebuild/interface-sketches.md — the pre-build gate here is re-validating it against the built slices 1-3 and surfacing deltas as ticket comments, not redoing the pass. Router is pure (Decision out, no writes — D4); NextStep (renamed from InstructionQuery) applies the Decision; next answers await_completion while a dispatch is pending (the PostToolUse hook pings at dispatch time); repeated next calls are idempotent, keyed on the dispatch's routed_at stamp; delete state_machine.rb and its test (D5). ## Acceptance criteria - [ ] Toy map end-to-end: entry pass verdict yields terminal implementation_complete payload - [ ] Pending handoff's target_agent_type stamped from the map edge during routing - [ ] next while a dispatch is pending returns the await answer and changes nothing - [ ] Repeated next calls return identical JSON and create zero rows - [ ] state_machine.rb and its test are deleted - [ ] Undeclared verdict edge raises a loud named error (exit 3) ## Blocked by - #442 ## Origin - Trigger: /to-tickets decomposition of #438 (2026-08-20, user-directed) - Improvised this session: none - Chain: DESIGN (docs/os-sdlc-rebuild/map-runner-design.md, docs/os-sdlc-rebuild/interface-sketches.md, ADR-0133/0134/0135) - Root candidate: #438
Author
Owner

Work started: building slice 4 (tracer bullet) via the TDD loop on branch build/438-slice-4. Pre-flight sketch revalidated against slices 0-3 as shipped; user approved D21-B (NextStep.call(root, session_id)), D22-B (E3 stdout type completion_recorded, ternary verdict), D23-A (toy.yaml extended to a two-agent-node walk). Schema 9 adds dispatches.routed_at; state_machine.rb and instruction_query.rb deleted per D5/ADR-0134.

Work started: building slice 4 (tracer bullet) via the TDD loop on branch build/438-slice-4. Pre-flight sketch revalidated against slices 0-3 as shipped; user approved D21-B (NextStep.call(root, session_id)), D22-B (E3 stdout type completion_recorded, ternary verdict), D23-A (toy.yaml extended to a two-agent-node walk). Schema 9 adds dispatches.routed_at; state_machine.rb and instruction_query.rb deleted per D5/ADR-0134.
Author
Owner

Resolution

Done: Slice 4 (tracer bullet) built TDD-first on build/438-slice-4, merged to main at 192b58c. E2 next now routes: pure Router (D4) decides the next node from map edges, NextStep (D21-B: call(root, session_id)) applies decisions idempotently keyed on dispatches.routed_at (schema 9), stamps the pending handoff's target_agent_type from the map edge, and moves terminal authority out of E3 (ADR-0134; E3 stdout type is now completion_recorded per D22-B with ternary verdict). toy.yaml extended to a two-agent-node walk (D23-A); state_machine.rb and instruction_query.rb deleted with their tests (D5). Full tracer test walks dispatch -> completion -> route -> dispatch -> terminal on the canonical map.

Evidence: ruby -Ilib tests/all.rb: 828 runs, 2125 assertions, 0 failures (verified by orchestrator; count math exact: 833 - 14 deleted + 9 added). rubocop zero offenses on all touched files, no disables. Idempotence, zero-rows, and abandoned-round regressions retained in the rewritten cli_next_instruction_test.rb.

Follow-ups: NextStep behavior on a routing-only node (agent: null) is undefined by any sketch — owned by the slice-5 seam pass (existing ticket #444). implementation_failed terminal and Implementation.fail!'s new home are likewise unowned; also flagged to the slice-5 seam pass. No new tickets filed; both noted for the #444 pre-build gate.

## Resolution **Done:** Slice 4 (tracer bullet) built TDD-first on build/438-slice-4, merged to main at 192b58c. E2 next now routes: pure Router (D4) decides the next node from map edges, NextStep (D21-B: call(root, session_id)) applies decisions idempotently keyed on dispatches.routed_at (schema 9), stamps the pending handoff's target_agent_type from the map edge, and moves terminal authority out of E3 (ADR-0134; E3 stdout type is now completion_recorded per D22-B with ternary verdict). toy.yaml extended to a two-agent-node walk (D23-A); state_machine.rb and instruction_query.rb deleted with their tests (D5). Full tracer test walks dispatch -> completion -> route -> dispatch -> terminal on the canonical map. **Evidence:** ruby -Ilib tests/all.rb: 828 runs, 2125 assertions, 0 failures (verified by orchestrator; count math exact: 833 - 14 deleted + 9 added). rubocop zero offenses on all touched files, no disables. Idempotence, zero-rows, and abandoned-round regressions retained in the rewritten cli_next_instruction_test.rb. **Follow-ups:** NextStep behavior on a routing-only node (agent: null) is undefined by any sketch — owned by the slice-5 seam pass (existing ticket #444). implementation_failed terminal and Implementation.fail!'s new home are likewise unowned; also flagged to the slice-5 seam pass. No new tickets filed; both noted for the #444 pre-build gate.
jared closed this issue 2026-08-20 21:03:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#443
No description provided.