Add os-sdlc-reroute-request to move a waiting run to map-router #886
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
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
rule-proposal
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.
Blocks
Depends on
Reference
jared/cc-os#886
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?
Problem
ADR-0259 decisions 8 and 10 let the orchestrator move a waiting run to map-router:
os-sdlc-reroute-request IMPL --situation .. --misfit ..writes a handoff that targets map-router and takes the waiting node'srerouteexit. No such CLI exists.Verdict::ALL(model/verdict.rb:9) has noreroute.HandoffContent::VALID_VERDICTS(parser/handoff_content.rb) ispass fail errorand does not requiresituationormisfit.Implementation::Transition#call(command/implementation/transition.rb) needs a dispatch, and the orchestrator request has none.Reproduce
n/a: design change, nothing to reproduce.
Approach
REROUTE = "reroute"toVerdict::ALLwithreroute?.HandoffContent: accept verdictreroute; when the verdict isreroute, requiresituationandmisfit(Malformedcodes:situation,:misfit). Slice 3 reuses this contract for the change-auditor.bin/os-sdlc-reroute-request IMPLEMENTATION_ID --situation TEXT --misfit TEXT, Boot commandreroute-request, same shape asbin/os-sdlc-required-work-check. Both flags are required.dispatch_cap:<cap>, when the dispatch budget is spent:Routing#spentwould routeescalate, and the waiting node has no escalate edge. ADR-0152 counts all dispatches of the implementation.HandoffContent.parse!:implementation.add_handoff(created_by: nil, target_agent_type: "map-router", content:)with contentsummary,verdict: reroute,situation,misfit.created_bynil marks the orchestrator.rerouteedge throughImplementation::Transition(ADR-0168; ADR-0259 corrections). Transition accepts a request with no dispatch: it skips the AlreadyRouted check,mark_routed!, and the handoff target stamp. The run is then positioned at map-router.Brief#handoff_json.Required work:
REROUTE = "reroute"inplugins/os-sdlc/lib/os_sdlc/model/verdict.rbmisfitinplugins/os-sdlc/lib/os_sdlc/parser/handoff_content.rbreroute-requestinplugins/os-sdlc/bin/os-sdlc-reroute-requestAcceptance criteria
os-sdlc-reroute-requestruns with a situation and a misfit, then the run is positioned at map-router, a handoff targeted at map-router with no creator holds the situation and misfit, and the output is a dispatch payload for agentmap-router.os-sdlc-reroute-requestruns, then it refuses, names the position, and writes no handoff.os-sdlc-reroute-requestruns without--misfit, then it refuses and names the missing flag.rerouteand nosituation, when it is parsed, then it fails withsituation.os-sdlc-reroute-requestruns, then it refuses, namesdispatch_cap, and writes no handoff.Owner sketch
Origin
Parent: #859
Blocked by: #885
Work started on branch ticket-886 (os-sdlc pipeline, map poodr-ticket-implementation).
Resolution
Done: os-sdlc-reroute-request moves a run waiting at needs-orchestrator to the map-router node; it refuses with a reason when the run is not waiting or the dispatch cap is spent; HandoffContent and Verdict accept reroute. Deviation: the Runner commit left the refactorer's nested Implementation::RerouteRequest, its Refused value, routing.rb and dispatch_budget.rb in dirty_paths; committed by hand as
6f02d0b2(the suite had run with them).Evidence: main
4dd5a54a(Runner commit, implementation 2 implementation_complete, 14 dispatches, 2 retries),6f02d0b2,3b74a794History row; bin/test on main: 9 suites passed; the reroute command is in the refreshed plugin cache.Follow-ups: none