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
readSseChunks accumulates data: fields line-by-line while reading a stream, but when the stream ends without its final blank event delimiter it treats the remaining buffer as one line. A valid multi-line SSE event at EOF therefore reaches JSON.parse with the literal second data: prefix and fails.
Minimal reproduction: a one-chunk ReadableStream ending in two data: lines that form one JSON document, without a trailing blank line. The delimited equivalent is accepted.
Scope: make EOF processing use the same line handling as normal stream parsing, add a focused regression for the unterminated multi-line event, and preserve the existing timeout/cancellation behavior.
I am taking this focused parser fix. I will reproduce the unterminated multi-line EOF case against the provider stream fixture, preserve normal delimiter, timeout, and cancellation behavior, and keep the change limited to SSE tail processing plus regression coverage.
Activity
outlier27-cell commentedon Oct 14, 2026
I am taking this focused parser fix. I will reproduce the unterminated multi-line EOF case against the provider stream fixture, preserve normal delimiter, timeout, and cancellation behavior, and keep the change limited to SSE tail processing plus regression coverage.