Build #438 slice 4: next routes the map (tracer bullet) #443
Labels
No labels
P0
P1
P2
P3
bug
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#443
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Blocked by
Origin
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.
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.