crc-shares rows-merge: apply the wave 5 row-fill file to the ledger #1159
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#1159
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
In crc-refactor phase 5, one opus agent writes
wave5-rows-<ticket>.tsvafter each wave 5 ticket. No script applies that file to the ledger. SKILL.md phase 5 step 3 tells the orchestrator to write a short script for each run. In run 2 the orchestrator wrote scratchfill_rows.pyand kept it in its context. The token-cost choice indocs/crc/PLAN.mdPhase 8 (lever a, item 1) replaces that step with a committed script.Reproduce
n/a: new merge subcommand; nothing to reproduce.
Approach
Add the subcommand
rows-mergetobin/crc-shares:crc-shares --target NAME --ticket N rows-merge RUN_DIR. It readsRUN_DIR/wave5-rows-N.tsv, checks every line, and applies the lines toRUN_DIR/ledger.tsvbypath. ReuseCrc::Shares::Table,VerdictRules,IdList,Jobs::CellMerge,Crc::Ledger,Crc::Emitter, andCrc::Result.File header (exact):
path job concept job_category role verdict new_path new_constant new_test_path wave ruling evidence_add question(tab-separated).Apply, per line:
job,concept,job_category,role,verdict,new_path,new_constant,new_test_path,wave, andquestionreplace the row's cells. EachrulingID is added to the row'srulinglist once (IdList#with).evidence_addis appended toevidenceonce (CellMerge#with). A second run with the same file changes no byte.Refuse (exit 1, ledger unchanged, each problem in the JSON
problemslist): no such file; header differs; a line with the wrong field count; a path that is not a ledger row; a duplicate path; ajobthat does not start withThis object owns; an emptyconcept,job_category, orrole; an emptyruling; a ruling ID that no ledger row cites yet; anyVerdictRules.wave_2problem of the merged row.--ticketis required forrows-mergeand refused for the other subcommands. Exit 2 with usage when it is missing.Required work:
rows-mergesubcommand — check: presentrows-mergeinplugins/os-sdlc/lib/os_sdlc/crc/shares.rbclass RowMergeinplugins/os-sdlc/lib/os_sdlc/crc/shares/row_merge.rb--ticketin the crc-shares usage text — check: present--ticket Ninplugins/os-sdlc/lib/os_sdlc/boot/inputs/usage_text.rbOrchestrator work: SKILL.md phase 5 step 3 calls
crc-shares rows-mergein place of the scratch script.Rejected: a separate
bin/crc-rows— crc-shares already owns the agent-TSV-to-ledger merges and their checks.Acceptance criteria
wave5-rows-7.tsvline for it, whencrc-shares --target T --ticket 7 rows-merge RUN_DIRruns, then it exits 0, the row has the line's job, concept, job_category, role, verdict, and new cells, the ruling ID is inruling, andevidenceends with theevidence_addtext.problemsnames the path, and the ledger bytes do not change.This object owns, or whose ruling ID no ledger row cites, when the command runs, then it exits 1 with that problem and the ledger is unchanged.renameand an emptynew_constant, when the command runs, then it exits 1 withrename without new_constantand the ledger is unchanged.rows-mergewithout--ticket, when the command runs, then it exits 2 and prints the usage.Owner sketch
Origin
docs/crc/PLAN.mdPhase 8 token-cost choice, lever a item 1; round C2crc-token-levers(docs/crc/os-sdlc/run-3-prep-rounds.md).fill_rows.py← no committed row-fill merge ← DESIGN (plugins/os-sdlc/skills/crc-refactor/SKILL.mdphase 5 step 3)VERDICT: CREATE
Work started on branch crc-token-levers (round C2 crc-token-levers).
Pipeline run 78 failed at test-reviewer (dispatch 734, verdict:error): the brief fact test_changes was null. Cause: the orchestrator is a subagent that cannot enter the worktree, so every pipeline agent starts in the main checkout, and the Runner computed the brief against the main checkout. The test-writer tests (red) are kept; one test defect fixed (default line cited R1, which no ledger row cited). The ticket continues by TDD by hand in worktree crc-token-levers.
Resolution
Done: crc-shares --target NAME --ticket N rows-merge RUN_DIR applies wave5-rows-.tsv to the ledger; SKILL.md phase 5 step 3 calls it.
Evidence:
7d314216,090ffc4e(audit fixes),b451e367(skill). Suite 2248 runs, 5053 assertions, 0 failures, 43.3 s; rubocop no offenses on changed files; branch crc-token-levers (merged to main by worktree finish).Follow-ups: none