Skip to content

[PR] test(golden): Realign storage-render golden snapshots (master expired after kernel 0.0.184, scheduled CI will always fai | test(golden): 重对齐 storage-render 黄金快照(master 在 kernel 0.0.184 后过期,定时 CI 必红) - #5868

Closed
ranxianglei wants to merge 2 commits into
masterfrom
2026-11-07_storage-render-goldens-realign

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

这个 PR 只做一件事

把 #5860(kernel 0.0.184,新增 requireUsageSampleForPressure 配置面)之后过期的黄金快照重对齐:storage-render 四件套(commit 1)+ wire-contract kernel 钉(commit 2,独立复核时发现同因同修)。单主题、纯 golden JSON、无源码改动。

从 #5859(CI/test 信号合集第二辑)拆出来单独送审,原因:它是 master 自身的问题,不该等那个大合辑过审才被修;且本 PR 合入即解除所有在途 PR merge-ref CI 的无谓红染 + master 下一次定时跑的必红。

改了什么、为什么安全

storage-render(commit 1):

  • 每个 wire(anthropic/chat/responses/google)tests/golden/storage-render/*.json 里只有 stateDigest / stateDigestAligned / sectionDigests.metadata 三个值变化;
  • wire 正文逐字未变:所有 turns[].sha 与 golden 完全一致,折叠点 foldAt=9 / editedAt=12 不变,state 键集不变("state-key divergence: none");
  • 生成方式 = 仓库自带脚本 node --import tsx scripts/update-storage-render-goldens.ts(脚本自带三个 parity env pin),非手改字节。

wire-contract(commit 2,独立复核补充,见 #5867 评论):

行为变更声明:无。 两个 commit 都只改测试期望(golden),使其追上 #5860 已上线的行为;不触碰任何运行时路径。#5860 引入的 guard 默认行为(estimate-grade 读数延后 pressure-band nudge)本身随 #5860 已生效,与本 PR 无关;该 guard 与 #728「永不上报 usage 的后端」类会话的交互(三套行为测试因此红)已作为待裁定项记录在 #5867,不在本 PR 范围内。

实证(#5867 有全文)

同一台机器上两棵独立工作树(各自 npm ci + 重建 kernel dist):

顺带说明

master 最近两次定时 CI 成功运行都在 #5860 之前——也就是说 master 目前还没有人看见过这颗雷,下次 :03/:33 定时跑会自己炸。本 PR 就是排雷本身。

Closes #5867

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_storage-render-goldens-realign (3cf33ec)

Latest build — install this exact version

npm install -g billion-context@0.0.8487-pr.5868.86b8d6f

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
3cf33ec billion-context@0.0.8487-pr.5868.86b8d6f build
ca64338 billion-context@0.0.8484-pr.5868.1ccc87d build
1ee42bf billion-context@0.0.8482-pr.5868.15f4387 build
a9554bf billion-context@0.0.8481-pr.5868.4d8c681 build
855e779 billion-context@0.0.8477-pr.5868.c648c69 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5868.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title test(golden): 重对齐 storage-render 黄金快照(master 在 kernel 0.0.184 后过期,定时 CI 必红) [PR] test(golden): Realign storage-render golden snapshots (master expired after kernel 0.0.184, scheduled CI will always fai | test(golden): 重对齐 storage-render 黄金快照(master 在 kernel 0.0.184 后过期,定时 CI 必红) Nov 7, 2026
…ed-state shape (second staleness round)

The previous alignment targeted df0a402 (#5860/kernel-0.0.184 era). Master has
since merged #5772 (lazy-historian-sweep), which rewrote src/storage/{store,mysql}.ts
and again changed what the golden drive persists per session. Clean master's own
scheduled full matrix (run 42358603178, sha 5af5f9f, tracked as issue #5870) reds
on exactly the two suites reading these snapshots:

  - tests/golden-storage-render.test.ts          (4 wires, x3 shards)
  - tests/storage-engine-proofs.test.ts:191      full-mode restart vs committed
    goldens, assert.equal(record.stateDigestAligned, golden.stateDigestAligned)
    (4 wires, x3 shards)

Re-generated via scripts/update-storage-render-goldens.ts against clean
master@5af5f9fe. Safety check BEFORE trusting the regen: git diff -U0 over the
four snapshots shows ZERO turns[].sha lines touched (wire bodies byte-stable),
foldAt/editedAt unchanged, only stateDigest/stateDigestAligned/sectionDigests
.metadata values move — i.e. persistence-shape drift, not rendering behavior.

Local proof on /tmp/mfix (origin/master 5af5f9f, fresh npm ci + full build,
CI-parity pins BILI_MESSAGE_TIMESTAMPS/SNAPSHOT_SHADOW/IMAGE_RESCALE=0):
tests/golden-storage-render.test.ts + tests/storage-engine-proofs.test.ts =
17 pass / 0 fail after this commit (before it: the CI failure set reproduces).

This unblocks both master's :03/:33 scheduled matrix and every in-flight PR
whose merge-ref runs against live master.
@ranxianglei
ranxianglei force-pushed the 2026-11-07_storage-render-goldens-realign branch from 1ee42bf to ca64338 Compare November 7, 2026 10:22
…184 (#5860)

#5860 added nudge.requireUsageSampleForPressure (default true) to the
acp-kernel defaultConfig export surface; the pinned snapshot in
tests/golden/wire-contract/kernel.json missed it, leaving
tests/wire-contract-golden.test.ts red on clean master (4 pass / 1 fail).

Regenerated via the repo script (node --import tsx
scripts/update-wire-contract-goldens.ts): only kernel.json changed
(+1 field line, plus the preceding comma); the other three goldens came
out byte-identical. Same staleness class and same fix path as the
storage-render realignment in the first commit of this PR (#5867).

Gate after regen: tests/wire-contract-golden.test.ts 5 pass / 0 fail
(CI preload chain).
@ranxianglei

ranxianglei commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner Author

(ai: sglang-gpu0/qwen3.8-27b)

本 PR(storage-render 快照对齐)被 PR #5882 已取代——#5882 已合入 master,且处理得更好:

建议直接关闭本 PR 不再合并,避免把脏快照带进 master。

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