// hosted-runner previews reach first-render much slower than local dev: the // guest bundle (often tens of MB) re-evals and re-hydrates on every launchApp // hard reload, and it is served over a cloudflared tunnel. run.sh sets // SOOTSIM_FLOW_TIMEOUT_SCALE for the recording lane so a slow-but-working app // clears its waits without per-app timeouts. off (1x) locally, clamped to 1..10. // // every deadline a hosted launchApp has to clear must use this, or the lane is // only half-scaled: the flow runner's own waits scaled while the CLI's // post-navigation readiness poll kept a flat ceiling, so a launchApp that was // working but slow failed the flow. export const FLOW_TIMEOUT_SCALE_ENV = 'SOOTSIM_FLOW_TIMEOUT_SCALE' export function flowTimeoutScale(): number { return Math.min(10, Math.max(1, Number(process.env[FLOW_TIMEOUT_SCALE_ENV]) || 1)) }