GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — fix(tools): bound internal tool calls by the plan deadline, not Bun's fetch default by icecrasher321 · Pull Request #6547 · simstudioai/sim Conversation
Contributor
SummaryEvery internal tool call was capped at 5 minutes regardless of plan.
Bun's own source describes that timer as re-arming on writes and body-phase reads but not on response-header reads, making it "an absolute deadline for the header block to complete." An Reproduced in production on a workflow whose Function block runs a 15–40 minute sandboxed engine: all 16 parallel shards failed together at 300.5s with a bare Type of Change
TestingN/A Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
PR SummaryMedium Risk Overview Adds Internal route requests in Reviewed by Cursor Bugbot for commit 0f421b1. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Greptile SummaryThe PR prevents Bun’s default transport timeout from undercutting the plan-aware deadline on internal tool requests.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/core/utils/fetch-deadline.ts | Introduces a focused helper for disabling Bun’s transport timeout and a classifier for recognized transport failures. |
| apps/sim/lib/core/utils/fetch-deadline.test.ts | Covers helper output, immutability, init preservation, and timeout-error classification. |
| apps/sim/tools/index.ts | Applies the helper to internal tool requests while retaining the existing AbortController deadline and adds contextual transport errors. |
sequenceDiagram
participant Executor as Tool executor
participant Timer as Plan deadline timer
participant Fetch as Bun fetch
participant Route as Internal route
Executor->>Timer: Arm AbortController with plan-aware timeout
Executor->>Fetch: "Request with signal and timeout=false"
Fetch->>Route: Internal tool request
alt Route responds before deadline
Route-->>Fetch: Response
Fetch-->>Executor: Tool response
else Plan deadline expires
Timer->>Fetch: Abort signal
Fetch-->>Executor: AbortError
else Transport fails
Fetch-->>Executor: TimeoutError or fetch failed
Executor->>Executor: Add tool, elapsed-time, and deadline context
end
Reviews (2): Last reviewed commit: "fix(tools): disarm Bun's fetch idle time..." | Re-trigger Greptile
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…c deadline
Bun 1.3.14 ignores a positive numeric `timeout` on fetch and honors only the
boolean/zero form, so passing the plan deadline through changed nothing and
internal tool calls still died at the 300s default. Verified against the pinned
runtime: `{ timeout: 1000 }` does not abort a request that takes 3s to answer,
and `BUN_CONFIG_HTTP_IDLE_TIMEOUT` has no effect either — both are `main`-only.
The caller on this path already arms an AbortController with the plan timeout,
so the transport timer is disarmed rather than re-negotiated, leaving one
enforcement point instead of two that disagree.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
d8509ff to
3d10803
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@cursor review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3d10803. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Replaces the inferred note with the numbers from a probe against the pinned runtime: no option dies at 300028ms, timeout:false survives 310031ms, and a numeric timeout is ignored. Also records that [email protected] does not declare the option even though the runtime honors it, which is why the interface is declared locally. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
42bd20e6
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.