POODR map T8: Write-guard scopes (test-only / production-only / read-only) + table-driven tests #466

Closed
opened 2026-08-21 16:21:42 +00:00 by jared · 2 comments
Owner

Map: #458
Blocked by #463
Blocked by #464
Blocked by #465

Extend WriteGuard so test-writer writes tests only, programmer/refactorer roles write production only, judges write nothing. Table-driven role×path allow/deny tests.

Spec: docs/os-sdlc-rebuild/poodr-map-spec.md (ticket 8); blueprint sections cited there are authoritative.

Map: #458 Blocked by #463 Blocked by #464 Blocked by #465 Extend WriteGuard so test-writer writes tests only, programmer/refactorer roles write production only, judges write nothing. Table-driven role×path allow/deny tests. Spec: docs/os-sdlc-rebuild/poodr-map-spec.md (ticket 8); blueprint sections cited there are authoritative.
Author
Owner

Work started via /loop build session (spec §7 ticket 8). Extending the Write guard to three enforced scopes with table-driven tests.

Work started via /loop build session (spec §7 ticket 8). Extending the Write guard to three enforced scopes with table-driven tests.
Author
Owner

Resolution

Done: Extended lib/os_sdlc/write_guard.rb from the single programmer create-intent rule to three enforced scopes: test-only writes for test-writer, production-only writes for programmer/refactorer (programmer-repair covered automatically — same agent), and deny-all writes for the seven judge roles. Role detection reuses the os-sdlc: prefix-stripping convention; test_path resolves from Project.load, fail-open to inert when unknown (matches the hook's never-crash-a-session contract). Path matching is segment-anchored ((^|/)test_path(/|$)) after include? substring matching false-matched tmpdir prefixes in the red phase. Added table-driven tests/write_guard_scope_test.rb (role × path → allow/deny); existing write_guard_test.rb preserved verbatim.

Evidence: Commit 3f1f61f. Suite: 998 runs, 2547 assertions, 0 failures. Rubocop: 3 files, no offenses. No runner-schema change; no committee escalation needed. Guard diff reviewed by the orchestrator.

Follow-ups: R4 live proof deferred to ticket #467 per spec §5 (not a new capture). Segment-anchored matching for green_assert_failure_sidecar.rb captured as #469 with skeptic verdict CREATE.

## Resolution **Done:** Extended lib/os_sdlc/write_guard.rb from the single programmer create-intent rule to three enforced scopes: test-only writes for test-writer, production-only writes for programmer/refactorer (programmer-repair covered automatically — same agent), and deny-all writes for the seven judge roles. Role detection reuses the os-sdlc: prefix-stripping convention; test_path resolves from Project.load, fail-open to inert when unknown (matches the hook's never-crash-a-session contract). Path matching is segment-anchored ((^|/)test_path(/|$)) after include? substring matching false-matched tmpdir prefixes in the red phase. Added table-driven tests/write_guard_scope_test.rb (role × path → allow/deny); existing write_guard_test.rb preserved verbatim. **Evidence:** Commit 3f1f61f. Suite: 998 runs, 2547 assertions, 0 failures. Rubocop: 3 files, no offenses. No runner-schema change; no committee escalation needed. Guard diff reviewed by the orchestrator. **Follow-ups:** R4 live proof deferred to ticket #467 per spec §5 (not a new capture). Segment-anchored matching for green_assert_failure_sidecar.rb captured as #469 with skeptic verdict CREATE.
jared closed this issue 2026-08-21 18:22:04 +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#466
No description provided.