Skip to content

fix(tools): reject non-positive WaitForSecondsTool delays#803

Open
Bartok9 wants to merge 1 commit into
RobotecAI:mainfrom
Bartok9:fix/wait-for-seconds-non-positive
Open

fix(tools): reject non-positive WaitForSecondsTool delays#803
Bartok9 wants to merge 1 commit into
RobotecAI:mainfrom
Bartok9:fix/wait-for-seconds-non-positive

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 15, 2026

Copy link
Copy Markdown

Purpose

WaitForSecondsTool capped upper waits at 10s but still accepted non-positive values (and bools, since bool subclasses int), which agents could pass through to time.sleep.

Proposed Changes

  • Reject non-int / bool and seconds <= 0 with ValueError.
  • Preserve max 10s clamp and message after successful wait.
  • Unit tests for happy path, cap, zero/negative, bool.

Testing

  • tests/tools/test_wait_for_seconds_tool.py (sleep mocked).
  • Spec: specs/rai/2026-07-15-2.md (aerial dual-agent; Grok-spec + Bartok review micro-diff).

Duplicate check

No open PR for WaitForSecondsTool non-positive validation.

Keep the 10s upper cap, but refuse zero/negative/bool waits so
agents cannot pass through invalid durations into time.sleep.
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.

1 participant