Skip to content

Keep Runtime Tool deadlines outside provider budgets - #956

Draft
Y1fe1Zh0u wants to merge 2 commits into
dataelement:002-tool-runtime-contractfrom
Y1fe1Zh0u:fix/tool-deadline-contract
Draft

Keep Runtime Tool deadlines outside provider budgets#956
Y1fe1Zh0u wants to merge 2 commits into
dataelement:002-tool-runtime-contractfrom
Y1fe1Zh0u:fix/tool-deadline-contract

Conversation

@Y1fe1Zh0u

Copy link
Copy Markdown
Collaborator

Summary

  • align network-read Runtime deadlines with the declared 60 second Tool budget
  • give standard image providers a 120 second Runtime deadline
  • preserve the custom image provider's existing 600 second configured upper bound
  • lock builtin timeout declarations and Runtime policies together in tests

Validation

  • 171 Tool contract, Model Step, Tool Step, and builtin contract tests passed
  • scoped Ruff and git diff checks passed

Boundaries

  • no handler refactor
  • no retry-policy changes
  • no live provider timing test

Set the existing protocol repair, safe-read replay, and model-visible Tool episode limits to ten while preserving their current independent state and execution semantics. Update focused tests and planning artifacts to make the off-by-one behavior explicit.

Constraint: Tool-related retry and repair limits must be ten without restructuring the existing counters

Rejected: Unify protocol, Receipt, and model-visible repair state now | counter redesign is intentionally deferred

Confidence: high

Scope-risk: moderate

Directive: Keep the independent counters until the planned repair-control refactor; do not infer identical attempt semantics from the shared numeric limit

Tested: 911 Runtime and Tool pytest cases; scoped Ruff; fatal-level caller Ruff; py_compile; git diff --check

Not-tested: Live Provider credentials
Network reads and image generation now carry deadline policies that cover their declared provider timeout. Custom image generation retains its existing 600 second configurable upper bound instead of being cancelled by the generic Runtime default.

Constraint: Provider-specific internal timeouts may remain shorter, but the Runtime wrapper must not expire first.

Rejected: Read live Tool configuration inside the Tool Step deadline resolver | would reintroduce mutable routing policy after call acceptance.

Confidence: high

Scope-risk: narrow

Directive: Keep builtin timeout declarations and Runtime deadline policy tests aligned when changing provider budgets.

Tested: 171 Tool contract, Model Step, Tool Step, and builtin contract tests; scoped Ruff; git diff --check.

Not-tested: Wall-clock calls to web and image providers.
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