Skip to content

fix(antigravity): parse unterminated multi-line SSE events #784

Open

Description

@outlier27-cell

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.

Activity

  1. outlier27-cell commented on Oct 14, 2026

    @outlier27-cell
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions