Add regression test for GreenAssertFailureSidecar segment-anchored test-path matching #475
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#475
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
Follow-up to #469. The fix at plugins/os-sdlc/lib/os_sdlc/green_assert_failure_sidecar.rb:52 (method under_test_path?) replaced String#include? with the segment-anchored regex %r{(^|/)#{Regexp.escape(@test_path)}(/|$)}, but plugins/os-sdlc/tests/green_assert_failure_sidecar_test.rb has no case that fails if it regresses. All existing cases pass bare paths like /repo/test/foo_test.rb:12 against test_path "test". The programmer role forbids test edits, so the #469 drive could not close the gap; the reviewer carried it as a non-blocking gap routed to test authorship. The equivalent regex is behaviorally pinned in write_guard_scope_test.rb (write_guard.rb:125).
Skeptic verdict: CREATE — concrete regression-coverage gap tied to a completed drive, not speculative.
Tasks
[ ] Add a case to GreenAssertFailureSidecarTest using the GreenAssertFailureSidecarCase helper: a production path under a tmpdir whose name contains the test_path substring (e.g. /repo/os-sdlc-test/foo.rb:5) must classify as shard/reserved, not "test"
[ ] Add a suffix row such as /repo/testdata/foo.rb:5 to pin the trailing (/|$) anchor
Acceptance criteria
[ ] Reverting green_assert_failure_sidecar.rb:52 to String#include? makes the suite red
Origin
Body corrected 2026-08-23 from code-probe verification (agent a2842c9e01637ab98, claude-sonnet-5).
Change log:
Reason: pure line-drift; the regression-coverage gap itself (no test case exercises a substring/segment-boundary match) is confirmed unchanged and still open.
Agent brief
Goal: pin the segment-anchored test-path regex in
GreenAssertFailureSidecar#under_test_path?with regression tests.Verified 2026-08-26: the regex now sits at
plugins/os-sdlc/lib/os_sdlc/green_assert_failure_sidecar.rb:54(ticket body says :52 — line drift only; anchor on the method nameunder_test_path?). The gap is still open: every case inplugins/os-sdlc/tests/green_assert_failure_sidecar_test.rbuses paths that pass under bothString#include?and the regex, so a revert would not turn the suite red. TheGreenAssertFailureSidecarCasehelper exists at line 9 of that test file.Steps:
/repo/os-sdlc-test/foo.rb:5withtest_path "test"— must NOT classify astest./repo/testdata/foo.rb:5— must NOT classify astest, pinning the trailing(/|$)anchor.String#include?; the suite must go red on the new cases; restore the regex.Scope: test file only; no production changes.
Work started on branch worktree-ticket-475 via /os-sdlc:implement.
Pipeline run failed:
implementation_failed, reasonbound_exhausted:test-writer/fail(implementation 1, branch worktree-ticket-475).Failed step: test-writer node, poodr-implementation map.
Gate details: all gate runs (dispatches 5–7, step_results 1–4) exited 0 — the full suite stayed green with the new regression cases in place. The test-writer gate requires the new test to be red for the intended reason; a green result follows the node's fail edge, and three rounds exhausted the bound.
Diagnosis: structural mismatch, not a defect in the tests. This ticket pins already-shipped behavior (the segment-anchored regex from #469), so a correct regression test passes immediately; red is only reachable by reverting production code, which the test-writer role forbids. The 18-line diff to plugins/os-sdlc/tests/green_assert_failure_sidecar_test.rb is preserved on the branch. The acceptance criterion (revert to String#include? goes red) still needs a one-off verification outside the map.
Resolution
Done: Regression test added pinning the segment-anchored test-path match in GreenAssertFailureSidecar; production fix itself had already shipped in
adc7d24Evidence: Commit
2a88f9cmerged to main (fast-forward). Red-proof: with the pre-adc7d24 include? regex restored, the new test fails (2 failures); with the fix, full suite 1223 runs, 0 failuresFollow-ups: Pipeline routing gaps found during this run (no escalate verdict for persistent unexpected-pass on expect:red gates; triage stages never check git log for the ticket's own prior commits) — deliberately not captured yet, pending user decision