Skip to content

fix: windows 全量矩阵收尾挂起——三个受害 harness 补 closeAllConnections + 60s 超时,EBUSY 不再掩蔽真错 - #3526

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-17_win-teardown-hang
Oct 17, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-17_win-teardown-hang

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zhipuai-lb/glm-5.3)

Fixes #3525

改了什么

照搬 owner 今天在 aa56257 治 lane-decisions-matrix 的同一套既定模式,应用到今天全量矩阵里实际挂掉的三个文件:

  1. tests/pi-omp-fork-adopt.test.ts、tests/plugin-fork.test.ts、tests/plugin-bypass.test.ts:close 里追加 closeAllConnections?.()(强杀全部连接,收尾的 once(server,"close") 不再等一个空闲+unref 的 keep-alive socket 到天荒地老);挂 harness 的用例加 60s 超时,残余挂起以带栈超时浮出而非无声连坐。
  2. tests/persist-guard-ownership.test.ts:withMode 在 rmrf 抛 EBUSY 时不再把 fn 的真实错误顶掉(定时全量测试失败: 5fc5fea3 #3498 win22-1 实测:报出来的 EBUSY 是 9.6s 重试梯子耗尽后的收尾错,原始断言错被掩蔽)。
  3. src/storage/shadow.ts:close() 吞错处补一行 warn 日志——windows 句柄没关导致 EBUSY 时,CI 日志直接看到真因。

为什么只有全量矩阵红

挂起=收尾等 close 事件,而 keep-alive socket 空闲后被 undici unref,事件循环排空,runner 判定「promise 未决但循环已排空」→ 同文件整批 cancelledByParent(pi-omp-fork-adopt 9 连坐、plugin-fork 34 连坐、plugin-bypass 3 连坐,签名一致,重跑复现)。CORE 与全量的分片组合不同,普通 PR 的 CORE 矩阵跑不中这套文件组合,所以只有 ci:full / 定时跑暴露。完整机制与证据链见 #3525。

验证

  • 本地(linux):pi-omp-fork-adopt 22/22、plugin-bypass 2/2、persist-guard-ownership 8/8、plugin-fork 48/48,typecheck 干净。
  • 本 PR 打了 ci:full 标签——win22 三条腿 + win-node-24 就是今天挂掉的那套分片组合,全绿即收口(这是此类 windows 收尾问题唯一可复现的环境)。

风险面

  • 纯测试基建 + 一行日志;closeAllConnections 是 node≥18.2 的 http.Server API,与 aa56257 用法一致;不碰任何产品路径行为。

… the three victim harnesses

The cancelledByParent cascade class (pi-omp-fork-adopt 9x, plugin-fork 34x,
plugin-bypass 3x today): teardown awaits once(server,"close") while an
undici keep-alive socket (idle, unref'd) keeps the server closing forever —
the event loop drains and the runner force-cancels the whole file. Applies
the owner-sanctioned aa56257 pattern (closeAllConnections + 60s timeouts)
to the three files that actually hung, keeps withMode's rmrf EBUSY from
masking the real test error, and logs swallowed sidecar sqlite close failures.
@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Oct 17, 2026
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-17_win-teardown-hang (e558860)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4171-pr.3526.02f1f27

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr3526.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

验收通过 ✅ —— ci:full 全量矩阵在合并头 e55886022(本修复 + master@6dc41f63a,含 #3524 的 P0 zod 修复)全部跑绿:

验收面 结果
run 39018820451(ci.yml 全量,28 job) success
12 条 test 车道(ubuntu 22/24 ×3 + windows 22 ×3 + windows 24 ×3) 12/12 全绿 —— 今天挂的正是 win22 三条腿(pi-omp-fork-adopt / plugin-fork / plugin-bypass 所在分片),同组合现已全绿
static-gates ×4 + kernel/version/lane/pi-subagents 等守卫 全绿
dsh headless profile lane(合并头上,含 P0 修复) success —— #3518 上两轮红的正是它
e2e-native / e2e-pi-ws / registry success
合并头 check-runs 总账 50 success / 1 skipped / 0 failure

说明:期间两次 run 被 cancel 不是失败——master 在 08:42/08:49 合入 #3519/#3524 触发 synchronize,新 run 取代旧 run(正常并发取代);最终判定以合并头上的 39018820451 为准。

本地佐证:pi-omp-fork-adopt + plugin-bypass + persist-guard-ownership 32/32,plugin-fork 48/48(151s),typecheck 干净。

可以合并(合并不归我,按仓库规矩人工合)。

@ranxianglei
ranxianglei merged commit 3f513c2 into master Oct 17, 2026
51 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.531-master.3f513c2 (rolling master tag).

npm install -g billion-context@0.0.531-master.3f513c2  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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

Labels

ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

windows 全量矩阵整批连坐挂起:测试收尾在等一个永远不会关闭的 keep-alive 连接

1 participant