8000 M11.12: task diff stays in its planned fileset; reasoned two-way exemptions, no human by adeelahmad · Pull Request #123 · adeelahmad/aloop · GitHub
[go: up one dir, main page]

Skip to content

M11.12: task diff stays in its planned fileset; reasoned two-way exemptions, no human - #123

Merged
adeelahmad merged 2 commits into
masterfrom
claude/project-thread-ff8wra
Nov 20, 2026
Merged

adeelahmad merged 2 commits into
masterfrom
claude/project-thread-ff8wra

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Audit: how accurate is plan-fileset scope enforcement?

Probed the real gate-green-verify with 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:

  • GREEN could weaken or delete another task's existing test (any DEFAULT_TEST_GLOBS path was in scope). RED likewise.
  • A production file under a nested target/ was invisible to the diff.
  • The contract's SCOPE_GLOBS widened the plan (* passed anything); a planner glob path (src/*) did too.
  • A task with no targets in targets.json got no scope check at all.
  • git-quoted non-ASCII paths were false positives.
  • No exemption path: an honest out-of-plan edit could only fail the attempt and re-plan.

Change

targets diffscope (called by GREEN and RED stop gates when targets.json exists) judges base..worktree against the task's targets' paths and planned tests, literally:

  • new test file passes; an existing test outside the plan may only gain lines (never rewritten/deleted, exemption or not);
  • a production file the plan missed passes only as a ### Scope exemptions line in the worker's output.md block (- <path>: <reason>): literal path, 4+ word reason, at most ALOOP_SCOPE_EXEMPT_MAX=3, never a one-way path (CI, VCS config, agent settings, secrets, migrations, licences, run data). Each taken one is a scope.exempted ledger row. Decided by the gate, no human (M11 core rule);
  • SCOPE_GLOBS only narrows; targets check refuses glob paths.

Roadmapped: M11.13 live PreToolUse scope check + review of scope.exempted rows; 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).
  • Re-ran targets-scope, semantic-targets, plan-render, plan-approval, planner-feedback, supply-chain, any-language, aladdin-cli, commit-trace, evidence, handoff-resume, lsp-adapter, metrics, orchestrator-sweep, mission-core, events: all ok. make pycheck, check-tracking.py ok. make test-hosts / make conformance: see CI.

Generated by Claude Code

…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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeZyjBDTGLMBdR8U6F7bqS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeZyjBDTGLMBdR8U6F7bqS
@adeelahmad
adeelahmad marked this pull request as ready for review November 20, 2026 00:21
@adeelahmad
adeelahmad merged commit bc70ac0 into master Nov 20, 2026
5 checks passed
adeelahmad pushed a commit that referenced this pull request Nov 20, 2026
…1 branch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0