Add a concept-cycle lint signal (report only) #949
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#949
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
Nothing in the repo detects cycles between concepts. Zeitwerk loads them without a warning. A cycle means two concepts change together, so neither can be read or moved alone.
The G4 challenge measured 11 cycle pairs: 1 in os-adr (
Record/Repository) and 10 in os-sdlc. It used the scriptdocs/crc/os-adr/scripts/concept-cycles.rb.Observed
The script uses Prism to read constants and
TSortto find strongly connected components. It takes the root namespace and the lib directory. It lives under docs/, so no crc run finds it.Reproduce
n/a: missing feature. No existing command reports cycles.
Approach
Promote the script into os-sdlc, next to the inward-dependencies lint. It uses the same layout: a class under
lib/os_sdlc/lint/and abin/lint-*script. It reports cycles and exits 0. It is a signal for crc-refactor runs. It has no baseline and is not a gate.The promoted script replaces
docs/crc/os-adr/scripts/concept-cycles.rb; delete that file in the same change (no Required-work check can verify a deleted file until #954).Required work:
OsSdlc::ConceptCyclesinplugins/os-sdlc/lib/os_sdlc/lint/concept_cycles.rb. It takes a root namespace and a lib dir, and answers the cycles. — check: presentConceptCyclesinplugins/os-sdlc/lib/os_sdlc/lint/concept_cycles.rbplugins/os-sdlc/bin/lint-concept-cycles. It prints the cycles and exits 0. — check: presentConceptCyclesinplugins/os-sdlc/bin/lint-concept-cyclesConceptCyclesinplugins/os-sdlc/tests/lint/concept_cycles_test.rbRejected: add G4 to the lens — A15 and A2 already decide every measured cycle (docs/crc/os-adr/lens-challenge-g4-concept-cycles.md).
Rejected: a gate or baseline — case 2 made this lint a signal with no baseline.
Acceptance criteria
Owner sketch
OsSdlc::ConceptCyclesowns cycle detection between concepts, next toOsSdlc::InwardDependencies.bin/lint-concept-cyclestakes the root namespace and the lib dir, callsConceptCycles.new(...).cycles, prints one line per cycle, and exits 0.plugins/os-sdlc/tests/lint/concept_cycles_test.rbcallscyclesover a fixture tree.docs/crc/os-adr/scripts/concept-cycles.rbis deleted.Non-goals
Fixing the 11 cycles. Moving
Adr::Record::Creation(a separate ruling, R-G4-2).Origin
4b8a1730. The script measured 11 mutual pairs.Work started on branch crc-os-adr-2026-10-04 (persistent worktree) via /os-sdlc:implement.
Required-work item 4 check removed: an absent check on a glob that the same item's delete leaves empty can never pass (checker reports 'glob matched no file'). Implementation 32 escalated on it; reopening.
Draft B dropped by the skeptic gate (ticket-caused required-work failure routes to programmer-repair). Reason: it is a symptom of draft A (absent check on an emptied glob can never pass). Fix A and the unfixable failure goes away. A general ticket-defect route is speculative until a second failure of this kind shows up.
Resolution
Done: Added OsSdlc::ConceptCycles (lib/os_sdlc/lint/concept_cycles.rb, References nested under it) and bin/lint-concept-cycles ROOT_NAMESPACE LIB_DIR: prints one 'cycle: A, B' line per strongly connected component of concepts and exits 0 (signal, no baseline). Deleted docs/crc/os-adr/scripts/concept-cycles.rb.
Evidence: Commits
58f9ede0(test, Runner) and530c98f6(production + bin + delete; written by abandoned implementation 32, passed every gate of implementation 34) on branch crc-os-adr-2026-10-04. os-sdlc suite green (1495 runs, 0 failures). Live run: 3 cycle groups in os-sdlc (21-concept group; Daemon/LspSession/Server; Fingerprint/Probe) and Record/Repository in os-adr, matching the G4 challenge.Follow-ups: #954 absent Required-work check on an emptied glob can never pass (caused implementations 32 and 33 to fail). Reopen after abandon needed a reroute (#951 shape) and the Runner commit omitted files written by the abandoned run; covered by #951. Branch not yet merged to main: waits for the user's decision on the whole crc-os-adr branch.