Skip to content

[SEP-2575][SEP-2567] 2026-06 stateless support: stdio + InMemory transports - #2132

Closed
felixweinberger wants to merge 3 commits into
fweinberger/v2-http-statelessfrom
fweinberger/v2-pipe-transports
Closed

[SEP-2575][SEP-2567] 2026-06 stateless support: stdio + InMemory transports#2132
felixweinberger wants to merge 3 commits into
fweinberger/v2-http-statelessfrom
fweinberger/v2-pipe-transports

test: 189 LegacyTestClient migrations + InMemory acceptance scenarios

92f410a
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed May 21, 2026 in 12m 38s

Code review found 4 potential issues

Found 5 candidates, confirmed 4. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 3
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/integration/test/server.test.ts:26 Dead Client import left after LegacyTestClient migration
🟡 Nit packages/core/src/shared/serverStatelessRouter.ts:86-94 listenErrorResponse drops ProtocolError.data; sibling HTTP listen catch not updated
🟡 Nit packages/core/src/shared/serverStatelessRouter.ts:81-84 dispatch branch in handleOne writes nothing to the pipe on rejection

Annotations

Check warning on line 26 in test/integration/test/server.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Dead Client import left after LegacyTestClient migration

After every `new Client(...)` here was migrated to `new LegacyTestClient(...)`, the `Client` import on line 2 is now dead — but the file-level `/* eslint-disable @typescript-eslint/no-unused-vars */` on line 1 silently masks the unused-import warning. Drop `Client` from the import (as this PR already did in `client/client.test.ts`, and via `import type` in `elicitation.test.ts`/`mcp.test.ts`).

Check warning on line 94 in packages/core/src/shared/serverStatelessRouter.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

listenErrorResponse drops ProtocolError.data; sibling HTTP listen catch not updated

listenErrorResponse() drops the public `error.data` field when handling a `ProtocolError`, so structured data (e.g. `requiredCapabilities` on a `MissingRequiredClientCapability` error from a custom `SubscriptionBackend`) is lost over pipe transports while the dispatcher's own catch (dispatcher.ts:184-189) preserves it. Fix is one line: pass `error.data` as the 4th `errorResponse()` arg. Also note: the sibling HTTP listen catch in `statelessHttp.ts:153-160` (flagged in the prior review and replie

Check warning on line 84 in packages/core/src/shared/serverStatelessRouter.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

dispatch branch in handleOne writes nothing to the pipe on rejection

The non-listen `else` branch of `handleOne()` awaits `handlers.dispatch()` with no try/catch — if it rejects, the rejection only reaches `routeServerStateless()`'s `.catch(onerror)` and nothing is written to the pipe, so the client's `StreamDriver` iterator hangs until the 60s default timeout. This is the same shape just fixed for the listen branch in 20488ddb (and defensively guarded in the SSE path via `controller.error()` in `statelessHttp.ts`); wrap the await in try/catch and write `errorRes