fix(hook): keep ask decision on claude rewrites#2571
Open
YOMXXX wants to merge 1 commit into
Open
Conversation
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
permissionDecision: "ask"for Claude native hook rewrites that are not explicitly allowedpermissionDecision: "allow"limited toAllowRewrite, so mixed compounds with unallowed segments are not auto-approvedFixes #2549
Verification
cargo +1.93.0 test claude_mixed_compound -- --nocapturecargo +1.93.0 test claude_default_rewrite_is_ask_not_allow -- --nocapturecargo +1.93.0 test claude_ -- --nocapturecargo +1.93.0 run --quiet -- hook claudewith the reported mixed-compound stdin payloadcargo +1.93.0 test hook_cmd -- --nocapturecargo +1.93.0 fmt --all -- --checkcargo +1.93.0 clippy --all-targetscargo +1.93.0 test --all -- --skip small_grep_not_worse_than_plaingit diff --check