os-me: score applied rulings from later corrections, with no reply from Jared #1753
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#1753
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
An applied ruling gets a score only when Jared replies to the Prediction.
~/dev/os-me-store/learning/loop.mdstep 3 says: "A prediction with noJARED:line in its block gets no score." and "Only a back-and-forth is evidence. Silence is not." The ladder inplugins/os-context/prompts/session-start/40-decisions.mdsays: "No rung waits for Jared." So a session applies the Prediction and continues, Jared does not reply, and the record stays without a verdict. The learning loop then has almost no material.docs/decision-system/vision.mddefines the sample as a chain, not a point. It says of silence: "Label itdetected, weight it low, and never let it count as a confirmation." No machine step builds this chain verdict today.Observed
Counts on 2026-11-13:
~/dev/os-me-store/prediction-log.jsonlhas 21 records withrecorded_atfrom 2026-11-04 to 2026-11-13. 17 have no verdict. The other 4 are 3partialand 1miss.docs/decisions/rulings.tsvhas 164 rows in the same period. 110 rows have aruled_byvalue that names a prediction.Gaps found by the manual backfill on 2026-11-13 (source checked on that date):
detectedverdict exists.plugins/os-me/lib/os_me/cli.rb:70permitshit partial missonly;score-record --verdict detectedexits 1.~/dev/os-me-store/learning/loop.mdsteps 3 and 6 give silence no score.docs/decision-system/vision.mdline 195 labels silencedetected, with low weight.loop.mdstep 3 says: "Judge each prediction against its own block only". So a correction in a later session cannot give a score.score-recordrequires--depth(cli.rb:71:accepted-verbatim discussed overridden).loop.mddoes not say which value goes with which case, and the command in step 6 has no--depth.docs/decisions/rulings.tsv.os-me-eval appendreads a transcript.os-me-eval backfillreads the Store review log.score-recordcannot remove a verdict. It can replace one: a secondscore-recordon the same id writes the new verdict with no message (PredictionLog#score,plugins/os-me/lib/os_me/prediction_log.rb:21-25). So nothing protects a verdict that came from a reply of Jared.Result of the manual backfill on 2026-11-13:
detecteddoes not exist. The log after the run agrees with the 1: b10276a0session:1gotpartialon 2026-11-13 (Store commit 3c191c4). The log now has 21 records since 2026-11-04: 4partial, 1miss, 16 with no verdict. The 16 include 2 held-out sessions (ae4be489, 9d8c2e15) and 2 sessions that were live during the run (fdf2ac7d, 2bb44e9c).rulings.tsvthat have no log record proposed, for 71 rows:detected44,partial5,hit2,miss1, held out 18, session not found 1 (file line 83, id 79).docs/decision-system/backfill/2026-11-13-rulings-chain-join.tsv. It has 72 rows: the 71 predicted rows and 1 row that Jared ruled (file line 111, proposedhit, outside the predicted pool). The 18 held-out rows carry no question text and no quote.Reproduce
n/a: feature ticket.
Approach
The SessionStart extraction (
plugins/os-me/hooks/extract_moments.rb) joins each predicted row ofdocs/decisions/rulings.tsvto later corrections. A correction is a later row that supersedes or reverts the ruling, or a later message from Jared that corrects it. The step writes the chain verdict throughos-me-eval score-record:missorpartial.detectedlabel with low weight.hit.A manual backfill for 2026-11-04 to 2026-11-13 runs on 2026-11-13. This ticket makes that backfill a machine step. Depends on #1757. The join needs a prediction id and a session id on each predicted row; #1757 defines them. Without them the join uses date and text, and it failed for file line 83.
Required scope, from the gaps in Observed:
detectedverdict toscore-recordand to each reader ofverdict(PredictionReport::Rows,CalibrationReport).detectednever counts as a hit.loop.mdstep 3 so that a correction in a later session can give a score, and steps 3 and 6 so that silence givesdetected.loop.mdwhich--depthvalue goes with each case, with the chain cases included.rulings.tsvrow that has no record.score-recorda way to remove a verdict, and a rule for replacement. The step must not replace a verdict that came from a reply of Jared (criterion 4).loop.mdis in the Store repository (~/dev/os-me-store). Edit it there and commit there.Required work: none beyond the acceptance criteria.
Acceptance criteria
docs/decisions/rulings.tsvand a later row that supersedes it, when the next session starts, then the prediction record has the verdictmissorpartialand no person ran a command.detectedlabel with low weight and does not have the verdicthit.docs/decision-system/backfill/2026-11-13-rulings-chain-join.tsv, when the backfill runs again after this ticket ships, then the log has the proposed verdict of each row that is not held out and has a session, and no person ran a command or edited a file.score-recordruns with the removal option, then the record has no verdict.Non-goals
Where the learning loop runs (#958, #959). Recording of a second Prediction in one session (#1233). Promotion of confirmed predictions into lessons (#1240).
Origin
VERDICT: CREATE (ticket-skeptic, 2026-11-13): no open ticket builds a machine step that scores applied rulings from later corrections without a reply.
Decompose, phase Decide (2026-11-13). a. One change: one step that joins each predicted row of docs/decisions/rulings.tsv to its log record by prediction_id and session_id (ADR-0313, #1757 done) and writes the chain verdict. b. Owner: no existing object owns that join; a new object is needed, whose secret is how a predicted row and the later rows on the same question become a verdict. c. Route: a new object, and the work touches the CLI, the reports, the SessionStart hook and the Store text, so this ticket goes to /os-sdlc:ticket-takedown 1753. Takedown writes the Owner sketch.
Occurrence: Score a ruling from a correction that Jared gives only in chat
Seen: plugins/os-me/lib/os_me/rulings_chain.rb; plugins/os-me/hooks/extract_moments.rb
Run: session 2bb44e9c-522c-4c97-8449-bd46bed898e0, hand-finish of the takedown design docs/takedown/1753-20261113-165135
Adds: the ticket stays open for this half only. Shipped on 2026-11-13 (commit
2617b07a5on main, ADR-0314, Store 08c0867): the SessionStart step hooks/score_chain.rb scores from the corrects column (miss, partial), writes detected with low weight on silence, skips held-out sessions and rows with no full session id, never replaces a reply verdict, loads the chain-join backfill, and score-record has detected and --remove; loop.md steps 3 and 6 are updated. Acceptance criteria 1, 3, 4, 5, 6 pass (os-me suite 525 runs, 0 failures; one design audit, all findings fixed or answered). First real run: 196 to 251 records, 56 chain verdicts, 0 existing verdicts changed. Not done: a correction that Jared gives in a later message with no corrects row still leaves the ruling as detected (criterion 2 treats it as silence). Material for it: moments.jsonl labels corrections; ChainWriter lets a later verdict replace its own detected. Known limits: 16 Stop-hook records since 2026-11-04 have no verdict because their table rows carry no prediction_id; up to 17 ruling: records sit in sessions that already have a Stop-hook record; a removed verdict returns as detected at the next session start; the --depth meanings in loop.md step 6 are inferred and need a check by Jared. The takedown pipeline run failed at green-suite on one lint line; the build was done test-first by hand.