Files
orca/src/shared/browser-wait-timeout.ts
T
Kelvin Amoaba cd757f4b19 fix(browser): pass orca wait's timeout through to agent-browser (#34283)
Condition waits never forwarded --timeout, so agent-browser always stopped at its own 25s default and --timeout 60000 still failed at 25s. orcad's external Chromium run and Electron sidecar socket also capped waits at a fixed 90s. One builder now passes --timeout (explicit or the documented 25000 default) on the local and orcad paths, process kills sit 5s above it, and every forwarding hop waits max(60s, T+30s).
2026-10-27 06:17:21 +00:00

8 lines
397 B
TypeScript

/** How long `orca wait` waits for a condition when no --timeout is given. */
export const BROWSER_WAIT_DEFAULT_TIMEOUT_MS = 25_000
/** Deadline for a hop that forwards `browser.wait`; it outlives the wait so the host reports the timeout. */
export function browserWaitRequestTimeoutMs(timeout: unknown): number {
return Math.max(60_000, (typeof timeout === 'number' ? timeout : 0) + 30_000)
}