mirror of
https://github.com/simstudioai/sim.git
synced 2026-11-01 21:32:00 +08:00
The internal-route transport fix disarmed Bun's 300s fetch idle timer with `timeout: false`, on the recorded claim that Node's undici had no equivalent default. It does: undici arms `headersTimeout` and `bodyTimeout` at 300e3 on its default dispatcher, and the Bun-only option is silently ignored there. Async executions run in Trigger.dev workers on `runtime: 'node-24'`, so every sandbox run longer than five minutes still died at the default with `TypeError: fetch failed` (cause `HeadersTimeoutError`) despite a plan deadline of up to seven days. withCallerOwnedDeadline now also attaches a shared undici Agent with both timers disarmed as the request dispatcher. Bun ignores `dispatcher` and keeps the existing `timeout: false` disarm; Node's fetch honors it, leaving the caller's armed AbortController as the single enforcement point on both runtimes. Measured against a server that withholds response headers: the pre-fix init dies at 300996ms with the headers-timeout cause, the disarmed init resolves at 310016ms, and a 3s caller abort still fires at 3006ms.