Skip to content

fix: resume in-memory event streams with underscored ids#1984

Open
Genmin wants to merge 2 commits intomodelcontextprotocol:mainfrom
Genmin:fix/in-memory-event-store-underscore-streams
Open

fix: resume in-memory event streams with underscored ids#1984
Genmin wants to merge 2 commits intomodelcontextprotocol:mainfrom
Genmin:fix/in-memory-event-store-underscore-streams

Conversation

@Genmin
Copy link
Copy Markdown

@Genmin Genmin commented Apr 29, 2026

Summary

  • stop deriving the in-memory event store stream id by splitting event ids on underscores
  • look up the stored stream id directly so the standalone SSE stream id _GET_stream can resume correctly
  • add a regression test that stores two _GET_stream events and verifies replay after the first event returns the original stream id and sends the second event

Fixes #943.

Validation

  • pnpm --filter @modelcontextprotocol/server test -- test/integration/test/taskResumability.test.ts -t "standalone SSE stream IDs"
  • pnpm --filter @modelcontextprotocol/test-integration test -- test/taskResumability.test.ts -t "standalone SSE stream IDs"
  • pnpm --filter @modelcontextprotocol/examples-server typecheck
  • pnpm --filter @modelcontextprotocol/examples-server lint
  • pnpm --filter @modelcontextprotocol/test-integration lint
  • pre-push: full typecheck:all, build:all, and lint:all

@Genmin Genmin requested a review from a team as a code owner April 29, 2026 23:41
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

🦋 Changeset detected

Latest commit: 991ad4a

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

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 29, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@1984

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@1984

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@1984

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@1984

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@1984

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@1984

commit: 991ad4a

@Genmin Genmin force-pushed the fix/in-memory-event-store-underscore-streams branch from 8547223 to 3c4709e Compare April 29, 2026 23:59
@Genmin
Copy link
Copy Markdown
Author

Genmin commented Apr 30, 2026

Added the missing patch changeset for the touched example/integration packages. The previous red test was isolated to the unrelated Miniflare Cloudflare Worker Network connection lost failure, so this should at least clear the release-metadata blocker and trigger a fresh run.

@Genmin Genmin force-pushed the fix/in-memory-event-store-underscore-streams branch from 3753b16 to 991ad4a Compare April 30, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The bug in InMemoryEventStore break SSE stream resumability

1 participant