Repository navigation
[PR] Fix flaky WAL custom-cap test: assert convergence instead of a fixed ingest count (#4489) - #4502
ranxianglei wants to merge 5 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.6182-pr.4502.980c42cThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4502.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 的需求源头即 #4489,检索 open+closed issue/PR(WAL flake、journal_size_limit、以及下文 media CAS 失败签名)均无其他重复条目。 结构化八问(独立审核,非转述 issue 侧结论)
证据附录(本地定向验证 + CI 取证)
判定修复本身通过独立审核,可合。当前 head 的 CI 红完全来自无关的既有 media CAS 失败(#4514):待该 lane 转绿即可合并;若 owner 接受「红与本次 diff 无关」的证据链(上面 master 同 sha 交叉验证),也可以直接合并、由 #4514 单独跟踪。合并动作留给你。 |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复、不再立项 —— 三条红 lane 的失败签名( 判定:三条红全部是同一处与本 PR 无关的既有失败,本 lane 不改码、到此为止独立取证(run 40078597151 @ head d237c31,日志逐份拉取)
结构化八问
收工判定可合性不受本 PR 代码影响:待 #4514 修复后相关 lane 转绿即可合;若你接受上面「master 同 sha 交叉验证 + diff 无交互机制」的证据链,也可以直接合并、由 #4514 单独跟踪。另注:分支当前与 master 处于冲突态(mergeable=dirty),已按流程由冲突处理工位在跟进 rebase,不在本 lane 范围内。 |
d237c31 to
d648da0
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决并推送(rebase 到最新 master 冲突原因:master 已合入的 #4506(commit 选择:保留本 PR 的收敛断言,弃用 #4506 在测试文件侧的容差放宽(#4506 的 src/ 部分——historian retire 释放 media refs——完整保留,未动)。理由:
本地定向验证: 八问
收工判定:冲突已解、分支已对齐最新 master 并推送,等 CI 转绿即可合并。 |
…fixed ingest count The #3250 custom-cap case asserted the WAL sat under cap + one page after a fixed number of ingests. The residue above the cap depends on where the 1000-page autocheckpoint window closes relative to commit boundaries, which varies with the runner's bundled SQLite build — byte-identical red on some shards (left 1095952 bytes, cap 1048576), green on others, same sha (master run 40068050438; PR #4485 run 40069753327). Assert convergence instead: keep committing 128 KiB units until a completed checkpoint (autocheckpoint or cadence-tick PASSIVE) brings the file back to the configured cap, bounded at CONV_UNITS = 24 (one full cadence period + landing lag + headroom; derivation in the constant's doc). A pre-fix tree (limit never honored) sits at its high-water mark through all units and can never converge, so the RED/GREEN discrimination is unchanged.
d648da0 to
1d418be
Compare
(ai: vllm-qwen/qwen3.8-27b) docs-sync 已修复并推送(auto-fix lane attempt 2/2)。新 head: 查重: 不重复——根因已在 master 侧修复(#4524 / #4520,commit 发生了什么(证据链):
修法:纯 rebase 到当前 master 八问:
备注:push 后全套 CI 重跑。attempt 1 已判定的既有 media-cas flake(#4514,与本 PR 无关、master 同样红)仍可能让个别 test shard 变红——那由 #4514 的线处理,不属本 lane。docs-sync 本身:判定可合。 |
master window commits 293ae65/de5e03659 bumped kernel/package.json to 0.0.165 without regenerating the lockfiles; lock-sync re-resolution then rewrites the stale recorded versions (root 0.0.163, kernel 0.0.164) and fails. Pure recorded-version sync via npm install --package-lock-only; no dependency or semantic change.
Closes #4489
What is broken
tests/issue3250-wal-checkpoint.test.ts— "#3250: a configured cap flows open() → journal_size_limit" went intermittently red on 5 CI shards withleft 1095952 bytes, cap 1048576. It asserted the WAL sat under cap + one page after a fixed number of ingests. The residue above the cap depends on where the 1000-page autocheckpoint window closes relative to commit boundaries, which varies with the runner's bundled SQLite build ⇒ byte-identical red on some shards/environments, green on others, same sha (master run 40068050438; PR #4485 run 40069753327).Root cause (verified locally)
Reproduced the byte-identical error on this machine (node 22, sqlite 3.51.3 builtin). Instrumented probes show the WAL is a sawtooth: it grows per commit, drops back to exactly the configured cap at each completed checkpoint (autocheckpoint once >1000 pages accumulate; cadence-tick PASSIVE every 20 ingests), then grows again. A fixed-count assertion samples one arbitrary phase of that sawtooth — trough or regrowth — decided by environment-dependent page packing.
Key measured facts (lone writer, hermetic):
capbecause a small (128 KiB) commit's extent fits under the cap's frame capacity;size <= cap + slackcould never hold for them — the loop deliberately stays on 128 KiB units.Fix
Assert convergence instead of a point-in-time size: keep committing 128 KiB units until
walSize <= cap + CAP_SLACK, bounded byCONV_UNITS = 24(one full cadence period of 20 + 1 landing lag + 3 headroom — derivation in the constant's doc). From any phase the next completed checkpoint arrives within that bound; a pre-fix tree sits at its high-water mark through all units and exhausts them → still red.Deliberately NOT included: adding this signature to
scripts/ci-failure-shapes.mjs(the issue comment's optional part b). That classifier is literal-narrow by design, and since part (a) ships in this PR the signature would be dead code from day one. If the shape reappears in CI post-merge, revisit as defense-in-depth.Verification
left 1095952 bytes);npm run typecheckclean;No user-visible behavior change — test-only diff (one file,
tests/issue3250-wal-checkpoint.test.ts).