fix(ssh): make execution timeout configurable and remove internal 300s cutoff#3394
fix(ssh): make execution timeout configurable and remove internal 300s cutoff#3394Danigm-dev wants to merge 7 commits intosimstudioai:stagingfrom
Conversation
|
@Danigm-dev is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR removes the hardcoded 300s (5 minute) internal timeout for SSH/tool execution by forwarding the configurable
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: a624850 |
3d83b39 to
f70f154
Compare
PR SummaryMedium Risk Overview Internal routes now resolve and pin an IP (including Adds unit tests asserting timeout propagation/defaulting and updates expected error-message fallbacks, plus docs and deployment config to make Written by Cursor Bugbot for commit f70f154. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| statusText: secureResponse.statusText, | ||
| headers: responseHeaders, | ||
| }) | ||
| } |
There was a problem hiding this comment.
Error text lost when converting secureFetch to Response
Medium Severity
For internal routes, the body is eagerly consumed via secureResponse.arrayBuffer() and wrapped in a new Response(bodyBuffer). Later, the error-handling path tries response.json() first, then falls back to response.text(). Since a standard Response body can only be consumed once, the .text() fallback always fails after .json() consumes the body. Bun's native fetch allows multiple body reads, so the old code could extract meaningful error text (e.g., "Invalid access token"). Now errorData is always null for non-JSON error responses, and users see only the HTTP status text like "Unauthorized" instead of the actual error message.


Summary
Makes SSH/tool internal execution timeout configurable by forwarding the effective timeout to internal
secure fetch calls, removing the hard internal 300s cutoff. Also documents how to configure
EXECUTION_TIMEOUT_FREEfor local Docker and Helm/cloud deployments.Fixes #(issue)
Type of Change
Testing
cd apps/sim && bunx vitest run tools/index.test.ts1 passed, 52 passedChecklist
Screenshots/Videos
N/A