Add CodeShape::LexicalScope; move ConceptCycleCheck::References onto it #1729
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#1729
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
Seven pieces of os-sdlc each build their own table of constant definitions and their own lexical-scope rule, and they resolve the same name to different targets (#1718). No object owns facts read from parsed Ruby code. Jared named that owner
OsSdlc::CodeShape(ruling 145). This ticket builds the first part of it and moves one caller onto it.Design
/home/jared/dev/cc-os/docs/takedown/1729-20261112-163805/final-design.json
Approach
Add OsSdlc::CodeShape::LexicalScope as the single owner of Ruby's lexical constant-lookup rule (one frame per module/class node, rooted
::bypasses scope) and move ConceptCycleCheck::References onto it, deleting its scope string and nesting rule.Required work:
plugins/os-sdlc/lib/os_sdlc/code_shape/lexical_scope.rbplugins/os-sdlc/lib/os_sdlc/lint/concept_cycle_check/references.rbplugins/os-sdlc/test/os_sdlc/code_shape/lexical_scope_test.rbplugins/os-sdlc/test/os_sdlc/lint/concept_cycle_check/references_test.rbAcceptance criteria
module A::BreferencingX, withA::Xdefined: no edge (matches Ruby)module A; module B::CreferencingX: candidatesA::B::C::X,A::X,X::Helperinsidemodule M:HelperonlyXOwner sketch
::CodeShape::LexicalScopeConstantPath.rooted_parts(existing)ConceptCycleCheck::References(until a later CodeShape part takes the table)plugins/os-sdlc/test/os_sdlc/code_shape/lexical_scope_test.rbplugins/os-sdlc/test/os_sdlc/lint/concept_cycle_check/references_test.rbAdd CodeShape with one definition table and lexical-scope rule; move ConceptCycleCheck::References onto itto Add CodeShape::LexicalScope; move ConceptCycleCheck::References onto itWork started on branch ticket-1729 (os-sdlc takedown-implement pipeline).
Resolution
Done: CodeShape::LexicalScope owns Ruby's lexical constant-lookup rule (compact module A::B is one frame; rooted ::Name skips every scope). Lint::ConceptCycleCheck::References resolves through it; its scope string and prefix walk are deleted.
Evidence: Takedown 1729-20261112-163805 (cause_removed). Implementation 286: 5 dispatches, all pass, suite green, 2 min 25 s. Commits
7766138c4(code + tests),217d1f5ca(history row) on branch ticket-1729.Follow-ups: #1741 CodeShape::Definitions (the References definition table moves there); #1730-#1740 remaining CodeShape children; A15 lens occurrence posted on #1712.