Fix diff-test gate path mapping for lib namespace directories not mirrored under tests/ #532
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#532
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?
Context
The first live
/os-sdlc:implementrun on the os-sdlc target (#449) stalled in a programmer-repair loop. The diff-test gate (ADR-0160) derives a test path from each changed lib file. For the os-sdlc target the derived path does not exist. The gate fails before any test runs.Observed
The programmer changed
plugins/os-sdlc/lib/os_sdlc/runner/tea_tracker.rb. The gate mapped it toplugins/os-sdlc/tests/os_sdlc/runner/tea_tracker_test.rb. The existing test lives atplugins/os-sdlc/tests/runner/tea_tracker_test.rb. Theos_sdlc/namespace directory underlib/is not mirrored undertests/. Every gate run for dispatch 9 recorded the same LoadError (correction_rounds rows 1-4 in.sdlc/pipeline.db). Two programmer-repair rounds reproduced it.Reproduce
Expected
The mapping must resolve to a test file that exists for this repository's layout. If no mapped file exists, the gate must say so in plain words instead of failing with a LoadError inside
ruby -e.Illustration
Origin
/os-sdlc:implement 449on branch ticket-449, dispatch 9 (programmer) and two programmer-repair rounds.DiffedTestPaths#test_path_formirrors the full lib-relative path under tests/ (plugins/os-sdlc/lib/os_sdlc/runner/diffed_test_paths.rb:33) ← DESIGN: ADR-0160 diff-scoped gates, path convention never checked against the os-sdlc target layout.OsSdlc::Runner::DiffedTestPaths#test_path_for,plugins/os-sdlc/lib/os_sdlc/runner/diffed_test_paths.rbRelated observation, not root-caused here: the two programmer-repair re-dispatches created no rows in
dispatches; both repair agents reported against dispatch 9.Skeptic
VERDICT: CREATE
REASON: Complete in-policy run hit a genuine root-cause bug (diff-test gate LoadError from unmirrored lib namespace), with reproduction, tests, and Origin chain ending in a design gap; blocks every os-sdlc change.
Resolution
Done: DiffedTestPaths#test_path_for now tries the mirrored path, then the path with the first lib segment dropped, picks the one on disk, and raises HarnessError naming both when neither exists. A single candidate keeps the old unconditional contract so a TDD round can point at a test it is about to create.
Evidence: Commit
356f102on main; tests in plugins/os-sdlc/tests/runner/diffed_test_paths_test.rb (namespaced, mirrored, no-candidate cases); suite 1020 runs 0 failures; live check: os-sdlc-runner gate 9 for #449 went from LoadError to running tests/runner/tea_tracker_test.rb and then green.Follow-ups: none
jared referenced this issue2026-09-08 17:21:53 +00:00