Guard test for concepts whose namespace root is missing or outside model/ (ADR-0222 item 3) #745
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#745
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
ADR-0222 says a concept's namespace root is defined by its model file, and a concept with role-object files but no model file is a defect. Under plugins/os-sdlc/lib/os_sdlc today, 2 concepts have no root at all (Git, GateHandoff), and 30 concepts have a root outside model/ (for example pipeline/map.rb, which has 15 child files across 4 roles). 17 concepts comply. Zeitwerk creates implicit namespaces for all of these, so none of them fail at load time; nothing catches the drift.
Approach
Write a test shaped like inward_dependency_test.rb: list every concept that has role-object files, locate its root via
OsSdlc.loader.all_expected_cpaths, and fail on any entry not in a recorded KNOWN_ROOTLESS baseline. The baseline shrinks as concepts are morphed into ADR-0222 layout, the same pattern inward_dependency_test.rb uses for KNOWN_VIOLATIONS.Required work:
OsSdlc.loader.all_expected_cpaths.Rejected: relying on Zeitwerk to catch this — Zeitwerk's implicit namespaces make a rootless or misplaced-root concept load successfully, so it produces no signal on its own.
Acceptance criteria
Owner sketch
Origin
Started on branch crc-pass-os-sdlc.
Resolution
Done: Added concept_root_test.rb (baseline 33 entries) guarding ADR-0222's model/ namespace-root rule; full suite 1430 runs/3246 assertions, 2 pre-existing failures unrelated to this change (in-progress edit to inward_dependency_test.rb by another agent).
Evidence: commit
fc0289fa3b; suite line: 1430 runs, 3246 assertions, 2 failures, 0 errors, 10 skipsFollow-ups: none
Withdrawn in effect: concept_root_test.rb deleted in
d76058a5. A structure test on constant placement fails on refactors that change no behavior. Ownership heuristic moves to a living principles document.