fix: map Copilot task and web_search so Task policies fire - #693
fix: map Copilot task and web_search so Task policies fire#693AshSgDe29071999 wants to merge 1 commit into
Conversation
COPILOT_TOOL_MAP missed task and web_search, so policies matching Task silently never fired on Copilot. ask_user is left unmapped: it has no filesystem or shell reach. Fixes FailproofAI#690
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Copilot tool map now canonicalizes ChangesCopilot tool canonicalization
Estimated code review effort: 2 (Simple) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This localized change maps Copilot task and web-search tool names so the intended policies can run; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
__tests__/hooks/copilot-canonicalize.test.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. __tests__/hooks/handler.test.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. src/hooks/types.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Unmapped Copilot tool names pass through raw. A policy written as
toolName === \"Task\"therefore never ran on Copilot — no warning, just no enforcement.Changes
task→Taskweb_search→WebSearchask_useris not mapped: it has no filesystem or shell reach, so treating it as a benign pass-through is the safer callcopilot-canonicalize.test.tsand the existing COPILOT_TOOL_MAP table inhandler.test.tsTest plan
npx vitest run __tests__/hooks/copilot-canonicalize.test.tsFixes #690
Summary by CodeRabbit
Bug Fixes
taskandweb_searchtool names.ask_user.Tests