feat(hook): cover opencode's native tool names in the branch guard - #281
Merged
Conversation
MUTATING_TOOLS now includes patch/apply_patch/multiedit (opencode) and MultiEdit/multiedit (Claude Code, previously missing) alongside the existing write/edit/notebookedit names, so the shared classifier the opencode branch-guard plugin calls via `agentflare hook pre-tool-use` actually covers opencode's real tool set.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pre-tool-use redirect classifier now treats additional opencode mutation tools as mutating on the default branch, and tests that they are blocked on ChangesOpencode mutation tool guarding
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
getappz
added a commit
that referenced
this pull request
Jul 20, 2026
Agentflare-Agent: claude-code_2-1-215_agent Agentflare-Branch: item-185-asset-store-migration
This was referenced Jul 21, 2026
5 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
MUTATING_TOOLSinsrc/hook_redirect.rsnow includes opencode's native tool names (patch,apply_patch,multiedit) plus the previously-missingMultiEdit/multieditfor Claude Code.~/.config/opencode/plugin/branch-guard.js), which shells out toagentflare hook pre-tool-useinstead of duplicating branch-check logic — this is what actually makes that classifier cover opencode's real tool set.Test plan
cargo test hook_redirect— 17/17 passing, including newclassify_blocks_opencode_native_tool_names_on_masteropencode run: nativewritecorrectly denied onmastervia the rebuilt binarySummary by CodeRabbit