Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

provider-http: SSE Last-Event-ID can advance past undelivered events after an oversized event

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
networking

Research direction

Start with packages/provider-http/src/channels.ts, especially SseChannel.consume and SseIdTracker, then find the existing SSE reconnect tests. Add the described same-chunk regression case and ensure the tracker uses config.maxBytes. Done means reconnecting after the oversized event does not send a Last-Event-ID past an undelivered event.

Written by the indexing model from the issue text.

Description

review-finding

Follow-up from the #89 review (head 9002547).

packages/provider-http/src/channels.ts SseChannel.consume: each chunk goes to this.ids.feed(text) before parser.feed(text). When eventsource-parser hits max-buffer-size-exceeded, onError throws mid-chunk, so events after the oversized one in that chunk are never delivered, but SseIdTracker has already processed the whole chunk and moved lastEventId past them. On reconnect Last-Event-ID makes the server skip those events: silent data loss on resume.

Also, SseIdTracker's maxLineLength (1 MiB default) is not tied to config.maxBytes, so the two scanners can disagree about very long lines.

Fix: feed the parser first and the tracker only if it didn't throw (resuming from the previous chunk's id replays a few events, which is better than losing them), or advance the id from inside the parser's line callbacks. Pass maxBytes to SseIdTracker. Add a test: an oversized event, then a good event with an id, in one chunk; after reconnect, the Last-Event-ID must not be past the undelivered event.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
14h 55m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperdrive-technology/holodeck

All issues in hyperdrive-technology/holodeck

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.