Skip to content

refactor(cli)!: remove --tools overrides - #1894

Merged
lizhengfeng101 merged 3 commits into
mainfrom
refactor/remove-tools-override
Nov 10, 2026
Merged

lizhengfeng101 merged 3 commits into
mainfrom
refactor/remove-tools-override

Conversation

@lizhengfeng101

Copy link
Copy Markdown
Contributor

Description

Remove runtime overrides of the dedicated review agent's built-in tools. Keep the core tool definitions and workflow versioned and benchmark-validated together, while retaining MCP for external business context.

  • Remove --tools from both ocr review and ocr scan, including option fields and external-file loading.
  • Load only embedded definitions through toolsconfig.LoadDefault(). Preserve tool schemas, prompts, phase assignments, MCP registration, and --max-tools budgets.
  • Add regression coverage for rejected flags, embedded definitions, and independent loads; retain execution-equivalence fixtures unchanged.
  • Update English, Chinese, Japanese, Korean, and Russian documentation, migration guidance, and the ACP CLI contract description.

Breaking change and migration

Invocations containing --tools now fail with unknown flag: --tools, including preview runs. Remove the flag and its file argument from scripts and aliases. Project guidance belongs in review rules or background context; external business context belongs in MCP. There is no runtime replacement for disabling or redefining built-in tools.

mcp_servers.<name>.tools and --max-tools remain supported. MCP remains connected only in review; adding it to scan is out of scope. Existing session files remain readable, but sessions created with custom tool definitions should be restarted rather than resumed.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make check
  • make test (race enabled, rerun after rebasing onto origin/main)
  • make coverage (90% minimum)
  • make build
  • CLI smoke checks: help and completion omit --tools; separate, inline, and preview invocations reject it; --max-tools remains advertised.
  • make -C acp test GOTESTFLAGS='-v -race -count=1 -p 1'
  • npm --prefix pages test (48 tests) and npm --prefix pages run build
  • ocr review --audience agent --format json --background "...": all 5 selected production files completed, 0 comments, no failed or waived files. The 8 test files and 31 Markdown files were not selected by OCR.

An ACP timing test timed out during the initial concurrent validation, then passed both in isolation and in the full serial suite. The documentation build reports bundle-size warnings. No external benchmark was rerun; built-in definitions, prompt templates, and execution-equivalence fixtures are unchanged.

Local Go validation used a working installed toolchain with the stale GOROOT unset. Temporary executables stayed under the Git-ignored dist/verify/tmp directory, with a Git discovery ceiling to isolate non-repository test fixtures.

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA
  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

AI/LLM disclosure

Codex using gpt-6-astra assisted with design, implementation, tests, documentation, and PR preparation. Open Code Review (ocr v1.13.6), also using gpt-6-astra, performed the automated production-code review. No AI attribution or co-author trailers were added to the commit.

Human self-review, the CLA, and the author's responsibility for answering maintainer questions must be confirmed by the author; those checklist items are intentionally left unchecked.

Related Issues

None linked.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 5 selected item(s).

@NanaseInori NanaseInori left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the CLI/runtime removal, embedded loader, changed tests and multilingual migration/documentation changes at a054871. I found no blocking implementation defect.

The removal is consistent across review and scan: the option fields and registrations disappear, both runtime call sites use LoadDefault(), and the external JSON loading path is removed rather than silently ignoring the old flag. The regression tests include separate/inline/empty --tools forms and preview invocations, while retaining --max-tools. The embedded definitions themselves are unchanged, and the independent-load test checks that one caller cannot mutate another caller's definitions.

The migration text accurately calls out the intentional breaking change, the lack of a runtime replacement for built-in tool redefinition, the review-only MCP boundary and the recommendation to restart sessions created with custom definitions. Existing customization anchor links are explicitly retained and tested.

The requirement here is the PR's stated decision to version the dedicated agent and its built-in tool definitions together; no linked issue is claimed. The duplicate search surfaced max-tools budget fixes and a diff-only proposal, not another removal of this override.

This approval covers the source change under that explicitly declared breaking-change scope. I did not run the Go/ACP/site suites or an external benchmark locally, and this review does not certify the author's unchecked human/CLA attestations.

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.

@css521 css521 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@MuoDoo MuoDoo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

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.

4 participants