You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
InMemoryEventStore: standalone-stream resume broken by getStreamIdFromEventId split #2560
InMemoryEventStore.getStreamIdFromEventId derives the stream id with eventId.split('_')[0], which returns the empty string for any event id belonging to the standalone GET stream (its stream id _GET_stream starts with an underscore, so generated ids look like _GET_stream_<uuid>).
As a result, resuming the standalone stream with a Last-Event-ID never works with the shipped example store: replayEventsAfter replays nothing and returns '', and the transport registers the successor stream under the key '' instead of _GET_stream. All stored and future standalone notifications are then silently dropped while the client sits on a healthy-looking keep-alive'd stream.
Pre-existing (the id format and the split predate the keep-alive work). Fix is to derive the stream id from the last separator instead of the first, or to keep an explicit eventId-to-streamId map in the store. Affects the example store on both main and v1.x; regression tests built on this store also exercise the wrong key.
#943 describes the same root cause and is open with ready for work on it. Three PRs already fix it the way your second option suggests, by reading the stream id from the metadata the store already keeps for each event instead of parsing the event id:
fix: replay in-memory events for underscore stream ids #2044 against v1.x, patching src/examples/shared/inMemoryEventStore.ts, which is still the path there. It adds a regression test that stores two events on _GET_stream and asserts both the replayed stream id and the payloads.
None of the three has a review, and getStreamIdFromEventId on main still splits on the first underscore. If it helps, I can port the main side onto the moved path so there is one branch ready change per line.
Activity
ondraulehla commentedon Jul 27, 2026
#943 describes the same root cause and is open with
ready for workon it. Three PRs already fix it the way your second option suggests, by reading the stream id from the metadata the store already keeps for each event instead of parsing the event id:v1.x, patchingsrc/examples/shared/inMemoryEventStore.ts, which is still the path there. It adds a regression test that stores two events on_GET_streamand asserts both the replayed stream id and the payloads.main, near identical and from the same author, which also replace the eventId sort with insertion order. Both predate Implement MCP 2026-07-28 #2286, so they patchexamples/server/src/inMemoryEventStore.ts, and that file has since moved toexamples/shared/src/inMemoryEventStore.ts.None of the three has a review, and
getStreamIdFromEventIdonmainstill splits on the first underscore. If it helps, I can port themainside onto the moved path so there is one branch ready change per line.