os-sdlc: reorganize tests/ to mirror lib with an explicit layout convention #296
Labels
No labels
P0
P1
P2
P3
bug
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
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#296
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?
os-sdlc: reorganize tests/ to mirror lib with an explicit layout convention
Problem Statement
The os-sdlc test suite only partially follows the accepted Ruby/minitest convention that test files mirror the production files they test.
tests/cops/mirrorslib/os_sdlc/cops/correctly, but the rest oftests/is flat whilelib/os_sdlc/has grown subdirectories (transition_table/,brief/). Several test files are multi-class grab-bags:artifact_test.rb(647 lines, 8 test classes),cli_test.rb(1,064 lines, 15 test classes),transition_table_wave2_test.rb(680 lines, 51 tests, named after a migration wave rather than a subject), and twohardening_*files named after nothing in lib. Given a class, you cannot reliably find its tests; given a failing test file, you cannot tell which unit regressed. No recorded convention exists to measure new test files against.Solution
Adopt and record one explicit layout rule, then mechanically reorganize the existing suite to satisfy it — pure moves, splits, and renames, with zero change to test behavior, verified by an identical before/after test inventory.
The rule: every file
tests/<subpath>/<base>[_<aspect>]_test.rbmust correspond tolib/os_sdlc/<subpath>/<base>.rb. Files undertests/integration/are exempt and are named after the process boundary they drive (cli_*,bin_*). The rule keys off public entry points, not off every.rbfile: private collaborators behind a facade (e.g. the Artifact internals, transition-table row modules) are legitimately tested through their facade and do not each require a mirrored test file.User Stories
Implementation Decisions
Testing Decisions
Out of Scope
Further Notes
Still valid: plugins/os-sdlc/tests/ still flat with hardening_preflight_review_packet_test.rb and hardening_verdict_lint_project_test.rb present; no ADR for test layout found.
Frozen in the 2026-08-16 backlog reset — see #419 for the expiry procedure. Do not work unless a live run rediscovers this issue.