Repository navigation
[PR] Add regression test: SQLite engine bootstrap reports failed+cooldown when a downloaded engine won't register - #3930
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4744-pr.3930.0502ea5This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3930.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— #3930 是 #3929(缺失回归测试)的唯一实现;open/closed issue 与 PR 检索均无其他条目为这条路径补测试。 标签: scope/storage + p3(SQLite 统一存储自举的回归测试缺口,纯测试新增,当前无外部影响)。 这是带 ework-agent-pr 标记的既有 agent PR,没有重做——拉分支核对了代码、独立审了方向与回归面、本地做了定向验证。 ① 原 issue(#3929)方向关: 方向正确。修复 commit 11e5bda(+10/-1, ② 回归审查: diff 只动 ④ 测试有效性(有牙,实测): 我把 11e5bda 的修复 hunk 临时还原成修复前形态跑新测试,它立即在第一断言挂掉: 验证:
结构化八问:
判定: 代码审查层面可合(纯测试新增、diff 干净、测试有牙、base 无滞后);等远程 CI 全量绿后收工。 |
1813157 to
973df8c
Compare
… flake, #1646/#3720 family) Incidental CI-red fix for #3930: the test(windows-latest, node 22, shard 1) lane of the rebased head failed in tests/issue3399-cross-route-load.test.ts teardown with ENOTEMPTY on the bare recursive rmSync - a leftover holdout from the tmp-rm sweep (#1646/#1915/#3721). Unrelated to the bootstrap regression test added by this PR, which passed on the same lane.
(ai: vllm-qwen/qwen3.8-27b) CI 跟进(第一轮回复后): rebase: 审查期间 master 前进了(#3927 archive-jsonl、#3903 dsh-compression-protocol 合入,18 文件 +580/-38,与本 PR 零文件重叠)。分支已 rebase 到新 master(新 head 与我的本地 rebase 逐字节同树,已核对)。 CI 红了一条 lane,根因与本 PR 无关,已顺手修掉:
状态: 修复 commit 已推( |
(ai: vllm-qwen/qwen3.8-27b) CI 小插曲(透明记录): |
d2cb1e5 to
8679ada
Compare
… flake, #1646/#3720 family) Incidental CI-red fix for #3930: the test(windows-latest, node 22, shard 1) lane of the rebased head failed in tests/issue3399-cross-route-load.test.ts teardown with ENOTEMPTY on the bare recursive rmSync - a leftover holdout from the tmp-rm sweep (#1646/#1915/#3721). Unrelated to the bootstrap regression test added by this PR, which passed on the same lane.
(ai: vllm-qwen/qwen3.8-27b) 已 rebase 到最新 master 并重新推送,等远程 CI。 状态更新: 本轮做了什么
master 侧的两个变化影响本轮 CI 判断
上一轮另外两条失败是纯 runner 环境噪声(日志流中断于行中、无 TAP 汇总、同批兄弟 shard 全部正常),本轮全新运行自然重跑。 等新 head 的 CI 全量结果出来,给最终结论(八问体例)。 |
11e5bda (#3818 review) made a download that succeeds but fails to register report 'failed' + arm the cooldown instead of a lying 'downloaded', but shipped no regression test. Add one: a tarball whose bytes pass sha512 and extract cleanly but whose lib/index.js throws on require must yield status 'failed' with detail 'post-download registration failed', write the cooldown marker, and gate the next boot on 'cooldown' with zero re-downloads.
… flake, #1646/#3720 family) Incidental CI-red fix for #3930: the test(windows-latest, node 22, shard 1) lane of the rebased head failed in tests/issue3399-cross-route-load.test.ts teardown with ENOTEMPTY on the bare recursive rmSync - a leftover holdout from the tmp-rm sweep (#1646/#1915/#3721). Unrelated to the bootstrap regression test added by this PR, which passed on the same lane.
…#3963 follow-up) EngineBootstrapSpec gained the required minNodeMajor field when the node floor gate landed; the fake 13.0.3 tarball spec now declares 22.
8679ada to
ce61b00
Compare
…#3619 hermeticity) The forced path passes the update-policy gate, which fetches the remote policy document. The test's fetch stub rejected that URL and the count assertion (2) never included it, so the case only passed when some earlier state suppressed the fetch — #3963's new test files rebalanced the CI shards and exposed it. Mock an empty (all-defaults) policy doc and expect policy + packument + tarball = 3.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.676-master.e01238e # this exact build
npm install -g billion-context@master # always the newest merged build
|
What & why
While verifying the bootstrap hardening cited in #3788 (mirror fallback, unloadable-cache retry, honest registration failure), I found the third one — commit 11e5bda, "download ok but registration fails →
failed+ cooldown instead of a lyingdownloaded"(src/storage/engine-bootstrap.ts:265) — has no regression test: the commit touched only engine-bootstrap.ts (+10/-1), and tests/storage-engine-bootstrap.test.ts covers every adjacent path (unloadable-cache retry #3135-5, sha512 quarantine, mirror fallback/exhaustion, timeout budget) except this one.If this path regressed, the panel/status wire would show bootstrap=
downloadedwhile no engine is actually loadable — users would believe unified storage is ready while silently running legacy-only, exactly the blind spot behind #3788-style reports.Change
One hermetic test in tests/storage-engine-bootstrap.test.ts: serves a tarball whose bytes pass the pinned sha512 and extract cleanly but whose lib/index.js throws on require, then asserts:
failed, detail =post-download registration failedcooldownwith zero re-downloads (the Storage Subsystem Wrap-up Checklist (#3130 Review): Dropping the last tick upon self-disable; BILI_PERSIST=0 falsely triggering a "Storage Degraded" banner; storageMode stamp mismatched with the actual enabled mode; and 3 more (6 items total) | 存储子系统收尾清单… #3135-5 cache removal still happens, but the cooldown gates the ~11 MB fetch)Verification
Fixes #3929
Found while working #3788 (来源: #3788 分析 SQLite unified storage degraded to legacy-only 时发现).