fix: replay request SSE responses after disconnect - #2207
Conversation
🦋 Changeset detectedLatest commit: 9c54434 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
|
Added a changeset for @modelcontextprotocol/node and @modelcontextprotocol/server as patch releases. Validation for this follow-up: git diff --check; verified the changeset frontmatter and package names against packages/middleware/node/package.json and packages/server/package.json. The previous CI run was already green; this push only adds release metadata. |
a706b98 to
68a6acf
Compare
|
Rebased on current Validated locally:
The pre-push hook also completed the repo-wide build, typecheck, and lint steps successfully. |
|
Rebased onto current Focused validation after the rebase: Results:
Pushed with |
191d4be to
c797a34
Compare
c797a34 to
355c17e
Compare
|
Closing as superseded. #2286 (MCP 2026-07-28) landed the same store-first replay semantics this PR was after: request-related events are stored before any live-writer check, replayed on Last-Event-ID reconnect, with identity dedup against the resumed stream, plus the undeliverable-response onerror path for the no-eventStore case. Verified the current main test suite covers this PR's scenario directly ("accept Last-Event-ID reconnect after closeSSEStream() and replay stored events", plus the closeSSEStream and mid-flight disconnect store tests), so there is nothing left here that main does not already do. |
Summary
closeSSEStream()detaches the active controllerLast-Event-IDTo verify
pnpm --filter @modelcontextprotocol/node test -- streamableHttp.test.ts -t closeSSEpnpm --filter @modelcontextprotocol/server test -- streamableHttp.test.tspnpm --filter @modelcontextprotocol/server typecheckpnpm --filter @modelcontextprotocol/node typecheckpnpm --filter @modelcontextprotocol/server lintpnpm --filter @modelcontextprotocol/node lintpnpm --filter @modelcontextprotocol/server buildpnpm --filter @modelcontextprotocol/node buildgit diff --check