Repository navigation
fix(ci): exclude the vetted-ops policy from the sandbox-write-denied hooks - #1309
Merged
Merged
Conversation
…hooks #1308 added a `permissions.deny` rule on `.apache-magpie-overrides/tools/vetted-ops/**` without extending the `sandbox_write_denied` exclude that exists for exactly this case. A deny rule becomes a sandbox filesystem write-deny, so end-of-file-fixer, mixed-line-ending and trailing-whitespace abort `prek run --all-files` inside an agent session with `Operation not permitted`, even though the file needs no fix. The policy keeps its coverage: `vetted_ops.config` parses it on every dispatch, so a malformed file fails the call. Also states the rule in the comment, since the coupling is easy to miss: a new `permissions.deny` rule on an in-repo path needs that path added here too. Generated-by: Claude Opus 5
This was referenced Sep 21, 2026
potiuk
added a commit
to potiuk/magpie
that referenced
this pull request
Sep 21, 2026
The marker sat at 0e7012b, where apache#1306 left it, while apache#1305 and apache#1307-apache#1310 landed on top. Reviewing that delta: - apache#1305 (stats events cache `updatedAt`) and apache#1307 (dev version bump) touch no behaviour any spec describes; no spec references `fetch_issues` or the events cache. - apache#1308, apache#1309 and apache#1310 are the vetted-ops sandbox work, and the `excludedCommands` section this branch already rewrites is where they belong. That rewrite covers all three. So the delta is documented and the marker can move. This is the by-hand route AGENTS.md allows for a small known gap, not a full `loop.sh update` pass — it reconciles these five commits rather than re-auditing every skill, tool and modes.md row. Generated-by: Claude Opus 5
4 of 15 tasks
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.
Summary
permissions.denyrule on.apache-magpie-overrides/tools/vetted-ops/**but did not extend thesandbox_write_deniedexclude in.pre-commit-config.yamlthat exists for exactly this case.permissions.denyrule becomes a sandbox filesystem write-deny, soend-of-file-fixer,mixed-line-endingandtrailing-whitespaceabortprek run --all-filesinside an agent session withOperation not permitted— even though the file needs no fix.permissions.denyrule on an in-repo path needs that path added here too.Type of change
prek, workflows, validators)Test plan
prek run --all-filesexits 0 inside the agent sandbox with no bypass, which is the property the exclude block exists to preserve. Before this change it aborted with:RFC-AI-0004 compliance
Linked issues
Refs #1308
Notes for reviewers
The vetted-ops policy loses no coverage by skipping EOF / whitespace / line-ending normalisation:
vetted_ops.configparses it on every dispatch, so a malformed file fails the call.Dropping
Write(...)and keepingEdit(...)is not an alternative fix —Edit(.claude/settings.json)has no companionWriterule and still produces the sandbox write-deny, which is why.claude/settings.jsonwas already in this exclude.🤖 Generated with Claude Code