Skip to content

Deliver: Self-Protection Paths - #78

Merged
seanrreid merged 14 commits into
mainfrom
rad/self-protection-paths
Jul 24, 2026
Merged

Deliver: Self-Protection Paths#78
seanrreid merged 14 commits into
mainfrom
rad/self-protection-paths

Conversation

@seanrreid

Copy link
Copy Markdown
Owner

Closes #73.

Summary

Adds a built-in, deliberately NON-configurable self-protected path set covering RAD's own machinery, so no auto-clear path (current severity routing, future green lane #75) can ever clear a plan that modifies the gate itself. Upstreamed from BEAKON's production trust-inversion guard.

  • scripts/lib/plan-paths.sh — readonly RAD_SELF_PROTECTED_PATTERN literal + path_is_self_protected() (one source of truth; no env-var indirection by design) — 698cb1e
  • scripts/classify-low-risk.sh — rule 0: any self-protected scope path ⇒ not-low, before and regardless of all operator patterns (wins over RAD_LOW_RISK_PATTERNS='.*') — f07234d
  • scripts/lint-plan.sh — unconditional advisory ("self-protected path (RAD machinery — never auto-clearable)"), fires in every RAD_HIGH_RISK_PATTERNS state; warnings-only contract unchanged — cd0635f
  • Docs: CLAUDE.md "Self-Protected Paths" subsection + .env.example transparency block — 4f00c91, 193ba3d

Test coverage

8 new cases across the two co-located suites (both green, plus scope + test checks):

  • classify: .* allowlist + harness path → not-low; classifier's own path w/ empty high-risk → not-low; .agents/state/ → not-low; docs-only regression → still low
  • lint: advisory under default / overridden / empty RAD_HIGH_RISK_PATTERNS; docs-only → no warning; exit 0 throughout

Notes for review

  • Plan resolved issue categories to all of ^\.claude/ (prompt surfaces = trust surfaces) — approved as an Issue Gap at Gate 1.
  • lint-plan.sh on this very plan now emits the new self-protection advisories — the guard flagging its own delivery, as intended.

🤖 Generated with Claude Code

seanrreid and others added 14 commits July 22, 2026 09:51
Adopted-From: #73
Author: architect
Waves: 3
Tasks: 5
Out-of-scope deps: no

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plan:  .agents/plans/self-protection-paths.md
(Status + approved event written by: node harness/cli.js approve)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…he shared lib

Wave 1, Task 1.1
Validated: AC#3 — pattern appears exactly once in source (plan doc quote excluded); bash -n passes; smoke check prints OK; extra allowed/denied path cases pass

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t hash

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave 2, Task 2.1
Validated: AC#1, AC#4 — bash scripts/test-classify-low-risk.sh exits 0 with the four new self-protected cases included

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t hash

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tests

Wave 2, Task 2.2
Validated: AC#2, AC#4 — bash scripts/test-lint-plan.sh exits 0 with the four new self-protected advisory cases included

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t hash

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave 3, Task 3.1
Validated: AC#5 — Self-Protected Paths subsection added after Severity Routing; bash scripts/test-lint-plan.sh ALL PASS (exit 0); scripts/lint-plan.sh .agents/plans/self-protection-paths.md exits 0

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t hash

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wave 3, Task 3.2
Validated: AC#5 — self-protected transparency block added after RAD_LOW_RISK_PATTERNS; every added line is a comment (diff check, no assignments touched)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t hash

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@seanrreid seanrreid added the rad:deliver RAD delivery PR label Jul 22, 2026
@seanrreid
seanrreid merged commit 6ecc9ba into main Jul 24, 2026
7 checks passed
@seanrreid
seanrreid deleted the rad/self-protection-paths branch July 24, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rad:deliver RAD delivery PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self-protection: RAD's own harness/gate/script paths are unconditionally high-risk — no auto-clear path may ever clear a change to itself

1 participant