Skip to content

Cap RPC streaming decoder buffers - #6803

Merged
tim-smart merged 3 commits into
v3from
agent/codex-engineer/722a6ca7
Jul 31, 2026
Merged

Cap RPC streaming decoder buffers#6803
tim-smart merged 3 commits into
v3from
agent/codex-engineer/722a6ca7

Conversation

@tim-smart

Copy link
Copy Markdown
Contributor

Summary

  • cap retained NDJSON and MessagePack decoder buffers with a 16 MiB default
  • expose configurable limits and an explicit "unbounded" opt-out, including layer constructors
  • propagate the NDJSON cap through NDJSON-RPC framing
  • close socket transports with code 1009 when the typed buffer overflow error is raised
  • add regression coverage and a patch changeset for @effect/rpc

Why

Incomplete MessagePack frames and newline-free NDJSON streams could retain and repeatedly grow per-connection parser state without a bound. The configurable cap limits that retained state while allowing applications with legitimate large frames to raise or disable the limit.

Validation

  • pnpm test run packages/rpc/test/RpcSerialization.test.ts
  • pnpm lint-fix
  • pnpm check
  • pnpm build
  • pnpm docgen

Closes EFF-259

@pullfrog

pullfrog Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Run failed. View the logs →

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cfe446b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@effect/rpc Patch
@effect/platform-node Patch
@effect/platform-bun Patch

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

@effect-slopcop effect-slopcop Bot added 3.0 Used for issues, pull requests, etc. that are relevant for the `v3` branch targeting Effect v3. bug Something isn't working labels Jul 31, 2026
Comment thread packages/rpc/src/RpcSerialization.ts Outdated
Comment thread packages/rpc/src/RpcServer.ts Outdated
@tim-smart
tim-smart merged commit 9c4d4b5 into v3 Jul 31, 2026
9 checks passed
@tim-smart
tim-smart deleted the agent/codex-engineer/722a6ca7 branch July 31, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0 Used for issues, pull requests, etc. that are relevant for the `v3` branch targeting Effect v3. bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant