decision-system S11: route comparison report #1253
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.
Dependencies
No dependencies set
Reference
jared/cc-os#1253
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
RouteSelectorruns in shadow mode (S5). Each judgment row of a fast-batch or crc-refactor run writes one line toSTORE/moments/route-log.jsonl(row_id flow tier shadow_route source level recorded_at). No command reads that file. Nobody can see where the decided tier rule (plugins/os-sdlc/references/decision-tiers.md) andRouteSelectordisagree, what happened to those rows, or what each rule would cost in Jared-minutes. Item O-4 (docs/decision-system/decisions-register.md) needs this report before anyone proposes a change to the tier rule.Approach
Add
OsMe::RouteComparisonand the commandos-me-eval route-comparison [--outcomes FILE](Thor, inOsMe::CLI, with the--storeclass option).mechanicalandlow-stakestodecide_aloneandjudgmenttopredict(decision-tiers.md: judgment rows are predicted at the final round; flows never ask). An unknown tier raisesOsMe::Error.shadow_route.CostModelandCalibrationPrior, the same formulaRouteSelectoruses (levers.md; learning-loops.md metric "Total expected Jared-minutes on replayed rows"). The tier rule total sums the tier route of every row; theRouteSelectortotal sums the logged shadow route of every row. Ping cost stays 10 minutes, marked as a guess (O-6 AFK default).session:a, route row ids areb1/F3, and the route log has no session). So outcomes come from an optional JSONL file, one{"row_id": ..., "outcome": ...}per line, with the glossary vocabularyaccept,modify,override,none. A row with no line showsnone. An unknown outcome raisesOsMe::Error.Output shape (exact):
Minutes print with one decimal.
Required work:
OsMe::RouteComparisonwithrender, built from the route log entries, the outcomes, and aRouteSelector— check: presentclass RouteComparisoninplugins/os-me/lib/os_me/route_comparison.rbRouteSelector#routes(wrong_cost, source)public, returning all threeRoutevalues;choosereturns the cheapest of them — check: presentdef routes(inplugins/os-me/lib/os_me/route_selector.rbRouteSelector.standard;RowRouter.builduses it — check: absentCostModel.newinplugins/os-me/lib/os_me/row_router.rbRouteLogthe Store path (RouteLog.in_store(store_path)) and a readerentriesthat raisesOsMe::Errornaming the path when the file is absent;RowRouter.buildusesin_store— check: absentroute-log.jsonlinplugins/os-me/lib/os_me/row_router.rbroute-comparisoncommand toOsMe::CLIwith an--outcomesoption — check: presentdef route_comparisoninplugins/os-me/lib/os_me/cli.rbAcceptance criteria
Fixture for criteria 1 to 4 and 7: a Store whose
moments/route-log.jsonlholds three rows:b1/F3(fast-batch, judgment, shadowpredict, facts, medium),b1/F7(fast-batch, judgment, shadowdefer, taste, high),b1/F9(fast-batch, low-stakes, shadowdecide_alone, rule, low).os-me-eval route-comparison --store DIRruns, then stdout starts withRoute comparison: 3 rows, disagreements: 1, holds the line| b1/F7 | fast-batch | predict | defer | none |, holds no table line forb1/F3orb1/F9, and the exit status is 0.{"row_id":"b1/F7","outcome":"override"}, when the command runs with--outcomes FILE, then theb1/F7line ends with| override |.Jared-minutes (expected): tier rule 74.6, RouteSelector 12.1.Ping cost of 10 Jared-minutes is a guess (O-6).andReport only. A change to the tier rule goes to Jared (O-4).urgent, when the command runs, then the exit status is not 0, stdout is empty, and stderr holdsurgent.moments/route-log.jsonl, when the command runs, then the exit status is not 0 and stderr holds the route log path.{"row_id":"b1/F7","outcome":"maybe"}, when the command runs, then the exit status is not 0, stdout is empty, and stderr holdsmaybe.RouteSelector.standardand a medium wrong cost with sourcefacts, whenroutesis called, then it returnsdecide_alone3.0,predict2.0, anddefer10 expected minutes, andchoosereturns thepredictroute.All tests go under
plugins/os-me/test(for exampleroute_comparison_cli_test.rbandroute_selector_test.rb). They callOsMe::CLI.startorRouteSelectordirectly. No model call, no network.Owner sketch
Levelis a duck forWrongCost:CostModel#wrong_minutesreads only#level, and the route log keeps only the level.Scope and blocking
Blocked by: #1247 (S5 shadow route, built 2026-10-23).
Non-goals: any change to the tier rule or
decision-tiers.md(O-4); a writer for the outcomes file; a link from route log rows to prediction log records; realized (outcome-based) minutes; changes toCostModelvalues orCalibrationPriorpriors.AFK defaults used: O-4 (report only), O-6 (ping cost 10, a guess).
Origin
DESIGN(docs/decision-system/build-plan.md).VERDICT: CREATE (user-approved; backlog search only)
Work started on branch ticket-1253 (os-sdlc implement, AFK decision-system build).
Resolution
Done: os-me-eval route-comparison reports where the tier rule and the RouteSelector shadow route disagree, the outcome of each such row, and the expected Jared-minutes of each rule. Report only (O-4).
Evidence: Implementation 139: 10 dispatches, 0 retries, 6 min 41 s, implementation_complete. Commits
bd59bc70and1f24f5f3on ticket-1253. Suite gate green.Follow-ups: Dropped for now: a writer for the outcomes file and a link from route-log rows to prediction records. No route-log rows exist yet (S5 gate open), so neither has data to act on; revisit when the S5 gate closes.