Repository navigation
fix(cli): reject ask waits above the documented 30-minute maximum - #32044
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
d55896f to
f0083f0
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
f0083f0 to
de882c9
Compare
ELI5
orca orchestration ask --timeout-msused to accept any number but quietly cap the wait at 30 minutes. That meant a script asking for 2 hours really waited only 30 minutes. Now the CLI stops right away with a clear error when the value is over 1,800,000 ms (30 minutes). It tells you to resume the same question after a timeout. Values from 1 to 1800000 behave exactly as before.What changed
src/cli/handlers/orchestration/question-handler.ts:--timeout-msvalues aboveORCHESTRATION_ASK_MAX_TIMEOUT_MS(1800000) are rejected withinvalid_argument(exit 1). The check runs before identity resolution or any RPC, so nothing reaches the runtime and no question is created.src/cli/specs/orchestration.ts: the help note documents the range (1 to 1800000; default 600000).worker-contract.mdgets a guide paragraph, andbundled-skill-guides.tsis regenerated.main()form, with JSON and text output.Compatibility
Verification (rebased onto main 28c7268, which includes #32168)
pnpm test src/cli/handlers/orchestration.test.ts src/cli/index-orchestration.test.ts: 60/60 pass.pnpm test src/cli src/shared/orchestration: 192 files, 2197 pass, 9 skipped.pnpm tcpasses after the rebase.verify:bundled-skill-guides --checkpasses.pnpm run build:cli) and ran it directly:--timeout-ms 1800001and9007199254740991:invalid_argument,runtimeId: null(no RPC was made), exit 1. Text mode prints the same message.--timeout-ms 1800000: reaches the runtime, which returnsdispatch_inactiveas expected because there is no Dispatch.--environment awin(1.4.237) and--environment win-lowspec(1.4.205, older): 1800000 reaches the server (dispatch_inactive), and 1800001 is rejected locally (invalid_argument,runtimeId: null). Mixed-version behavior is as designed.orca orchestration ask --helpshows the new note.--timeout-msusages in skill guides, docs and resources found a maximum of 900000, which is under the cap.CI note
The earlier
static analysis and typecheckfailure came from main (max-linesinheadless-terminal-tab-close.tsand a typecheck error inrenderer-owned-tab-properties.test.ts). #32168 fixed both. This branch is now rebased on top of that fix, so the gated test, e2e and package jobs run again.Remaining tradeoffs