Skip to content

[PR] fix(ci): make master green again — build kernel for the mysql lane + bounded retry for the EBUSY teardown flake - #4350

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-23_master-ci-green
Oct 23, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-23_master-ci-green

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zhipuai-lb/glm-5.3)

这是啥:master 的 CI 现在有两类红,各修一个 commit:

  1. mysql-contract 必红(确定性回归,master mysql-contract lane red: #4177's store→runtime-status chain pulled acp-kernel runtime imports into the storage co | master mysql-contract 车道红:#4177 的 store→runtime-status 链把 acp-kernel 运行时 import 带进了 storage 契约测试,job 没构建 kernel #4336):自 [PR] storage: durability trio — open-time quick_check + online VACUUM INTO backup + second-process lockfile (#4175) #4177 起 storage 套件在运行期传递依赖 acp-kernel 的构建产物(store.ts → runtime-status → knobs → config,tsx 解析到 dist),新 runner 上没构建过 kernel 就直接 ERR_MODULE_NOT_FOUND。修复:在跑套件前加 npm --prefix kernel run build,与主测试矩阵的前置步骤对齐。改动与 [PR] ci: register tests/storage-durability.test.ts in LIVE_FILES (#4333) #4334 的 commit 2 逐字相同。

  2. test (windows-latest, 22, 1) 随机红(windows-22-1 lane randomly red: during test cleanup, unlink index.db hit an EBUSY external lock, couldn't survive tmp-rm | windows-22-1 车道随机红:测试清理期 unlink index.db 遇 EBUSY 外部锁,熬不过 tmp-rm 的 9.6 秒重试梯子(#2799/#2908 族复发) #4347,Windows CI: storage-engine-proofs 套件清理 temp 目录遇 EBUSY/EPERM,windows test leg 随机红 #2799/test(windows): driveWire golden-harness 清理期 index.db EBUSY 复发(#2799 族,#2808 后残留) #2908 族复发):Windows AV/索引器短暂锁住刚写完的 index.db,熬不过 tests/tmp-rm.ts 的 9.6 秒重试梯子,两条 corrupt-db 测试以 EBUSY: resource busy or locked, unlink ... 失败。24 小时内两次(PR [PR] ci: register tests/storage-durability.test.ts in LIVE_FILES (#4333) #4334 头 job + master 9e2d217,逐字节同签名,与各自 PR 的改动无关)。分类器把 EBUSY 判为 concrete → 直接红不重试,任何 PR 撞上都白挂一轮。

    修复:在 CI flake:test (windows-latest, 24) 单文件文件级失败:子测试零执行、异常被吞为 'test failed' #3029(静默死亡)/Flaky Windows CI: issue1993-preflight-400 suite cancelled by early event-loop drain | Windows CI 偶发假红:preflight-400 测试进程提前退出致 5 例取消 #3665(事件循环排空)之外加第三种可恢复形状 cleanup-lock——当所有失败子测试的报错都是 rimraf 清理栈上的瞬态锁(errno ∈ tmp-rm 自认可重试的 {EBUSY,EPERM,EACCES,ENOTEMPTY,EMFILE} + unlink/rmdir)时,整个分片有界重试一次,重试全绿才放行。

    不掩盖真回归的保证:确定性失败(比如真实句柄泄漏)会在重试上复现并照常失败;裸的用户代码 unlinkSync EBUSY(栈无 rimraf 帧)不满足形状,保持 concrete 不重试;重试复现锁时消息会点名「可能是句柄泄漏,先按泄漏查」。

验证:

Supersedes #4334:其 commit 1(LIVE_FILES 登记)已由 master 133cdd2 覆盖(字母序中插若现在合并会与 master 产生重复条目);其 commit 2 即本 PR 第一个 commit。#4334 可关闭。

config surface:无——只动 CI workflow、CI runner 脚本与测试,不新增/变更任何用户可见配置。

Fixes #4347

ework-agent added 2 commits October 23, 2026 09:42
Since #4177 the storage suites transitively import acp-kernel at runtime
(store.ts -> runtime-status -> knobs -> config); tsx resolves it to the
built dist, so the mysql-contract job dies with ERR_MODULE_NOT_FOUND on a
fresh runner. Same prerequisite the main test matrix already has via
run-ci-tests' pretest step. Cherry-picked from #4334.
Fixes #4347. The windows-22-1 lane hit the #2799/#2908 EBUSY family twice
in 24h (PR #4334 head job + master 9e2d217, byte-identical signatures):
Windows AV/indexer briefly locks a freshly-written index.db past
tests/tmp-rm.ts' ~9.6s retry ladder, failing the two corrupt-index.db
tests with 'EBUSY: resource busy or locked, unlink ...'. The classifier
judged that concrete -> red, no retry, blocking unrelated PRs.

Adds a third recoverable shape 'cleanup-lock' beside #3029 (swallowed
deaths) and #3665 (event-loop drain): when EVERY failing subtest carries
a transient-lock errno on an unlink/rmdir through a rimraf teardown
stack, retry the whole shard once and exit 0 only if the retry is green.
A deterministic lock (a genuine handle leak) reproduces on the retry and
still fails, so no regression can be masked; a raw user-code unlinkSync
EBUSY (no rimraf frames) stays concrete and unretried. Both real failed
logs classify cleanup-lock; the real #4336 regression log stays
concrete. Unit coverage asserts both directions (#3617).
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-23_master-ci-green (d29ac59)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.5161-pr.4350.ab2ec8c

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-pr4350.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei
ranxianglei merged commit 0ad3066 into master Oct 23, 2026
40 of 41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.742-master.0ad3066 (rolling master tag).

npm install -g billion-context@0.0.742-master.0ad3066  # 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

None yet

Projects

None yet

1 participant