POODR map T8: Write-guard scopes (test-only / production-only / read-only) + table-driven tests #466
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#466
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?
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.
Work started via /loop build session (spec §7 ticket 8). Extending the Write guard to three enforced scopes with table-driven tests.
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.