Skip to content

feat: ai_timeout config and deadline budget propagation#530

Merged
buger merged 3 commits into
probelabs:mainfrom
buger:feat/ai-timeout-and-budget-propagation
Mar 12, 2026
Merged

feat: ai_timeout config and deadline budget propagation#530
buger merged 3 commits into
probelabs:mainfrom
buger:feat/ai-timeout-and-budget-propagation

Conversation

@buger
Copy link
Copy Markdown
Contributor

@buger buger commented Mar 12, 2026

Summary

  • Refactor timeout_mode to ai_timeout: Replace the timeout_mode: 'probe' | 'visor' field with a dedicated ai_timeout number field for Probe's maxOperationTimeout. Visor's hard timeout is always active — ai_timeout controls Probe's graceful wind-down independently. Defaults to timeout - 90s when not set.
  • Deadline budget propagation: When a parent check has a timeout, compute an absolute deadline timestamp and pass it through ExecutionContext. Child checks (sub-workflows) cap their effective timeout to the remaining parent budget, preventing nested steps from outliving their parent's time allocation.

Test plan

  • All 221 unit test suites pass (3042 tests)
  • New deadline-budget-propagation.test.ts covers: timeout capping, no-deadline passthrough, expired deadline throw, multi-level nesting, time-elapsed shrinking, fail-fast on exhausted budget
  • Manual: set ai_timeout in YAML config, verify Probe receives it as maxOperationTimeout
  • Manual: set short parent timeout, verify sub-workflow gets capped timeout

🤖 Generated with Claude Code

buger and others added 3 commits March 12, 2026 06:14
- Remove timeout_mode config ('probe'|'visor') toggle
- Always keep Visor's Promise.race hard kill (safety net)
- Add ai_timeout field for Probe's maxOperationTimeout (graceful wind-down)
- Defaults to timeout - 90s when not explicitly set
- Remove timeout_mode from assistant.yaml and code-talk.yaml defaults
  (graceful timeout now works automatically via the default)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a parent check has a timeout, compute an absolute deadline and pass
it through ExecutionContext. Child checks cap their effective timeout to
the remaining parent budget, preventing sub-workflows from outliving
their parent's time allocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded 120000/90000 with PROBE_GRACEFUL_MARGIN_MS and
MIN_TIMEOUT_FOR_MARGIN_MS. Add test coverage for ai_timeout derivation
logic and constant relationships.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@buger buger merged commit cdf769d into probelabs:main Mar 12, 2026
5 of 8 checks passed
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