Sdlc/Structural/UnlayeredConstant: match ledger rows by constant as well as new_constant #1359
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#1359
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
Sdlc/Structural/UnlayeredConstantrecords a file as having no ledger row when the row exists. The ledger indexes a row bynew_constantwhen that field is set (ledger.rb:25-27). A file that has not yet moved still carries its old constant, so the lookup misses it.Observed
Shape: a RecordingCop. It records a
lib/os_sdlcfile whose Zeitwerk constant path has no layer role in the LedgerPath ledger (layer_map.rb:46-49). It is registered only in.rubocop-sweep.yml:19. It reports 71 records.Counterexample:
plugins/os-sdlc/lib/os_sdlc/project/changes.rb:3(Project::Changes) is recorded as "no ledger row".docs/crc/os-sdlc/ledger.tsv:763has the row, with rolequeryandnew_constantWorkingTreeChanges.Reproduce
Approach
Fix by shape, in the ledger lookup the cop uses: index a row by both
constantandnew_constant, or record "pending move" separately. Do not add a config Exclude list or a test-path exclusion.Required work:
new_constant— check: presentnew_constantinplugins/os-sdlc/lib/os_sdlc/**/ledger.rbAcceptance criteria
constantProject::Changes andnew_constantWorkingTreeChanges, when the cop checksproject/changes.rb, then it records no "no ledger row" entry.Owner sketch
Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md).
VERDICT: CREATE
Origin
role_by_constkeys only onnew_constantwhen set ← DESIGN (ledger.rb:25-27)