You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A paused consumer receiving a burst of small WebSocket deltas fails at the 129th frame. A localhost regression reproduces this in the socket adapter; fixing that layer alone still overflows the session queue.
The socket adapter now admits bursts within a 64 MiB ingress accounting budget and a 4,096-frame ceiling, preserving the 16 MiB individual-frame guard. The async session reader waits for its consumer instead of failing a second queue. Both streams take one frame at a time: Effect's batched queue drain would otherwise release byte accounting early and hide frames after a terminal event.
Actual overload remains a typed error and closes the connection. Cancellation and post-terminal data still poison it; no silent drops or automatic retries. The ingress budget is not a total process-memory bound.
How did you verify your code works?
On macOS arm64 with the repository's Bun 1.4.2:
Full AI suite: 1,404 passed, 28 skipped.
Core transport, real WebSocket, checkpoint and session-runner suites: 254 passed.
Both affected package typechecks, repository-wide lint, changed-file formatting and diff checks passed.
New tests cover a paused 1,024-frame localhost burst and connection reuse, byte/count overload, budget reclamation, exact/oversized frame limits, cancellation and trailing data after completion.
Full bun run check reaches unrelated workspace typechecks but cannot finish with this filtered dependency installation (@tsconfig/node22 missing in console-core). No manifest or lockfile changes. CI is still needed for the full workspace/platform matrix.
AI-assisted implementation and independent review.
The issue section already contains Closes #49523; this PR targets v2 as required by CONTRIBUTING.md. The needs:issue warning appears to come from the default-branch standards workflow checking only closingIssuesReferences, which is empty for this non-default target. The version of that workflow on v2 already has a PR-body fallback for exactly this case.
The test and check workflow runs are currently action_required with no jobs started. Could a maintainer approve the fork runs and clear the incorrect issue label? Local Bun 1.4.2 test/typecheck results and the full-workspace validation limitation are recorded in the PR body.
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
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.
Issue for this PR
Closes #49523
Type of change
What does this PR do?
A paused consumer receiving a burst of small WebSocket deltas fails at the 129th frame. A localhost regression reproduces this in the socket adapter; fixing that layer alone still overflows the session queue.
The socket adapter now admits bursts within a 64 MiB ingress accounting budget and a 4,096-frame ceiling, preserving the 16 MiB individual-frame guard. The async session reader waits for its consumer instead of failing a second queue. Both streams take one frame at a time: Effect's batched queue drain would otherwise release byte accounting early and hide frames after a terminal event.
Actual overload remains a typed error and closes the connection. Cancellation and post-terminal data still poison it; no silent drops or automatic retries. The ingress budget is not a total process-memory bound.
How did you verify your code works?
On macOS arm64 with the repository's Bun 1.4.2:
Full
bun run checkreaches unrelated workspace typechecks but cannot finish with this filtered dependency installation (@tsconfig/node22missing in console-core). No manifest or lockfile changes. CI is still needed for the full workspace/platform matrix.AI-assisted implementation and independent review.
Screenshots / recordings
Not applicable; transport behavior only.
Checklist