CRC census prepares its own ledger; remove ledger work from fast-batch #1398
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#1398
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
New source files between CRC runs are normal. Today they are treated as a defect:
plugins/os-sdlc/bin/crc-ledger-check --target os-sdlc docs/crc/os-sdlcexits 1 on main at356eb506with 96 "no ledger row" problems (92 when this ticket was first filed).plugins/os-sdlc/skills/fast-batch/references/close-checklist.md:8,references/batch-brief.md:67"It must exit 0. Add a ledger row for each new Ruby file.",skills/fast-batch/SKILL.md:50,docs/sdlc-fast-path.md:14and:34). So every fast batch must manage CRC ledger rows or accept a red check (fast-batch-16 ruling A-R1).rolecolumn.UnlayeredConstant(lib/os_sdlc/cops/structural/unlayered_constant.rb:14) reports an offense for a constant with no row, and also for a row whose role cell is empty (layer_ledger/layer_map.rb:43-46). So new code fails lint until a CRC run classifies it.Jared's ruling (session 006abca1, 2026-10-26): no AI outside a CRC run manages ledger rows. The CRC run brings its own ledger up to date when it starts or resumes, with code that already exists (
crc-census). There is no separate check step for an agent to call. Readiness is data in the report, not an exit code.Approach
Decision 1 = P: keep the crc-refactor flow as skill prose; make start and resume one idempotent code call. Decision 2 = A: the layer cops treat a file that is not yet classified (no ledger row, or a row with an empty role cell) as "no offense" until the next CRC run gives it a role. A row with a non-empty role that maps to no layer still reports, as today.
Required work:
crc-censusJSON report gains three keys and keeps every existing key (ok,appended,problems,totals,vocabulary_words,batches, andscopethroughScopedReport):ready(bool),missing({"job": [<ledger paths whose job cell is empty>]}), andledger_problems(the applied-row and gone-row problems thatOsSdlc::Crc::Ledger::Checkfinds; census reusesCheck, no logic is copied).readyis true only whenmissing.jobandledger_problemsare empty. The exit code is unchanged: it still followsok, neverready. — check: presentledger_problemsinplugins/os-sdlc/lib/os_sdlc/crc/census/report.rbcrc-ledger-checkCLI:plugins/os-sdlc/bin/crc-ledger-check,lib/os_sdlc/crc/ledger/check/run.rb, its Boot registration (lib/os_sdlc/boot/commands.rb:92-94,boot/inputs.rb:135,boot/inputs/usage_text.rb:111), andtests/crc/ledger_check_bin_test.rb. Move each applied-row, moved-row and gone-row behavior that test pins into a census test. Drop its unlisted-row and usage-exit cases.Ledger::Checkstays as a library object. — check: absentcrc-ledger-checkinplugins/os-sdlc/lib/os_sdlc/boot/commands.rbCrc::WaveProgressownswave-progress.json.recordkeeps keys it does not write, so a storedsincesurvives. When census runs with--since <sha>, it stores the SHA assincethroughWaveProgress. When census runs without--sinceand the file holds asince, census settings use it. — check: presentsinceinplugins/os-sdlc/lib/os_sdlc/crc/wave_progress.rbskills/crc-refactor/SKILL.md: Phase 0 (resume) and Phase 1 (new run) both start with one census call and follow its report: dispatchcrc-job-writerfor themissing.jobfiles, merge withcrc-jobs, run census again untilreadyis true; stop and report if it is still false after one job-writer round. Remove thecrc-ledger-checkrow (SKILL.md:32) and updatereferences/ledger.md:43. — check: present"ready": trueinplugins/os-sdlc/skills/crc-refactor/SKILL.mdreferences/close-checklist.md:8, the sentence atreferences/batch-brief.md:67, the mention atskills/fast-batch/SKILL.md:50, and the ledger items indocs/sdlc-fast-path.md:14and:34. Leave history rows and dated records unchanged. — check: absentcrc-ledger-checkinplugins/os-sdlc/skills/fast-batch/**/*.mdUnlayeredConstant: a constant with no ledger row, or with a row whose role cell is empty, produces no offense.InwardDependencyalready yields no edge when either layer is nil (layer_map.rb:57) andEffectInModelalready returns early when the role is nil (effect_in_model.rb:25); keep both as they are. The detector count that readsUnlayeredConstant(lib/os_sdlc/detector/inward_edges.rb:7) drops with it; that is intended.Acceptance criteria
crc-census --target <project> <docs dir>runs, then it appends two rows and prints JSON with"ready": false, both paths undermissing.job, and the existingokandappendedkeys.appendedis empty."ready": trueand exits 0.ledger_problemsandreadyis false.crc-census --since <sha>ran once, when census runs again without--since, then it uses the stored SHA fromwave-progress.json, and the file still holdswave,tickets_doneandtickets_totalafterWaveProgress#record.plugins/os-sdlc/bin/crc-ledger-checkdoes not exist and no live instruction inplugins/os-sdlc/skillsordocs/sdlc-fast-path.mdnames it (history rows excepted).UnlayeredConstantandInwardDependencyon it, then neither reports an offense.UnlayeredConstantruns, then it still reports the offense.Owner sketch
Origin
sinceowner made explicit.Add CRC ledger rows for the 92 os-sdlc files that crc-ledger-check reportsto CRC census prepares its own ledger; remove ledger work from fast-batchRewritten 2026-10-26 (session 006abca1) to Decision 1 = P, Decision 2 = A per Jared's ruling. Work starts now through /os-sdlc:implement.
Work started on branch ticket-1398 via /os-sdlc:implement.
Resolution
Done: crc-census prepares its own ledger: JSON adds ready, missing.job, ledger_problems; WaveProgress stores the --since SHA; crc-ledger-check CLI, Check::Run and its test deleted; fast-batch and sdlc-fast-path no longer manage ledger rows; crc-refactor Phase 0/1 start with one census call; UnlayeredConstant skips constants with no row or empty role.
Evidence: main
39060aba(commit0e225eb6). Suite 2687 runs 0 failures; 15 changed Ruby files lint clean; tests census_ready_bin_test.rb, census_stored_since_bin_test.rb, unlayered_constant_test.rb, inward_edges_test.rb; design audit findings 1-6 fixed (dead Check#call removed). Implementation 174 hand-finished after unexpected_pass escalation, then abandoned.Follow-ups: none: the exit-code cop is #1402 (filed this session); the suite wall-time WARN (88s vs 60s budget) is pre-existing and not caused by this change; the 96 unlisted files get rows at the next CRC run by design.