Repository navigation
[Cherry-pick] Cherry-pick to release-v0.177.0 - #968
truefoundry-saas merged 4 commits into
Conversation
🦋 Changeset detectedLatest commit: 4a698c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a698c8. Configure here.
| }); | ||
| if (!shouldWriteToSSEStream && !stream.closed) { | ||
| stream.abort(); | ||
| } |
There was a problem hiding this comment.
Hung SSE write stays uncancelled
Medium Severity
withTimeout races writeSSE without cancelling it, and stream.abort() runs only after drainTurnEvents finishes. A stalled create-turn write therefore stays outstanding for the rest of the turn, so stream.close() can still wait on that write and the HTTP handler never finishes even though drain and dual-write continued.
Reviewed by Cursor Bugbot for commit 4a698c8. Configure here.


Automated cherry-pick for release request
899ed502-7cb2-475e-b87f-41145ff617cb.Source PRs (merged to main):
Do not merge manually — this PR is merged automatically when the release request is approved. If you do merge it yourself, use "Sync status" on the request so it stops showing as pending.
Note
Medium Risk
Default timeout changes alter when model and MCP calls fail or succeed, and the SSE write timeout changes streaming client behavior under slow consumers; metrics typing affects billing visibility but is additive.
Overview
Release cherry-pick that adjusts outbound timeouts, hardens create-turn streaming, and fixes usage display for failed/cancelled turns.
Outbound defaults: Model provider body idle timeout goes from 5s to 60s (config, core constants, and
.env.example). MCP end-to-end request and matching headers timeout defaults drop from 4 minutes to 2 minutes.Create-turn SSE: Each SSE
writeSSEis bounded by newTURN_SSE_STREAM_WRITE_TIMEOUT_MS(default 60s). On timeout or write failure, the handler stops writing to that client, logs disconnect/timeout, may abort the stream, but keeps turn event drain and dual-write so subscribers still get events.UI / types:
TurnStateCancelledandTurnStateErrormay carrymetrics; the agent-servertoUiTurnStateadapter maps those through likedone, so turn headers and session totals can include tokens/cost from error and cancelled terminal states. Tests cover error/cancelled mapping and session view derivation.OpenAPI/docs version bumps to 0.177.0-rc.2; changesets document the patch-level package releases.
Reviewed by Cursor Bugbot for commit 4a698c8. Bugbot is set up for automated code reviews on this repo. Configure here.