Repository navigation
M11.12: task diff stays in its planned fileset; reasoned two-way exemptions, no human - #123
Merged
Merged
Conversation
…only by a declared, reasoned two-way exemption targets diffscope (GREEN and RED stop gates) judges base..worktree against the task's targets' paths and planned tests, literally. New test files pass; an existing test outside the plan may only gain lines. A production file the plan missed passes only as a `### Scope exemptions` line in the worker's output.md block (literal path, 4+ word reason, cap 3, never a one-way path), each a scope.exempted ledger row: decided by the gate, no human (M11 core rule). Closes audit gaps: weakening/deleting another task's test, a file under a nested target/, the contract's SCOPE_GLOBS or a planner glob widening the plan, a task with no targets getting no check, git-quoted non-ASCII paths. scripts/test/task-scope.test.py: 31 checks (master: 9/19 GREEN rows). Roadmapped M11.13 (live PreToolUse scope) and M11.14 (Claude Code main-tree writes). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FeZyjBDTGLMBdR8U6F7bqS
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FeZyjBDTGLMBdR8U6F7bqS
adeelahmad
marked this pull request as ready for review
November 20, 2026 00:21
adeelahmad
pushed a commit
that referenced
this pull request
Nov 20, 2026
…1 branch Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FeZyj7etMNXP3NuHLWrd4u
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.
Requested by Adeel · project thread
Audit: how accurate is plan-fileset scope enforcement?
Probed the real
gate-green-verifywith 19 cases (fresh repo + task worktree each). Master: 9/19 right. Core true positives/negatives (other task's file, new unplanned file, rename out, delete) were all correct; the gaps:DEFAULT_TEST_GLOBSpath was in scope). RED likewise.target/was invisible to the diff.SCOPE_GLOBSwidened the plan (*passed anything); a planner glob path (src/*) did too.targets.jsongot no scope check at all.Change
targets diffscope(called by GREEN and RED stop gates whentargets.jsonexists) judges base..worktree against the task's targets' paths and planned tests, literally:### Scope exemptionsline in the worker's output.md block (- <path>: <reason>): literal path, 4+ word reason, at mostALOOP_SCOPE_EXEMPT_MAX=3, never a one-way path (CI, VCS config, agent settings, secrets, migrations, licences, run data). Each taken one is ascope.exemptedledger row. Decided by the gate, no human (M11 core rule);SCOPE_GLOBSonly narrows;targets checkrefuses glob paths.Roadmapped: M11.13 live PreToolUse scope check + review of
scope.exemptedrows; M11.14 Claude Code worker writes outside its worktree (absolute paths into the main tree escape every diff the gate reads).Evidence
scripts/test/task-scope.test.py: 31/31 (on master's plugin: 7/31).make pycheck,check-tracking.pyok.make test-hosts/make conformance: see CI.Generated by Claude Code