Repository navigation
refactor(tools): define tool bindings in task templates - #1898
Conversation
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 9 selected item(s). |
NanaseInori
left a comment
There was a problem hiding this comment.
Reviewed the complete 32-file diff, the new resolver/validation paths, the command request fixtures, and the existing discussion. The tool-bindings search returned only this PR. #1894 is already merged and removed runtime overrides; moving versioned membership into the owning task templates is a distinct follow-up, not a duplicate of that removal.
The review main-task list preserves the previous six-tool order, the scan list preserves the previous exclusion of file_read_diff, and MCP definitions are still appended through the existing review path. Resolve preserves raw schemas, rejects invalid catalog/name pairs and unknown references, and deduplicates selections in first-occurrence order without turning an empty selection into the full catalog. Helper-task bindings are rejected by template validation. The tests cover these boundaries and inspect the actual review/scan request tools; the planning fixture separately verifies one request with no callable tools.
Adding file_read to planning reference text is an intentional prompt change, accurately disclosed and reflected across the five documentation locales. It does not grant planning tool execution, and the docs correctly avoid treating these definition lists as an execution sandbox. I found no blocking defect in this patch.
Validation: source and regression-test inspection only. I did not independently run the repository/race/Pages suites or a model-quality benchmark, and do not treat the contributor's reported results as my own test execution.
This review was conducted by NanaseInori's review bot, using the model GPT-6 Astra Pro. If you need a human review, please manually @NanaseInori.
Description
Move built-in tool selection out of the shared tool catalog and into the task templates that own each model request.
MAIN_TASK.toolslists for review and scan. Scan continues to omitfile_read_diff.PLAN_TASK.tool_referencesfor review planning. These definitions are rendered as prompt text only; planning remains a single request without callable tools.file_readin planning references, matching the existing planning prompt example. This is an intentional prompt change, not a claim of complete behavioral equivalence.plan_task/main_taskcatalog flags and the hard-coded scan exclusion. Resolve names in first-occurrence order, deduplicate references, preserve raw schemas, and reject unknown references or invalid catalog definitions. Empty selections stay empty.The six tool definitions and default main-task tool ordering are unchanged. No CLI flags or runtime tool overrides are added.
Type of Change
How Has This Been Tested?
make checkmake testfor the template, tool catalog, agent, CLI, and review-task packagesmake testwith race detectionmake coverage: 91.5%, above the 90% thresholdmake buildnode scripts/github-actions/check-plugin-contract.test.jsnode scripts/github-actions/check-plugin-contract.js all: all links resolve; the existing Cursor path-resolution assumption warning remainsnpm --prefix pages test: 53 tests passednpm --prefix pages run build: passed with bundle-size warningsocr review --audience agent --format json --background "...": all 9 selected production files completed, 0 comments, no failed or waived files. Test files and Markdown were not selected by OCR.Regression tests cover ordered/deduplicated selection, empty lists, invalid definitions and references, unsupported task bindings, actual review/scan request tools, and planning descriptions without callable tools. Existing execution-equivalence fixtures remain unchanged.
Local verification used the installed Go toolchain with the stale
GOROOTunset and Node 24 for Pages. Temporary executables stayed under the Git-ignoreddist/verify/tmpdirectory. No external model-quality benchmark was run for the additional planning reference.Checklist
AI/LLM Disclosure
Codex using
gpt-6-astraassisted with implementation, tests, documentation, and PR preparation. Open Code Review (ocrv1.13.7), also usinggpt-6-astra, performed the automated production-code review. No AI attribution or co-author trailers are included in the commit. Human self-review, the CLA, and the author's responsibility for answering maintainer questions remain for the author to confirm.Related Issues
Follow-up to #1894.