Skip to content

test: rebaseline storage-render goldens after #3295 dropped dead image-stats fields from state.stats - #3314

Merged
ranxianglei merged 3 commits into
masterfrom
2026-10-16_storage-render-golden-rebaseline
Oct 16, 2026
Merged

ranxianglei merged 3 commits into
masterfrom
2026-10-16_storage-render-golden-rebaseline

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Fixes #3313

What

Pure test-fixture regeneration — no source changes. Ran node --import tsx scripts/update-storage-render-goldens.ts on origin/master (6ee4a2a) and committed the result: 4 files × 3 digest lines each (stateDigest, sectionDigests.state, state-key stats) under tests/golden/storage-render/.

Why (golden-regeneration justification)

The goldens were last regenerated at 700722d (#3266 main removal commit). Afterwards, PR #3295's review-finish-up commit 5bcc345 removed three dead zero-seeded fields (imagesShrunk, imageBytesSaved, imageTokensSaved) from createInitialState() in kernel/src/state.ts (+ the CompressionStats interface fields in kernel/src/types.ts) — deliberate dead-code cleanup: after src/image-compress.ts went away these counters have zero readers. The persisted state.stats shape therefore changed by exactly those three keys, which turned every test shard red on master and on all open PRs (identical signature, e.g. chat: state-key divergence: stats=f85b2ad1a3b86e2f (golden cbb367f44be13abd); shard summary # tests 2198 / pass 2181 / fail 4).

This rebaselines against an INTENTIONAL upstream behavior change, not a regression being masked:

Verification

  • Local targeted: node --import tsx --test tests/golden-storage-render.test.ts → 5/5 pass on this head.
  • Full-suite verdict: remote CI test lanes on this head (§7.2 — local full runs are environment noise).

No config surface, no new behavior — fixture-only. The state-shape change itself already shipped in #3295.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-16_storage-render-golden-rebaseline (158d32f)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3894-pr.3314.557facf

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 不重复——按失败签名(tests/golden-storage-render.test.ts 四条 wire 子测试 + state-key stats digest 漂移)检索 open+closed issue 与 PR,无同签名条目;本 PR 即 #3313 的修复项(#3313 正文已带查重声明),无并列的其他 rebaseline PR。

接单确认:这是纯测试夹具 rebaseline PR(声称无源码改动)。审核步骤:拉取 PR 分支核对 diff 范围(应恰好 4 个 json × 3 行 digest)→ 在 master 上独立复核 #3295 删三字段的零读取方论断 → 核对 #3266 back-compat 契约与定向测试 → 看远端 CI 分片状态。完成后按八问体例回复结论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

补充独立复核记录(来自 #3320 的重复 PR 审查——#3320 已按先来后到关闭,本 PR 为保留项):

本地 A/B(worktree @ 对等 head,非抄 PR 描述)

CI 侧(run 38777578495):所有分片已无 storage-render 失败,修复在 CI 同样成立。剩余红分片与本 fixture 无关(#1086 T5 liveness ×3 分片 + win22-s3 单次 AC12),已在 #3313 留评论分析并等 owner 决定处置。

合并判定:验证通过,待人工合并。

awork added 2 commits October 16, 2026 04:02
… guard

The fake-model growth filler "x".repeat(360) emits a run of 360 identical
codepoints per reply. Since #3289 merged the output-side runaway guard (#3260,
src/runaway-guard.ts: textRun >= TEXT_RUN_THRESHOLD = 200), every synthetic
reply is aborted mid-stream ("output-side runaway guard tripped (text-run;
maxTextRun:200)") and the client sees an empty response, so T5's "every
client turn must get a visible reply" fails deterministically on every
shard-2 CI lane (run 38777578495: ubu22-s2 / ubu24-s2 / win22-s2 / win24-s2).

Fix at the producer: "x ".repeat(180) — same 360 bytes per reply, max run
of identical codepoints is 1, so the fixture stops emitting the degenerate
symbol-loop shape the guard exists to catch (#3946). Guard untouched; no
runtime code changed.

Verified locally: tests/issue1086-chain-self-exemption.test.ts 21/21.
Pushed as 7d061be before PR #3317 was discovered: it fixes the exact same
line (tests/issue1086-chain-self-exemption.test.ts:546, same mechanism, same
equal-length mixed-char approach) and is properly tracked under #3315 sub-defect 2.
Keeping both would force a merge-conflict round between #3314 and #3317 on one
line. Reverting restores the intended disjoint-file split (#3314 = golden JSONs,
#3317 = the single test file); shard 2 goes green only when BOTH land, per
#3315 floor 6.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

审核完成。结论:本 PR 正确、可合(纯金标重基线,验证全过)。审核过程中有一项插曲处置,先披露。

插曲披露(重要)

审核中发现本 PR 的 CI 红分片与 PR 无关(T5 liveness,见八问后说明)。按「几行级小修顺手修」纪律,我先往本分支推了一行修复(7d061be7a);随后发现 PR #3317 已在途修同一行(同机制、同方案、提交在先、已正确挂到 #3315),为避免两个 PR 在同一行上产生必然的合并冲突回合,我用 revert(158d32f14)撤掉了它。分支净 diff 恢复为恰好原始 4 个金标文件,与 #3317 零冲突面。这次「先推后查」是我的排序失误(应先查在途修复再动手),如实记录。

查重

不重复:无同症状+同机制(golden rebaseline)存量条目,本 PR 即 #3313 子缺陷 ① 的修复项。审核中另发现的 T5 liveness 红已有 #3315(跟踪)+ #3317(在途修复),未重复立项。

逐项核实结果(独立验证,非复述 PR 描述)

  1. diff 纯度:恰好 4 文件 × 3 行——tests/golden/storage-render/{chat,anthropic,responses,google}.json 各只改 stateDigest / sectionDigests.state / state-key stats 三处;blockContents、metadata、blocks、messageRefs、nudge、顶层 stats、turn shas 全部未动。
  2. 根因成立:5bcc34569(feat!: remove image pre-compression and the image_full tool (#3266) #3295 收尾提交,已在 master)从 createInitialState()(kernel/src/state.ts)与 CompressionStats(kernel/src/types.ts)删掉三个死字段 imagesShrunk/imageBytesSaved/imageTokensSaved;全仓 grep 确认零读取者(仅旧语料夹具与 tests/storage-corpus.test.ts:170-171 的「legacy keys must NOT materialize」断言引用这些名字)。
  3. 逐字节一致:head 15fe6eb 本地跑 scripts/update-storage-render-goldens.ts 后金标目录 git status 干净 → 提交的金标与 master 活体管线逐字节一致;新 chat stateDigest 7bd74bdd045445f7 == 失败 CI 报告的 live 值。
  4. 定向本地测试:tests/golden-storage-render.test.ts 5/5;tests/storage-corpus.test.ts 9/9(image_full 无法被正确调用:同一张图每轮重复降采样(38 次)、restore 提示注入 38 次,模型只能猜 ref → 每轮一次失败+重发,缓存命中从 75% 掉到 28% #3266 向后兼容契约成立);tests/storage-engine-proofs.test.ts 12/12(WIRE PARITY 按 turn sha 比对,不受本次改动字段影响)。

八问

  1. 是什么问题:feat!: remove image pre-compression and the image_full tool (#3266) #3295 从 state.stats 删掉三个零读取死字段后持久化形状变了,金标没跟着重生成,凡跑到四个 storage-render 金标的 test lane 全红。
  2. 什么原因:行为变更本身是有意的死代码清理(src/image-compress.ts 移除后这些计数无读者);红的直接原因是「漏跑重生成脚本」,不是回归被掩盖。
  3. 影响范围与严重程度:阻塞级(CI 合并门禁)——master 及所有在途 PR 的对应 lane 必挂(shard 汇总 2198/2181/4);用户侧零影响(白名单读取器丢弃旧字段,已由 storage-corpus 套件钉住)。
  4. 怎么修复的:不改任何源码,对一次有意的上游行为变更做金标重基线(rebaseline)。
  5. 是否有回归:无。审过的既有行为:digest 比对逻辑、WIRE PARITY(turn sha 比对)、storage corpus 向后兼容——均保持;diff 只触碰每 wire 的三个 digest 字段,无阈值/时序/输出格式漂移。
  6. 是否破坏缓存:不涉及(纯测试夹具)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

CI 预期残留红(预期管理)

head 15fe6eb 的全量 CI(run 38777578495)已核过:7/12 分片绿,红均与本 PR 无关——shard 2 的 T5 liveness(×4 平台 lane,根因 = 测试夹具 "x".repeat(360) 填充撞上 #3289 输出侧 text-run 护栏 maxTextRun=200,在含裸 master 的任何树上确定性失败,#3317 已修)与 win22-s3 的 AC12(时序 flake,#3315 子缺陷 ③ 观察中)。shard 2 要等 #3314 与 #3317 都合入才转绿(两 PR 文件不相交、顺序随意,#3315 floor 6 已论证)。因此新 head(158d32f14)的 CI 若再出现 T5 红属预期,不影响本 PR 的正确性判定。

判定:可合——建议与 #3317 一并合入,shard 2 即清。

@ranxianglei
ranxianglei merged commit 9190031 into master Oct 16, 2026
34 of 39 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.471-master.9190031 (rolling master tag).

npm install -g billion-context@0.0.471-master.9190031  # 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

Development

Successfully merging this pull request may close these issues.

storage-render 金标快照未随 #3295 重新生成,master 与所有在途 PR 的测试分片全红 [no-dispatch]

1 participant