Skip to content

fix(approval): fingerprint generic tool denials#1623

Merged
Hmbown merged 1 commit into
mainfrom
work/v0.8.37-approval-deny-fingerprint
May 14, 2026
Merged

fix(approval): fingerprint generic tool denials#1623
Hmbown merged 1 commit into
mainfrom
work/v0.8.37-approval-deny-fingerprint

Conversation

@Hmbown

@Hmbown Hmbown commented May 14, 2026

Copy link
Copy Markdown
Owner

Fixes #1617.

Summary

  • include generic tool input in approval-cache fingerprints
  • keep identical generic tool requests stable so exact repeat denials still auto-deny
  • prevent one denied edit_file/generic approval from blocking every future request of that tool type

Verification

  • RED: cargo test -p deepseek-tui --bin deepseek-tui --locked generic_tool
  • cargo fmt --all -- --check
  • cargo test -p deepseek-tui --bin deepseek-tui --locked generic_tool - 10 tests passed
  • cargo test -p deepseek-tui --bin deepseek-tui --locked approval_cache - 10 tests passed
  • cargo clippy -p deepseek-tui --all-targets --all-features --locked -- -D warnings
  • git diff --check

Release Safety

  • Review PR only.
  • No merge, tag, publish, force-push, or issue closure performed.

Copilot AI review requested due to automatic review settings May 14, 2026 07:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the approval cache to include a hash of the tool's input in the cache key for generic tools, ensuring that different inputs for the same tool result in unique keys. The implementation introduces a hash_json_input helper function and updates the documentation and unit tests accordingly. I have no feedback to provide as there were no review comments.

@Hmbown Hmbown merged commit f060386 into main May 14, 2026
19 of 23 checks passed
@Hmbown Hmbown deleted the work/v0.8.37-approval-deny-fingerprint branch May 26, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in deny tool use

2 participants