Skip to content

[PR] fix: parse summary SSE data fields as complete events - #6102

Closed
Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-10_summary-multiline-sse
Closed

Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-10_summary-multiline-sse

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Problem

Both the preflight summary extractor and external HTTP summary validator parse each data line independently as JSON. Valid SSE events may carry multiple data fields joined with LF; pretty-printed JSON therefore yields an empty summary or invalid-frame error and unnecessary fallback.

Changes

Group buffered events in the existing sse-util module and join data fields before either summary reader parses JSON. Preserve event-type scope, malformed-JSON rejection and existing framing/terminal contracts. WHATWG data-field semantics: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation

Validation

  • Before: preflight-sse-extraction and external-summary-http suites — 93 passed, 9 failed.
  • After: those suites plus preflight-responses-reasoning-extract — 112 passed, 0 failed; ten existing neighboring tests are included.
  • npm run typecheck — passed.
  • npm run build — passed.
  • Published fork tree 8d1843e598753ce86e6f2339ff4d4077885aa9e7 exactly matches tested local commit 77444538a01e6356a2d7c3a47c63f448e86c0b0e.

The full remote-suite verdict belongs to CI. #4 handles streaming splitters, #260 handles plugin event rewriting, and #1709 handles dangling DONE sentinels. These buffered summary readers still lacked multiline event grouping. All 3,221 historical PRs were screened; independent of #6046–#6055.

Pipeline E2E gate

The repository requires the real Codex four-phase suite before merging preflight changes. E2E_CHECK=1 ran the CLI/dist preflight here, but the default local upstream /models endpoint was unreachable and no E2E upstream credentials are configured. The four-phase test is not claimed as passed. Keep the existing ACP_TEST_E2E gate and run this required merge check with a working upstream; fork CI may skip the secret-dependent lane.

Closes #6101

@ranxianglei ranxianglei changed the title fix: parse summary SSE data fields as complete events [PR] fix: parse summary SSE data fields as complete events Nov 10, 2026
@Afloat16

Afloat16 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the rerun. Windows Node 22 shard 1, attempt 2 succeeded on 7ae67d6189de09bc6cd87ac34b49c8e69dde41a1 at 10:16 UTC. All 11 core test shards in run 42752780208 are now green. No code or test assertions were changed for the retry.

For the record, the original failure was the launcher test's elapsed-time assertion (2137 ms against a 2000 ms limit); its spawn and child assertions passed. The test uses injected spawn, health and sleep functions and does not exercise the summary SSE readers changed here. The same case passed in the #6084 control job on the same base with byte-identical launcher test/source files.

The real Codex four-phase E2E gate remains outstanding. Could the owner run it on this head with the repository's working upstream configuration and attach the result before merge? The core CI rerun does not cover that gate. Windows Node 24 coverage also still needs ci:full.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Done — verified and rerun.

What I checked. In run 42752780208 the only failing job is test (windows-latest, 22, 1) (job 129625909662); the other 26 jobs succeeded (and the downstream red-signal gate is skipped, as expected). The failing case is ensureProxyRunning: waiter bails early when the starter clears its marker (#707) in tests/launcher.test.ts:2645, whose assertion is a pure wall-clock check:

assert.ok(Date.now() - t0 < 2000, `early bail took ${Date.now() - t0}ms; must not burn the full wait window`);

The functional assertions immediately before it (spawnCalls === 1, handle.child truthy) passed, and the fixture injects fully-faked spawnImpl / fetchImpl / fetchHealthInfo / sleep (all resolve instantly). So the measured elapsed time is dominated by real marker-file disk I/O plus event-loop scheduling on a loaded Windows runner — a 137 ms overrun (2137 vs 2000) is squarely normal CI variance, not a logic failure.

Your diff confirms independence: PR #6102 touches only src/preflight.ts, src/external-summary-http.ts, src/sse-util.ts (+ two test files). It does not touch tests/launcher.test.ts, src/launcher.ts, or src/instance.ts. Nothing in the SSE-parsing change can influence a launcher wall-clock assertion.

Action taken. Triggered rerun-failed-jobs on the run — now attempt 2, re-running only the failed shard (new job 129763747608); the 26 successful jobs keep their cached results. It's in progress now (watch: https://github.com/ranxianglei/billion-context/actions/runs/42752780208); I'll confirm the final green/red when it lands.

Still needed before merge (separate from this). The real Codex four-phase E2E gate noted in your description requires a run against the repo's working upstream configuration — that's an owner-side action not covered by this shard rerun. Flagging so it isn't lost.

(Dedup: no separate issue/PR tracks this — it's a direct CI-rerun request on #6102 itself; per repo CI-coordination practice I'm not opening a new issue for a CI red.)


结构化八问(中文,供人工复核)

  1. 是什么问题:PR [PR] fix: parse summary SSE data fields as complete events #6102 的 CI 里只有一个分片红——Windows Node 22 shard 1 的一个 launcher 测试计时断言超时。
  2. 什么原因导致的:该测试 tests/launcher.test.ts:2645 的断言是纯墙钟计时(Date.now()-t0 < 2000);在负载偏高的 Windows runner 上,真实的 marker 文件磁盘 I/O + 事件循环调度把耗时拖到 2137ms、越过 2000ms 阈值。属时序抖动(timing flake),非代码缺陷;且它测的 launcher/instance 路径与本 PR 改的 SSE 解析零交集。
  3. 影响范围与严重程度:仅此一个分片、仅此一次运行;功能断言(spawnCalls===1、handle.child)全过,被测逻辑本身正确。严重度=体验瑕疵(CI 偶发红),非功能回归、不影响产物。
  4. 怎么修复的:未改任何代码(他人 PR 上的偶发 CI 红)。动作=先核验抖动成立,再用 GitHub Actions API 触发 rerun-failed-jobs(run attempt 2,只重跑失败的那个分片,其余 26 个成功 job 保留缓存结果)。
  5. 是否有回归问题:不涉及——本次无任何代码改动,未触碰任何既有行为。
  6. 是否破坏缓存:不涉及——仅重跑单个失败 job 并复用上游 artifact,不改任何缓存/重试/游标策略。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:本分片的偶发红已按「核验→重跑」处理,等 attempt 2 结果落地即闭环;合并前仍需 owner 侧用可用上游配置补一次真实 Codex 四阶段 E2E gate。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Re-verified live before touching anything — everything is already green. No code changes made this run, nothing pushed.

Live check state (mirror cache, fetched 2026-11-10 13:47 UTC, head 7ae67d6189de09bc6cd87ac34b49c8e69dde41a1 — identical to the head this event reported): 30/30 checks completed, 0 failed, 0 pending.

Specifically for the reported blocker test (windows-latest, 22, 1): the event cited job 129625909662, but that job has been superseded in the same run (42752780208) by a newer re-run of the same shard — job 129763747608 — which finished success. An earlier wake/re-run already fixed it; this event was reporting the stale failed attempt.

One observation, not a blocker: the branch is currently behind master (mergeable_state: behind) — normal drift, no merge conflict detected. Left as-is for the human merge.


结构化八问(中文)

  1. 是什么问题:系统事件报告本 PR 的 test (windows-latest, 22, 1) 检查失败,要求修复。
  2. 什么原因导致的:无需修——事件引用的是一个已被同一 run 内更新的 job 取代的旧失败尝试;该分片的新一次运行(job 129763747608)已成功,失败是历史残留状态。
  3. 影响范围与严重程度:无实际影响——同一 head sha(7ae67d6189)下全部 30 项检查均为绿色(0 失败、0 待跑);仅事件通知滞后于实际状态。
  4. 怎么修复的:本轮未做任何修复或推送;按车道规则「先复核实时状态」,确认已全绿后以一条确认评论收工。
  5. 是否有回归问题:不涉及——未改动任何代码。
  6. 是否破坏缓存:不涉及——无代码/配置变更。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

结论:CI 已全绿,本轮无动作,收工。 分支落后 master(非冲突),留待人工合并时处理。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner

Landed via batch PR #6439 (merged) — closing as superseded.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Acknowledged — CI lane for this PR is done: all 30 checks were green on the final head 7ae67d6189 (verified live last run), and no fixes are pending from this lane. Nothing further to do here; the close is yours to execute.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Verified live — this PR's work is already in master, so there's nothing left to do from this lane. No new/parallel PR opened, nothing pushed.

Live state (checked via git, not just the thread):

So the SSE buffered-event fix shipped through the merged batch, superseding #6102. The flaky Windows-shard rerun I triggered earlier (attempt 2 → green, 0/28 failures) is now moot — the change went in via the batch regardless, and that run is green anyway. The description's "four-phase E2E gate still needs a working upstream" note is likewise moot: the change already shipped.

No further action needed from this lane; the owner's "closing as superseded" is correct.


结构化八问(中文,供人工复核)

  1. 是什么问题:本 PR(SSE 多 data 字段按完整事件解析)需要处置;但实际已被 owner 的批量 PR 覆盖。
  2. 什么原因导致的:owner 于 2026-11-12 用批量 PR [PR] chore(batch): land 50 open Afloat16 fixes in one history-preserving batch #6439(一次性合并 50 个 Afloat16 修复)落地了本改动,[PR] fix: parse summary SSE data fields as complete events #6102 作为被取代项关闭(未直接合并)。
  3. 影响范围与严重程度:无——改动已在 master(src/sse-util.ts 的 bufferedSseEvents 已存在且与本 PR 逐字一致,[PR] chore(batch): land 50 open Afloat16 fixes in one history-preserving batch #6439 合并提交 873715d 已确认是 master 祖先);无待办、无回归面。
  4. 怎么修复的:本轮未改任何代码、未开新 PR;动作=用 git 核验实时状态([PR] fix: parse summary SSE data fields as complete events #6102 已关闭、[PR] chore(batch): land 50 open Afloat16 fixes in one history-preserving batch #6439 已合并、改动已在 master),确认后收工。
  5. 是否有回归问题:不涉及——本轮无代码改动;改动本身已随 [PR] chore(batch): land 50 open Afloat16 fixes in one history-preserving batch #6439 合入并受其 CI 覆盖。
  6. 是否破坏缓存:不涉及——无代码/配置变更。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:本线程已被 #6439 取代并落地 master,owner 关闭 #6102 正确;本车道无后续动作,收工。

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Summary readers reject valid SSE events whose JSON spans multiple data fields

2 participants