ConceptCycleCheck: classify each loop reference by kind #1748
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#1748
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
The one message of
Sdlc/Structural/ConceptCyclefails on the most common kind of loop fault.The facts that a correct message needs exist only in a research script,
simulation/kinds.rb.Tickets 2 to 5 of this set need those facts in tested Ruby. This ticket blocks tickets 2, 3, 4, and 5.
The base branch is
ticket-1742. It is not merged. Its worktree is/home/jared/dev/cc-os/.claude/worktrees/ticket-1742. It holds the copSdlc/Structural/ConceptCycleand the classOsSdlc::Lint::ConceptCycleCheck.maindoes not have them.The research source is
docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/onmain(commits5465548a7,9bb6a9845,58ee53c). It holdssimulation/kinds.rb,simulation/facts-os-sdlc.yml,simulation/package/(lessons, message forms,render.rb), andsimulation/round-1/grades/*.yml.A "loop reference" is a reference from one concept to another concept when the two concepts are in a dependency loop. A "concept" is a top-level namespace of the library with its directory. The cop reports 93 loop references in 58 files of os-sdlc.
Work: port the three value rules of
simulation/kinds.rbinto tested Ruby underplugins/os-sdlc/lib/os_sdlc/lint/, next toOsSdlc::Lint::ConceptCycleCheck.For each loop reference, the check gives these facts:
A rule that cannot prove its kind stays quiet.
Constraints:
plugins/os-sdlc/.rubocop.ymlonly (ADR-0298).lib/os_sdlc/cops/structural/agrees with its constant (ADR-0090).Excludelist and no allowlist.Observed
At
2f58591f4,simulation/kinds.rbgives these counts on os-sdlc: 2 misplaced-unit, 2 one-edge-back, 18 starting-code, 71 none.At
2f58591f4, the script gives 0 proven and 10 none on os-backlog.The ported code must give the same counts.
Two reject clauses, the superclass clause and the starter-file clause, rejected nothing in the two codebases.
Each of the two clauses needs a must-pass fixture, because the data does not exercise them.
Reproduce
n/a: feature ticket.
Origin
docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/onmain)simulation/kinds.rb← the checkOsSdlc::Lint::ConceptCycleCheckhas not got them (DESIGN:plugins/os-sdlc/lib/os_sdlc/lint/concept_cycle_check.rbonticket-1742)ticket-1742)Scope addition from the merge of
mainintoticket-1742(commitc25f8259e).The merge changed the cop's
Referenceto build aCodeShape::LexicalScope. A compact declaration such asclass A::Bis now one lookup frame in the cop, as it is inReferences#located. Before the merge, the cop also searchedA::from inside that declaration.No test covers this case. Add a fixture for a reference inside a compact declaration, in
test/cops/concept_cycle_test.rb.Base for this ticket: branch
ticket-1742atc25f8259e. The full suite is green there (5396 runs), and the cop reports 93 loop references in 58 files.The takedown run docs/takedown/1748-20261113-150953/ failed at final-check: evidence timed out after 600s. Cause: #1760. The design of that run (09-revise-1) is built test-first on branch ticket-1742, outside the pipeline.
Resolution
Done: OsSdlc::Lint::ConceptCycleCheck::Kinds::Report gives, for each loop reference, the kind (or none), the unit, the fault site, the move target, the other users of both constants, the reports that one fix removes, each proven fault on a return route, and each return route with file:line for each edge. ConceptCycleCheck::Graph owns the concept graph. The rule code holds no repository names.
Evidence: Branch ticket-1742, commits
2aa90b65cccce31fb51f370d111(28 files, +1047/-25). Suite: 5418 runs, 0 failures, 0 errors, 0 skips. Rubocop on the 28 changed files: no offenses. Sdlc/Structural/ConceptCycle still reports 93 offenses in 58 files. Kinds on os-sdlc: 2 / 2 / 18 / 71; on os-backlog: 0 / 10; zero differences from simulation/kinds.rb. Built test-first outside the takedown pipeline because bin/evidence timed out (#1760).Follow-ups: #1760 filed for the bin/evidence timeout. The cops of #1749 to #1752 supply tracked_files and call Kinds::Report; no other follow-up.