Add reroutes table and Implementation#current_map with report rows #871
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#871
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-0258 decision 5 keeps the default map frozen and records each map change as a
reroutesrow. Noreroutestable exists, and every consumer readsimplementation.map(the default):Routing(command/implementation/routing.rb:10),TransitWalk(transit_walk.rb:7),Landing(landing.rb:49),NextStep#map(pipeline/next_step.rb:70),StartSubagent#map(command/start_subagent.rb:32),CompletionIntake#map(command/completion_intake.rb:64),ObjectionsDigest(query/brief/objections_digest.rb:29), andImplementation#current_node/#dispatch_cap(model/implementation.rb:64-65). The implementation report (os-sdlc-implementation-report) shows no map history.Reproduce
n/a: design change, nothing to reproduce.
Approach
Add the
reroutestable inDb.create_ledger_tables(adapter/db.rb), modeled onobjections, and bumpSCHEMA_VERSION(ADR-0129/0155):Add the Sequel model
OsSdlc::Reroute < Sequel::ModelandImplementation one_to_many :reroutes, order: [Sequel.desc(:created_at), Sequel.desc(:id)](ADR-0259 decision 6; the id breaks same-second ties).Implementation#current_maploadsreroutes.first&.mapthroughMap::Catalog.defaultwhen a row exists, else returnsmap.mapstays the default and is never mutated (ADR-0169). Do not memoizecurrent_mapacross a new row (theassociations[:map]memo in targeting.rb:6 must not serve it). Switch every consumer listed in Problem tocurrent_map.dispatch_capreadscurrent_map.dispatch_cap;DispatchBudgetalready counts all dispatches of the implementation (ADR-0152, decision 8).Implementation::Summary#to_haddsreroutes:, oldest first, each{ map:, node:, by:, situation:, misfit:, draft: }wherebyis"orchestrator"whendispatch_idis nil, else"<agent_type> (dispatch N)".This ticket writes no reroute rows in production code; the reroute gate ticket does. The
draftcolumn exists now; slice 4 resolves drafts.Required work:
create_table_with_timestamps(db, :reroutes)inplugins/os-sdlc/lib/os_sdlc/adapter/db.rbcurrent_map— check: presentdef current_mapinplugins/os-sdlc/lib/os_sdlc/model/**/*.rbclass Reroute < Sequel::Modelinplugins/os-sdlc/lib/os_sdlc/**/*.rbcurrent_mapinplugins/os-sdlc/lib/os_sdlc/command/implementation/routing.rbreroutes:inplugins/os-sdlc/lib/os_sdlc/presenter/implementation/summary.rbAcceptance criteria
dispatch_cap, when routing checks the budget, then it uses the new map's cap and counts dispatches made under both maps.created_at, when the current map is read, then it is the map of the row with the higher id.os-sdlc-implementation-reportruns, then the output lists both rows oldest first withby: orchestratorandby: change-auditor (dispatch 7).Owner sketch
Non-goals
Edge-spend bounds stay keyed by
(from_node, verdict)(model/edge_spend.rb). A new map with the same node names shares those counters; this ticket does not change that.Origin
Implementation#mapis the only map source ← DESIGN (docs/adr/0169, docs/adr/0258 decision 5)Parent: #859
Blocked by: #868
jared referenced this issue2026-10-01 14:26:17 +00:00
Work started on branch ticket-871 (os-sdlc pipeline, map poodr-ticket-implementation).
Resolution
Done: reroutes table + Reroute model; Implementation#current_map owns the map choice and every listed consumer reads it; the implementation report/summary shows reroute rows; SCHEMA_VERSION bumped. Deviation: the Runner commit left plugins/os-sdlc/lib/os_sdlc/model/dispatch.rb (Dispatch has many reroutes) in dirty_paths because no agent listed it; committed by hand as
f28dff08(the suite had run with it).Evidence: main
91f8a7e6(Runner commit, implementation 3 implementation_complete, 13 dispatches, 1 retry),f28dff08, History row; required-work gate passed in suite-check; bin/test on main: 9 suites passed.Follow-ups: none