fix(tools): ToolExecutor forwarding gaps, symlinked checkpoint drop, checkpoint tests#6036
Merged
Merged
Conversation
bug-ops
enabled auto-merge (squash)
July 11, 2026 14:24
bug-ops
force-pushed
the
fix/6012-shadow-impl-forwarding-gap
branch
from
July 11, 2026 14:24
122e0c9 to
8377e23
Compare
…ckpoint drop, add checkpoint-stack tests CompressedExecutor, ToolFilter, and Arc<ShellExecutor> now forward every cross-cutting ToolExecutor method to their inner/wrapped executor instead of silently falling through to trait defaults, closing the same shadow-impl forwarding gap fixed for other wrappers in #5930 and #6011. capture_snapshot_for no longer drops a checkpoint for a newly-created file under a symlinked allowed_paths prefix on macOS: a new canonicalize_or_nearest_ancestor helper resolves symlinks via the nearest existing ancestor when the target path itself does not exist yet. Adds regression coverage for the ShellExecutor checkpoint stack: redo without a prior undo, checkpoint_list ordering, and multi-step undo/redo depth bookkeeping.
bug-ops
force-pushed
the
fix/6012-shadow-impl-forwarding-gap
branch
from
July 11, 2026 14:27
8377e23 to
fc982e9
Compare
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
CompressedExecutor,ToolFilter, andArc<ShellExecutor>now forward every cross-cuttingToolExecutormethod to their inner/wrapped executor instead of silently falling through to trait defaults — same defect class as checkpoint_undo/redo/list not forwarded by TrustGateExecutor/PolicyGateExecutor/AdversarialPolicyGateExecutor, breaking /undo in standard production wiring #5899/checkpoint_undo/redo/list not forwarded by ScopedToolExecutor/ShadowProbeExecutor — breaks /undo even after #5899, since these sit outside the gated chain #5905/ScopedToolExecutor does not forward requires_confirmation, defaulting to false for the outermost wrapper #5906 (fixed by fix(tools): forward checkpoint and confirmation methods through executor wrappers #5930) and CompositeExecutor does not forward requires_confirmation; AdversarialPolicyGateExecutor does not forward is_tool_speculatable #5900/CompositeExecutor does not override execute_tool_call_confirmed, silently re-running the full confirmation check on the composed tree #5938/PolicyGateExecutor/AdversarialPolicyGateExecutor do not forward requires_confirmation #5931 (fixed by fix(tools): forward requires_confirmation/is_tool_speculatable/execute_tool_call_confirmed through remaining ToolExecutor wrappers #6011). Theexecute_confirmedforward onArc<ShellExecutor>closes a currently-dormant gap (its only caller today is#[cfg(test)]-gated; production dispatch goes throughexecute_tool_call_confirmed) but is worth fixing as defense-in-depth.capture_snapshot_forno longer silently drops a checkpoint for a newly-created file under a symlinkedallowed_pathsprefix on macOS (e.g./tmp->/private/tmp). A new sharedcanonicalize_or_nearest_ancestorhelper resolves symlinks via the nearest existing ancestor when the target path itself doesn't exist yet, and also deduplicates the equivalent logic previously inlined invalidate_sandbox_with_cwd.ShellExecutorcheckpoint stack: redo without a prior undo (no-op),checkpoint_listordering with multiple entries, and a multi-step undo/redo/undo depth sequence.Closes #6012
Closes #6001
Closes #5999
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 12722 passed, 0 failed, 35 skippedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"/tmpprefix and was verified to fail without the fix