Align green_assert_failure_sidecar.rb test-path matching to the segment-anchored convention #469

Closed
opened 2026-08-21 18:21:55 +00:00 by jared · 2 comments
Owner

Context

While extending WriteGuard for #466, plain String#include? test-path matching was shown to false-match paths like Dir.mktmpdir("os-sdlc-test") temp prefixes. WriteGuard now uses a segment-anchored regex ((^|/)<test_path>(/|$)) in plugins/os-sdlc/lib/os_sdlc/write_guard.rb; plugins/os-sdlc/lib/os_sdlc/green_assert_failure_sidecar.rb still uses plain include?, so the same misclassification is live there.

Skeptic verdict: CREATE — real observed bug-class confirmed live in a sibling file, this ticket is the root.

Origin

  • Trigger: TDD red phase of #466 — write_guard_scope_test.rb table rows misclassified a tmpdir-prefixed production path as test-path under include? matching.
  • Improvised this session: none (WriteGuard fixed properly; sidecar untouched).
  • Chain: sidecar may misclassify paths ← String#include? substring matching ← DESIGN (green_assert_failure_sidecar.rb matching approach, no ADR).
  • Root candidate: this ticket.
## Context While extending WriteGuard for #466, plain String#include? test-path matching was shown to false-match paths like Dir.mktmpdir("os-sdlc-test") temp prefixes. WriteGuard now uses a segment-anchored regex ((^|/)<test_path>(/|$)) in plugins/os-sdlc/lib/os_sdlc/write_guard.rb; plugins/os-sdlc/lib/os_sdlc/green_assert_failure_sidecar.rb still uses plain include?, so the same misclassification is live there. Skeptic verdict: CREATE — real observed bug-class confirmed live in a sibling file, this ticket is the root. ## Origin - Trigger: TDD red phase of #466 — write_guard_scope_test.rb table rows misclassified a tmpdir-prefixed production path as test-path under include? matching. - Improvised this session: none (WriteGuard fixed properly; sidecar untouched). - Chain: sidecar may misclassify paths ← String#include? substring matching ← DESIGN (green_assert_failure_sidecar.rb matching approach, no ADR). - Root candidate: this ticket.
Author
Owner

Work starting via os-sdlc pipeline on branch worktree-worktree-469.

Work starting via os-sdlc pipeline on branch worktree-worktree-469.
Author
Owner

Resolution

Done: Aligned GreenAssertFailureSidecar#under_test_path? to WriteGuard's segment-anchored test-path regex, replacing String#include? substring matching; also removed an unreachable failing_path nil guard flagged in review.

Evidence: os-sdlc map drive reached merge-ready (implementation 2, session 918582d6): programmer + reviewer correction loop, reviewer round-2 verdict pass; full suite green (1007 runs, 2556 assertions, 0 failures), rubocop clean; change on branch worktree-worktree-469, file plugins/os-sdlc/lib/os_sdlc/green_assert_failure_sidecar.rb:50 matches write_guard.rb:125 convention.

Follow-ups: #475 captured (skeptic verdict CREATE): add regression test pinning the segment-anchored boundary; no other follow-ups.

## Resolution **Done:** Aligned GreenAssertFailureSidecar#under_test_path? to WriteGuard's segment-anchored test-path regex, replacing String#include? substring matching; also removed an unreachable failing_path nil guard flagged in review. **Evidence:** os-sdlc map drive reached merge-ready (implementation 2, session 918582d6): programmer + reviewer correction loop, reviewer round-2 verdict pass; full suite green (1007 runs, 2556 assertions, 0 failures), rubocop clean; change on branch worktree-worktree-469, file plugins/os-sdlc/lib/os_sdlc/green_assert_failure_sidecar.rb:50 matches write_guard.rb:125 convention. **Follow-ups:** #475 captured (skeptic verdict CREATE): add regression test pinning the segment-anchored boundary; no other follow-ups.
jared closed this issue 2026-08-21 20:25:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#469
No description provided.