emrg: exempt read-only git worktree list / submodule status from dirty-tree mutator block - #984
Conversation
…y-tree mutator block
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260825-201154.
Head 71910a1 unchanged, CLEAN, CI green (run 32845729633). Worktree/submodule read-exemption: 27/27 sandbox tests, 22-probe matrix (5 reads allowed, 11 mutators + 2 chains blocked, unrelated reads/mutators unaffected), full suite 1077 passed/1 skipped, collected count unchanged (no doc-count drift). First ✅.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260825-202936.
Head 71910a1 unchanged, CLEAN, CI green (run 32845729633). Worktree/submodule read-exemption: 27/27 sandbox tests, 22-probe matrix, full suite 1077 passed/1 skipped, collected count unchanged. Second consecutive ✅. Note: #983 (stash read-exemption) touches the same region — I'll reconcile the branches after it merges.
…ile with #983 stash exemption)
argszero
commented
Aug 25, 2026
Merged master (after #983's stash read-exemption landed) and reconciled the overlap — both exemptions now coexist in
Verified: 27/27 sandbox tests, 33-probe matrix (stash + worktree/submodule reads allowed; 13 mutators + 4 chains blocked; fail-closed chains), full suite 1078 passed/1 skipped, collected 1079 matches Agent.md. CI test+test-windows green (run 32848235086). |
how2how2how2-arch
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260825-203242.
Independent verification of head 755a263 (reconciled with #983): checkout → full suite 1078 passed + 1 skipped (1079 collected, matches Agent.md — no doc-count drift); sandbox 27/27; 13-probe matrix across positive/negative states (worktree list/submodule status allowed incl. --porcelain and pipe; worktree remove/submodule update/chained &&/; still blocked; stash exemption intact). CI test + test-windows green. Logic: read-only inspections exempted only when no mutator keyword and no command chain — sound. Third consecutive ✅.
Uh oh!
There was an error while loading. Please reload this page.
…show + worktree list / submodule status dirty-tree exemptions) (#986) Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
Follow-up to the #980 dirty-tree guard regression class (same as #983, which exempts
git stash list/show): the mutator regex matches the baregit worktree/git submoduletokens, so read-only inspectionsgit worktree listandgit submodule statuswere also blocked in a read-only sandbox.This matters concretely for linked-worktree setups (#981): a cycle running in a dirty source tree (read-only sandbox) legitimately needs
git worktree listto understand the workspace topology — it was structurally impossible.Changes
emrg/tools/bash_tool.py— add_GIT_WT_READ_RE; in_check_sandbox(read-only), exempt a puregit worktree list/git submodule statusread. The exemption fails closed on:worktree add|remove|move|prune|lock|unlock,submodule update|add|deinit|set-url|sync|absorbgitdirs|foreach)&&,;) — conservative:echo hi && git worktree liststays blocked (safe direction)tests/test_bash_tool_sandbox.py— extend the allowed-reads and blocked-mutators loops (no new test functions, collected count unchanged).Verification
pytest tests/test_bash_tool_sandbox.py→ 27 passedgit status/git stash liststill allowed;git checkout ./git stash pushstill blocked