Repository navigation
fix(runtime): report the effective ask timeout so a clamped wait isn't misreported - #10550
Conversation
…t misreported The 30-min clamp was silent: the ask result carried no timeout figure, so the CLI printed the value the caller *sent*. A worker passing --timeout-ms 3600000 was told "ask timeout after 3600000ms" after only 30 min of real waiting — off by 2x, and accurate before this PR added the clamp. Echo the effective budget on every ask return and print that. Additive optional field; older clients fall back to the requested value.
📝 WalkthroughWalkthroughThe orchestration RPC now returns the effective clamped 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/runtime/rpc/methods/orchestration.test.ts (1)
1815-1825: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the timeout and abort response paths.
This test inserts a reply, so it exercises only the successful return branch. Add focused cases for deadline expiry and
signal.abortedto verify those newly changed responses also include the effectivetimeoutMs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4bc8d07e-4261-4ece-8c8d-0cad63fa069b
📒 Files selected for processing (3)
src/cli/handlers/orchestration.tssrc/main/runtime/rpc/methods/orchestration.test.tssrc/main/runtime/rpc/methods/orchestration.ts
…t misreported (stablyai#10550) The 30-min clamp was silent: the ask result carried no timeout figure, so the CLI printed the value the caller *sent*. A worker passing --timeout-ms 3600000 was told "ask timeout after 3600000ms" after only 30 min of real waiting — off by 2x, and accurate before this PR added the clamp. Echo the effective budget on every ask return and print that. Additive optional field; older clients fall back to the requested value.
Summary
Follow-up to #10529, which added a 30-minute clamp on
orchestration.ask'stimeoutMs. The clamp was silent: the ask result carried no timeout figure, so the CLI printed the value the caller sent.A worker passing
--timeout-ms 3600000is toldask timeout after 3600000msafter only 30 minutes of real waiting — off by 2x, and accurate before #10529 introduced the clamp. An agent reads that as "the coordinator is dead" and escalates, when re-asking is the correct response.This echoes the effective budget on every ask return and prints that instead.
Why this is a separate PR
This commit was written during #10529's review and pushed to that branch, but GitHub never synced the PR head (
head.shastayed at the previous commit with nosynchronizeevent for ~45 min), so the squash merge silently used the older sha and the fix was left behind. Recovering it here rather than losing it.Shape
if (outbound)meant a missing reply let the handler'swhile (true)spin until vitest timed out, hanging instead of failing. Now assertsoutboundis defined.Verification
orchestration.test.ts— 116/116 pass on mergedmainAssertionError: expected undefined to be 1800000. So the new assertion pins observability specifically, not the clamp it depends on.Not verified
No live SSH/relay/mobile client was driven. The
orca serve/ web reachability oforchestration.askover WebSocket (scoperuntimebypasses the mobile allowlist) is established by readingindex.tsandipc/mobile.ts, not by running one.