Skip to content

fix(bench): reject negative TaskArgs.extra_tool_calls - #869

Closed
Bartok9 wants to merge 1 commit into
RobotecAI:mainfrom
Bartok9:aerial/fix-taskargs-extra-tool-calls-nonneg
Closed

Bartok9 wants to merge 1 commit into
RobotecAI:mainfrom
Bartok9:aerial/fix-taskargs-extra-tool-calls-nonneg

Conversation

@Bartok9

@Bartok9 Bartok9 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Negative extra_tool_calls could inflate tool-calling pass budgets. Validate >= 0 and reject bool before coercion.

AI-assisted; human-reviewed.

Claim: bartok
Operator: bartok
Campaign: aerial-drone

Fail-closed validation so pass budgets cannot be inflated with negative
extra tool-call allowances. Reject bool (int subclass) before coercion.

Signed-off-by: Bartok9 <183148895+Bartok9@users.noreply.github.com>
@maciejmajek

Copy link
Copy Markdown
Member

Closing, though there was more behind this one than the rest. A negative extra_tool_calls really does drop max_tool_calls_number below required_calls and skew results instead of erroring. If we take it, it will be ge=0 on the pydantic field rather than a validator plus a test module, so I would rather fold it in next time that file is open.

@maciejmajek maciejmajek closed this Sep 7, 2026
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.

3 participants