fix(check-scope): exempt .agents/research/ as a RAD process artifact - #104
Merged
Conversation
`/rad-research` commits its artifact to the work branch BEFORE the plan exists, so no plan can ever declare it in Files in Scope. `.agents/research/` was missing from ALWAYS_ALLOW_PREFIXES while `.agents/logs/`, `.agents/plans/`, and `.agents/state/` were all exempt — #14 covered the others and missed this one. The result is a deliver that never touched the artifact failing Gate 2 on its own branch's first commit. Observed on rad/wave-back-pressure (#89): the scope check flagged `.agents/research/wave-back-pressure.md`, committed 2026-08-04 as the branch's first commit, four days before the plan was written. There is no workaround from inside the affected delivery. Adding the path to the plan's Files in Scope would edit an approved plan doc and invalidate its approval fingerprint, and RAD has no re-approval path (#39). Adds AC#3b, mirroring AC#3's idiom. Verified non-vacuous: without the one-line exemption the case fails with exit 1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 10, 2026
Owner
Author
|
Correction. This PR body states that "RAD has no re-approval path (#39)". That is wrong. PR #45 closed that gap on 2026-06-23. The routing decision still stands, on better grounds than the ones given: Log corrected in #106. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-line fix plus a regression case:
.agents/research/is now exempt incheck-scope.sh'sALWAYS_ALLOW_PREFIXES, alongside.agents/logs/,.agents/plans/, and.agents/state/.The gap
/rad-researchcommits its artifact to the work branch before the plan exists,so no plan can ever declare it in Files in Scope. Every other RAD process artifact
was already exempt — #14 covered logs, plans, state, and findings, and missed
research.
The consequence is that a deliver which never touched the artifact fails Gate 2 on
its own branch's first commit.
How it surfaced
Delivering #89 on
rad/wave-back-pressure. Every wave passed, 239/239 harness testsand all 15 shell suites green — then the scope gate failed on exactly one file:
That file was committed 2026-08-04 as the branch's first commit, four days
before the plan was written.
git log af144b2..HEAD -- .agents/research/is empty —no wave touched it. The stalled 2026-08-06 deliver would have hit the same wall.
Why it can't be worked around inside the affected delivery
Adding the path to the plan's Files in Scope would edit an approved plan doc and
invalidate its approval fingerprint:
RAD has no re-approval path (#39), so an amended plan cannot be re-attested. The fix
has to live here, in the checker.
Verification
check-scope.shstashed back to its pre-fix state thecase fails —
✗ AC#3b: .agents/research/ change should exit 0 (got 1).scripts/test-check-scope.sh→ ALL PASS (8 cases).scripts/test-*.shsuites → PASS.scripts/lint-shell-safety.sh→ exit 0.Scope
Touches a self-protected path (
scripts/check-scope.sh), so this can never beauto-cleared by severity routing — architect review is the intended path.
This is a direct fix rather than a planned RAD delivery, on the grounds that a
one-line allowlist addition with a regression test is below the threshold where a
plan adds information. That threshold is exactly what #81 (tiered planning,
/rad-plan --light) exists to formalize.