Skip to content

test: cover socket replies after abandoning a buffered RPC stream - #8739

Closed
tim-smart wants to merge 1 commit into
mainfrom
agent/bob/8bc9e937cad8
Closed

tim-smart wants to merge 1 commit into
mainfrom
agent/bob/8bc9e937cad8

Conversation

@tim-smart

Copy link
Copy Markdown
Contributor

Summary

Add socket-level regression coverage for #8724 in packages/effect/test/rpc/RpcClient.test.ts. The test uses the real makeProtocolSocket with an in-memory transport, fills the stream buffer with a chunk larger than its capacity, interrupts the consumer, and checks that a subsequent unary reply arrives.

The implementation is already fixed on main by #8648 (0b52bb42fac5aecb8bcb8d899293c641b62c3f66). The stream finalizer calls Queue.shutdownUnsafe(queue) before deleting the stream entry and sending Interrupt. This releases the pending queue offer so the socket reader can continue. This PR adds coverage only; it does not duplicate that fix.

Validation

Completed for the existing test commit before publishing this PR:

  • Current main plus the regression: all 16 RpcClient tests pass.
  • pnpm lint-fix and pnpm check pass. Commands ran through nix develop -c.
  • The same regression against 42e5750f7e, the parent of the existing fix, fails with TimeoutError: Operation timed out after '1s' while waiting for the unary reply. The historical failure confirms coverage of the reported socket-reader stall.

Closes EFF-1702
Closes #8724

@changeset-bot

changeset-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9b5a83b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@effect-janitor effect-janitor Bot added the 4.0 label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 38.90 KB 38.90 KB 0.00 KB (0.00%)
basic.ts 7.04 KB 7.04 KB 0.00 KB (0.00%)
batching.ts 10.13 KB 10.13 KB 0.00 KB (0.00%)
brand.ts 6.72 KB 6.72 KB 0.00 KB (0.00%)
cache.ts 10.88 KB 10.88 KB 0.00 KB (0.00%)
config.ts 22.15 KB 22.15 KB 0.00 KB (0.00%)
differ.ts 21.29 KB 21.29 KB 0.00 KB (0.00%)
http-client.ts 22.43 KB 22.43 KB 0.00 KB (0.00%)
http-router.ts 33.74 KB 33.74 KB 0.00 KB (0.00%)
logger.ts 11.08 KB 11.08 KB 0.00 KB (0.00%)
metric.ts 9.02 KB 9.02 KB 0.00 KB (0.00%)
optic.ts 6.95 KB 6.95 KB 0.00 KB (0.00%)
pubsub.ts 15.16 KB 15.16 KB 0.00 KB (0.00%)
queue.ts 12.08 KB 12.08 KB 0.00 KB (0.00%)
schedule.ts 11.18 KB 11.18 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 13.73 KB 13.73 KB 0.00 KB (0.00%)
schema-binary.ts 39.95 KB 39.95 KB 0.00 KB (0.00%)
schema-class.ts 21.03 KB 21.03 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 32.06 KB 32.06 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 27.24 KB 27.24 KB 0.00 KB (0.00%)
schema-string-transformation.ts 14.46 KB 14.46 KB 0.00 KB (0.00%)
schema-string.ts 11.99 KB 11.99 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.05 KB 16.05 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 38.44 KB 38.44 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 25.26 KB 25.26 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 20.21 KB 20.21 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 20.41 KB 20.41 KB 0.00 KB (0.00%)
schema-toFormatter.ts 20.54 KB 20.54 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 25.00 KB 25.00 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 20.50 KB 20.50 KB 0.00 KB (0.00%)
schema.ts 20.25 KB 20.25 KB 0.00 KB (0.00%)
stm.ts 13.08 KB 13.08 KB 0.00 KB (0.00%)
stream.ts 9.98 KB 9.98 KB 0.00 KB (0.00%)

@tim-smart tim-smart closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RpcClient: closing a stream with a full buffer stalls the socket reader

1 participant