CRC census --since: a run batches only changed and open files #1280
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#1280
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
Each CRC run starts with an empty ledger. The census then puts every file into wave 1 and wave 2 batches. In CRC run 4, waves 1-2 cost about 2.0M subagent tokens over 905 files and produced 13 non-keep rows. Run 3 had already judged almost every one of those files, and most of them had not changed.
Reproduce
n/a: design gap.
Census#census(plugins/os-sdlc/lib/os_sdlc/crc/census.rb) passes every ledger row toBatches.Approach
Keep the ledger between runs. Add
--since <sha>tobin/crc-census. With--since, aCensus::RunScopeselects the rows for this run, and only those rows go into the batch files. The scope is the union of three path sets: the files under the library root and the test support root thatgit diff --name-only <sha>..HEADlists, the files of open detector rows (Crc::OpenRows#open_paths; blocked rows are not in it), and the files the ledger does not list yet. For each row in the scope, the census clears the cellsjob,concept,job_category,role,verdict,new_path,new_constant,new_test_path, andquestion, so waves 1 to 3 write them again. It keepsevidence,ruling,wave, andcommit. A row out of the scope keeps every cell. The JSON report addsscopewith the count of each path set. Without--since, the census works as it does today.crc-refactor SKILL.md phase 1 changes: a run keeps the ledger of the run before it and passes
--sincewith that run's merge commit. A full pass is a choice the run prompt names.Depends on the "CRC open rows" ticket (Crc::OpenRows).
Required work:
class RunScopeinplugins/os-sdlc/lib/os_sdlc/crc/census/run_scope.rb--since— check: present--sinceinplugins/os-sdlc/lib/os_sdlc/crc/census/*.rb--since— check: present--sinceinplugins/os-sdlc/skills/crc-refactor/SKILL.mdAcceptance criteria
a.rbandb.rband a commit after SHA that changes onlya.rb, whencrc-census --since SHAruns, then the batch files lista.rband notb.rb.pathisb.rb, whencrc-census --since SHAruns, then the batch files listb.rb.c.rbthat the ledger does not list, whencrc-census --since SHAruns, then the ledger gets a row forc.rband the batch files list it.a.rbin the scope with filledjob,verdict,ruling, andcommitcells, whencrc-census --since SHAruns, then itsjobandverdictcells are empty and itsrulingandcommitcells are unchanged.b.rbout of the scope, whencrc-census --since SHAruns, then every cell of its row is unchanged.--since, whencrc-censusruns on the same ledger, then the batch files list every ledger row, as today.--sincenames a commit that does not exist, whencrc-censusruns, then it exits 1 with one stderr line that names the commit and changes no file.Owner sketch
Census#censuspasses only views wherescope.include?(view.path)toBatches;Settingscarries the scope, or nil without--since.Origin
VERDICT: CREATE
Queued (session c1bedec6): starts after #1279 merges, on branch crc-os-sdlc-run-4.
Work started (session c1bedec6). Branch crc-os-sdlc-run-4 (persistent worktree). Dependency met: #1279 and #1281 merged to main; Crc::OpenRows#open_paths exists (52 files on docs/crc/os-sdlc).
Implementation 144 failed at the change-auditor (dispatch 1224, verdict error, 400 s). Cause: the evidence CLI crashed with ruby-lsp InvalidLocationError (Utf16Scanner#find_char_position via evidence/probe/lsp/lookup.rb:34) on a references lookup for OpenRows. The work list itself was complete. Deviation: not marked blocked; no code was written and the failure is a tool defect, so a fresh implementation-open follows now. Tool defect captured separately.
Implementation 146 failed the same way (dispatch 1233, verdict error): the evidence CLI crashed twice with ruby-lsp InvalidLocationError. Blocked by #1284. #1280 resumes after #1284 merges.
Unblocked: the crash came from a stale ruby-lsp daemon (opened crc/open_rows.rb before #1281 changed it). The daemon was stopped; bin/evidence --root . OpenRows exits 0. The code fix is #1284. Re-opening the implementation now.
Resolution
Done: crc-census --since SHA batches only changed files, files of open detector rows (Crc::OpenRows), and unlisted files; it keeps the ledger and clears judgment cells of scoped rows only. Without --since, the full pass runs as before. crc-refactor SKILL.md phase 1 keeps the ledger between runs. Commit
5c285895, implementation 148.Evidence: Pipeline implementation 148 complete: suite-check pass (suite 55 s), contract-auditor pass. Real-data check on a scratch copy of docs/crc/os-sdlc with --since
ed03c3ea: exit 0, scope changed=11 open=52 new=4, 63 files in 2 batches (run 4 batched all 905).Follow-ups: #1284 (evidence CLI LSP stale daemon) is next in this session; #1282 stays on the backlog.