inward-dependency lint misses qualified constant chains such as Project::Yaml::TEST_DIR_CANDIDATES, so model to adapter edges go unreported #798
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#798
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
plugins/os-sdlc/lib/os_sdlc/lint/inward_dependencies.rbreports outward edges between role layers.Model is layer 3 and adapter is layer 2.
Its
resolvestep finds no exact key for a chain likeProject::Yaml::TEST_DIR_CANDIDATES.It skips the namespace lookup because the name contains
::, and falls back to the first segmentProject, which is model.So
model/project/flat_attrs.rb:37referencing an adapter constant produces no edge.The count stayed at 61 while an outward edge was added in #793.
The fix should try the longest known prefix before it falls back to the first segment.
It may raise the baseline count.
Reproduce
On commit
7ae416cfof ticket-793 runplugins/os-sdlc/bin/lint-inward-dependencies | grep flat_attrs.It prints nothing although flat_attrs.rb:37 references
Project::Yaml::TEST_DIR_CANDIDATES.Origin
VERDICT: CREATE
REASON: resolve skips namespace lookup for any qualified constant and falls back to the first segment, so a model -> adapter edge through a constant chain is silently dropped; validation-tool accuracy bug, its own root.
Resolution
Done: Folded into #748; the resolve longest-prefix fix is recorded there.
Evidence: resolve at plugins/os-sdlc/lib/os_sdlc/lint/inward_dependencies.rb:98-106 still falls back to const.split('::').first; bug not fixed.
Follow-ups: folded into #748