Repository navigation
fix(sdk): bound SSE frames and scan fragmented lines once - #4501
Merged
Merged
Conversation
|
ScriptedAlchemy
enabled auto-merge (squash)
October 24, 2026 09:00
ScriptedAlchemy
force-pushed
the
fix/sdk-bounded-sse-framing
branch
from
October 24, 2026 09:41
9e913bf to
18c8bde
Compare
Bound raw lines and retained event fields to the existing Rust SDK policy. Scan transport bytes once through a fixed line buffer, preserving UTF-8, CRLF and persistent IDs while refusing overflow before further reads. Add shared Rust/TypeScript framing fixtures and public-client regression checks, and regenerate the embedded extension server through its owner. Fixes #4411.
ScriptedAlchemy
force-pushed
the
fix/sdk-bounded-sse-framing
branch
from
October 24, 2026 15:07
831b1ab to
f1d2bd8
Compare
ScriptedAlchemy
disabled auto-merge
October 24, 2026 17:26
ScriptedAlchemy
enabled auto-merge (squash)
October 24, 2026 17:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The TypeScript client accumulated SSE lines and frame fields without a byte ceiling, and rescanned an unfinished line from its beginning after every transport chunk. A fragmented line could therefore cause quadratic delimiter scanning; an oversized response could retain unbounded parser state.
Changes
TraceDecayMalformedResponseErrorandpayload.limitBytes. The existing response owner cancels the body; overflow cannot reconnect, deliver the oversized frame or mask its failure with a cleanup error.The current server's bounded identifiers, test-result names, frontiers, progress and terminal receipts fit this existing allowance. PRs #4487 and #4489 cover separate JSON-body and cursor-delivery behavior; their unmerged changes are not included here.
Validation
git diff --checkpassed.tracedecayexecutable. These are not claimed as passing.Fixes #4411.