Share CodeShape lexical scope with the InwardDependency and AdapterBuiltOutsideEntry cops #1734
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#1734
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 cops
InwardDependency::ConstantReferenceandAdapterBuiltOutsideEntry::AdapterConstanteach hold their own nesting rule, and each fails to resolve about 1,160 names that exist inlib. A cop cannot flag a name that it cannot resolve (#1718). Blocked by #1729.Observed
The cops missed 1,169 and 1,156 sites in the comparison of 2026-11-12.
AdapterConstantmatches file names without case (adapter_constant.rb:35-40checksFile.file?after it lowercases the name), so the constantWORDresolves tocensus/word.rb(7 sites of this kind). The nesting rules are atcops/structural/inward_dependency/constant_reference.rb:21-40,adapter_built_outside_entry/adapter_constant.rb:46-77, anddry/owned_message.rb:39.Reproduce
n/a: design finding from the resolver comparison of 2026-11-12.
Approach
Not decided; the takedown designs it. The cops stay on the RuboCop tree (
docs/crc/os-sdlc/detector-cop-memo.mdadvised against a move onto Prism) and shareCodeShape::LexicalScopeon plain strings.AdapterConstantresolves through definitions, not file names.Required work: none beyond the acceptance criteria.
Origin
docs/decisions/rulings.tsv, 2026-11-12) after takedown rundocs/takedown/1718-20261112-160038/failed green-suite; parent #1718WORDresolves tocensus/word.rb← no object owns facts read from parsed Ruby code, so each detector, lint check, and cop writes its own copy ← DESIGN (#1718;docs/system-design-format/README.md:242)plugins/os-sdlc/lib/os_sdlc/cops/structural/inward_dependency/constant_reference.rb,adapter_built_outside_entry/adapter_constant.rbVERDICT: CREATE
REASON: Jared ruled the split of #1718 (ruling 146); the backlog search found no open ticket with the same mechanism.
Occurrence: One owner for the enclosing namespace of a node in the Sdlc cops
Seen: plugins/os-sdlc/lib/os_sdlc/cops/dry/library_outside_owner/reference.rb:34-40
Run: implementation 287 (#1744), session 4ee81bfb-d577-49b1-a9cf-617e4d2dae5f
Adds: a fifth copy of the nesting rule. The contract-auditor reported lens A12:
under?andnamespace_pathrepeatOwnedMessage#inside?(owned_message.rb:38-42). IncludeSdlc/Dry/LibraryOutsideOwnerin the cops that shareCodeShape::LexicalScope.