Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#103 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #188 di @dezlitz — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
networking

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
11h 21m
PR unite (30g)
41

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperdrive-technology/holodeck

Tutte le issue di hyperdrive-technology/holodeck

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.