Skip to content

fix(review): honor lower max-tools overrides - #1118

Open
DreamZhongJu wants to merge 1 commit into
alibaba:mainfrom
DreamZhongJu:fix/review-max-tools-override
Open

fix(review): honor lower max-tools overrides#1118
DreamZhongJu wants to merge 1 commit into
alibaba:mainfrom
DreamZhongJu:fix/review-max-tools-override

Conversation

@DreamZhongJu

Copy link
Copy Markdown
Contributor

Summary

Make review --max-tools apply validated positive values exactly.

On current main, values from 1 to 49 are normalized to 50, but the shared template loader only applies values greater than the template default of 100. As a result, values from 50 to 99 are accepted but silently ignored.

This change:

  • keeps the template default when --max-tools is 0;
  • applies validated positive review overrides exactly;
  • preserves the existing minimum-value normalization;
  • leaves the scan command behavior unchanged;
  • records the effective value as max_tool_request_times in the run manifest;
  • updates the corresponding CLI documentation and translations.

For example, review --max-tools 50 now uses 50 rounds instead of silently retaining 100.

Testing

  • go test -race -count=1 ./...
  • go test -p=1 -count=1 ./...
  • go vet ./...
  • go run scripts/verify-english-only.go

Fixes #935

Related: #936 was closed without being merged.

@CLAassistant

CLAassistant commented Aug 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

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

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.

review: --max-tools 10-29 is accepted but silently ignored

2 participants