Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fetch: SSE ping comments silently drop data in the same chunk

Đang mở Phù hợp với người mới
#13,347 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@fhgffy đang làm issue này rồi.

Từ ngày 5/10/2026.

  • #13348 của @fhgffy — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu với streamSse trong packages/fetch/src/stream.ts và theo dõi cách nó xử lý các dòng được lưu trong bộ đệm, sau đó tìm các bài kiểm tra luồng SSE hiện có và chạy chúng. Bổ sung kiểm thử hồi quy cho các bình luận ping ở đầu và xen kẽ, bao gồm cả ranh giới giữa các chunk; hoàn tất khi cả hai sự kiện dữ liệu được phát ra mà không có lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

streamSse still treats : ping as a completion signal. When a heartbeat and the following data events arrive in the same chunk, the line-draining loop stops and the remaining events can be dropped silently at EOF.

I reproduced this on current main (5522c6f44ca0) with a local Node HTTP server and the actual packages/fetch/src/stream.ts implementation:

: ping

data: {"text":"hello"}

data: {"text":"world"}

Expected: both data objects are yielded. Actual: no objects and no error. Putting the heartbeat between the objects yields only hello. Replacing it with : heartbeat, or removing it, yields both objects.

SSE lines starting with : are comments, so the heartbeat should be ignored while the existing buffer continues to drain. The HTML standard describes this rule.

This was previously addressed in #13187. The author withdrew that PR while consolidating contributions and explicitly invited reopening or cherry-picking the fix; it was not merged. I would like to carry the focused fix forward with regression coverage for leading and interleaved heartbeats and chunk boundaries. The proposed change only removes the special completion handling for : ping, letting it follow the existing ignored-line path.

Environment
  • Windows amd64
  • Node.js 24.14.0
  • Current repository source, local HTTP only; no model or external provider calls
Ngôn ngữ chính
TypeScript
Star
36.1k
Fork
5.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của continuedev/continue

Tất cả issue của continuedev/continue

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.