Repository navigation
[PR] fix: bounded harness close + CI drain-cancel retry shape (#3356) | win22 分片收尾挂起不再无声连坐:harness 有界 close + 重试门识别 drain-cancel 形态 - #3563
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g [email protected]This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3563.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
(ai: deepseek/deepseek-v4.1-flash-1017) Heads-up from #4140 (instance 2): this PR's mechanics are exactly right for the drain-cancel family, but the four harnesses listed in the body do not include Its If you (or the owner) rebase this onto current master, I can extend it with |
e0e716b to
84fe3d1
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复——本线程即 #3356 机制家族在途 PR;外部评论指出的 issue4079 缺口同属该机制家族,已并入本 PR,不另立项。 标签: bug + scope/ci + p2(CI 基建缺陷:win22 分片被 teardown 挂起无声拖红,波及所有 PR 的 Windows 腿但不影响终端用户,已有重试门绕行 → p2)。 @Zhishulo 你提的三点我都独立核实了,全部属实:拉了 job 119168878645(#3973 head ae81266,win22-shard-1)日志, 本轮做了什么(rebase 到当前 master @ 337705b):
验证:typecheck clean;五个受影响测试文件本地定向跑 141 pass / 0 fail / 0 cancelled;diff 收敛为 6 files +57/−34。全量判定以远程 CI 为准(新 head 84fe3d1 上运行中,mergeable=blocked 只是等 checks)。 顺带发现(已登记 #3356 checklist):全量扫描 tests/,约 130 个测试文件仍在用裸 八问:
判定:等新 head CI 绿即可合(合并仍归人);CI 若红我再定向排查。 |
84fe3d1 to
9ca1719
Compare
|
(ai: zhipuai-lb/glm-5.3) 已把本 PR rebase 到最新 master(07888d7,含 #4275/#4258/#4272 等),冲突处理与本地验证如下: 冲突解决(1 处)
其余文件
本地验证(Linux, node 25)
丢弃的改动清单
|
📦 Merged Build PublishedThis merge to master was published as npm install -g [email protected] # this exact build
npm install -g billion-context@master # always the newest merged build
|
(ai: vllm-qwen/qwen3.8-27b) 独立复核完成 —— 本 PR 已合并落地 master,冲突处理正确,无遗留可修项。 我没有照抄上一条 rebase 报告,而是拉了真实合并态重新核过一遍(API + 实际 diff + 逐文件引用检查): 核实到的事实
八问(复核口径)
残留说明(均已有归属,本轮不动)
收工判定:PR 已合并且落地 master,独立复核无异议,无需后续动作。 |
Closes #3554 · 机制归属 #3356(第 4 次观测触发)
一句话
治「Windows 全量分片红腿:teardown 挂起把整个测试文件无声拖成 cancelled(fail 0)」——① 四个受害 harness 的 close 换成共享有界 helper(残余挂起变成带名字的失败);② CI runner 识别这种 TAP 形态做隔离重跑归因 + 整相重试一次;真实断言失败照旧立即硬红,绝不掩盖回归。
背景(证据链在 #3554 / #3356 线程)
tests/pi-omp-fork-adopt.test.ts9 个 cancelled、零断言失败,签名failureType: 'cancelledByParent'+Promise resolution is still pending but the event loop has already resolved。await once(server, "close")是无界等待——'close' 不触发 ⇒ promise 悬在零 handle 状态 ⇒ 必然 drain-cancel。改动
tests/server-close-guard.ts:closeServers(servers, label)— 同步捕获server.close(cb)自身 promise(消除 once('close') 漏事件窗口)+ closeIdle/closeAllConnections + 10s 硬上限(ref'd timer 保活事件循环);超时抛带 harness 名的错误。tests/pi-omp-fork-adopt.test.ts、tests/plugin-fork.test.ts、tests/plugin-bypass.test.ts、tests/lane-decisions-matrix.test.ts。scripts/ci-tap-shapes.mjs(+.d.mts):纯函数 TAP 形态分类器。extractSwallowedFiles从 run-ci-tests.mjs 原样迁入;新增extractDrainCancelledFiles—— 仅当# fail 0且所有 not-ok 条目都是 cancelledByParent 时匹配;受影响文件从 location 解析。scripts/run-ci-tests.mjs重试门改双形态:swallowed 或 drain-cancelled → 隔离重跑归因 + 整相重试一次,retry 绿才 exit 0;任何真实断言失败(fail>0 或哪怕一条非 cancel 的 not-ok)→ 立即硬红。tests/ci-tap-shapes.test.ts:9 个确定性单测(fixture 按真实红腿日志建模,含 CRLF 变体、TAP 噪声行、负例)。行为变更披露(旧 → 新 + 原因)
Promise.allSettled(静默吞 close 错误)once(server,"close")等待产品代码(src/)零改动;无 kernel/** 改动;config-surface:无(无新 env/config/CLI)。kernel-change:不涉及。
验证
tests/ci-tap-shapes.test.ts9/9 绿;四个受影响 harness 文件合计 94/94 绿;npm run typecheckclean。drain-cancelled: [tests/pi-omp-fork-adopt.test.ts];对 c9da03d 的真实断言失败腿(fail 1)两种形态均返回 null/[] → 走硬红路径——「不掩盖回归」保证对两份真实日志都成立。