Repository navigation
Conversation
Owner
Author
|
Superseded by #1916. |
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.
Fixes #1914
Symptom
External
run_taskcalls with read-only prompts containing phrases such asNo edits.were refused before dispatch withrefused detour to external MCP tool mcp__...__run_task for a local workspace edit:.Root cause
v0.302.74.76:src/mcp_run_task_guard.zig:58(requestsLocalEdit) matched edit keywords via bare word lookup without tracking clause-local negation.Fix
hasWordloop inrequestsLocalEdit(src/mcp_run_task_guard.zig) with a zero-allocation clause/negation token scanner that ignores negated edit keywords (e.g.No edits.,Do not edit or modify,without making any file edits,no-edit) while continuing to refuse positive edit requests in the same or another clause and preserving--safe/ external server boundaries.#1914: explicit no-edit instructions are allowed while positive local edits remain guarded) covering both HTTP (server_owned_external) and--safeboundaries.Verification
zig build unit -Dtest-filter="#1909" -Dtest-filter="#1914"scripts/eval-tier1.sh --only fmt,lines,spec,reach,build,shell,terminal,invariants,sdk(all 3,952 declared tests compiled in, all Zig sources <= 600 LOC)zig build test -j4(all 68/68 test steps passed cleanly)