Skip to content

[PR] test(#5219): pin the JSON writer on so the decode-cap gate is host-hermetic - #6569

Open
ranxianglei wants to merge 3 commits into
masterfrom
2026-11-14_5219-gate-hermetic
Open

ranxianglei wants to merge 3 commits into
masterfrom
2026-11-14_5219-gate-hermetic

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

什么问题

#5634 合入的 tests/issue5219-bounded-boot-decode-cap.test.ts 门禁只在 BILI_STORAGE_UNIFIED=full 下跑,没钉 JSON writer。而 #6480(同批合入)把存储默认切成 pure-SQLite 后,宿主配置文件里显式 storage.jsonWriter=off 会直接压过 full 的 dual-write 默认——这种宿主上 writeNow 不落 JSON 信封,boot 时磁盘零文件,门禁 3 条里 2 条必然红(本机复现: 0 !== 10)。CI 是干净环境所以绿,属于环境性假红。

修法(test-only,+11/-3)

withUnified 同时钉 BILI_STORAGE_JSON_WRITER=1(finally 还原),和该 suite 已有的 env 钉法同一模式。门禁测的是「有信封可读时的解码上限」,writer 开关不是它的变量。

验证

本机(jsonWriter=off 宿主): 钉前 1/3 → 钉后 3/3;干净环境行为不变(env 优先级高于文件,CI 本来就 unset)。

…rmetic

withUnified set BILI_STORAGE_UNIFIED=full but not the writer: a host
config file with storage.jsonWriter=off (the pure-sqlite default since
#6480, where the file value always wins over the 'full' dual-write
default) silently leaves the disk empty, every boot decodes nothing,
and the warm-set/small-corpus gates read 0. CI is clean-host so it
never saw this; the env pin makes the gate independent of the host's
storage knobs, matching what the test actually measures.
@ranxianglei ranxianglei changed the title test(#5219): pin the JSON writer on so the decode-cap gate is host-hermetic [PR] test(#5219): pin the JSON writer on so the decode-cap gate is host-hermetic Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-14_5219-gate-hermetic (95e05f1)

Latest build — install this exact version

npm install -g billion-context@0.0.9688-pr.6569.fb43a5c

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
95e05f1 billion-context@0.0.9688-pr.6569.fb43a5c build
5f406b1 billion-context@0.0.9614-pr.6569.3f8a2bd build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6569.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

[bot] 🏷 已核对 PR #6569(分支 2026-11-14_5219-gate-hermetic,commit 5f406b1)——本 [PR] 行跟踪的就是这条既有 PR,未重做,只做了核对 + 确认 CI。

修法核对(与 issue 描述一致):test-only,+11/-3,只动 tests/issue5219-bounded-boot-decode-cap.test.ts 的 withUnified。在原有 BILI_STORAGE_UNIFIED=full 之外同时钉 BILI_STORAGE_JSON_WRITER=1,finally 里按原值还原(与既有 env 钉法同一模式)。机制成立:门禁数的是 JSON 信封解码次数,依赖 dual-write;#6480 把存储默认切成 pure-SQLite 后,宿主配置 storage.jsonWriter=off 会压过 full 的 dual-write 默认,导致磁盘零文件、计数全 0(0 !== 10)。env 优先级高于文件,钉 =1 后门禁与宿主存储开关解耦;干净宿主(CI)行为不变。

CI 状态(实时读镜像缓存,刚查):30 项,0 红,7 项仍 queued(lock-sync / unused-exports / pi-subagents-guard / test-import-graph / plan / docs-sync / lane-guard)。已完成的 gate×5 / build-artifact / config-surface-guard / architecture-docs / kernel-guard / docs-coverage / lifecycle-ledger-guard / version-guard 全绿,e2e 泳道按预期 skip。PR mergeable=true,mergeable_state=blocked(卡在剩余 queued 项)。

判定:代码正确、无回归面(test-only,不碰 src/、kernel/、配置面),无需改动,等 CI 收尾即可合。若后续 CI 转红我再跟进。

The suite baseline preload (preload-storage-baseline.mjs) pins
BILI_STORAGE_UNIFIED="legacy" for the broad corpus. After #6480 flipped the
storage default to pure-sqlite, the notice-registry suite's visibleNotices
assertions expect the pure-sqlite default notice, which is gated on
unifiedSelectionIsSqlite (unified "sqlite" or absent) — the preload's
"legacy" made the notice silent, so the suite was born-red on master. Pin
the selection explicitly (#4011 lesson: a test that depends on the production
default passes locally but fails in CI).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI red triage (auto-fix lane 1/3) — re-verified live state at head 5f406b12e3 (run 43462795962): 5 test shards red, 0 pending. All 5 = inherited master reds, NOT this PR's code.

This PR is a clean test-only change (+11/-3 in tests/issue5219-bounded-boot-decode-cap.test.ts, pinning BILI_STORAGE_JSON_WRITER=1 with finally-restore so the #5219 decode-cap gate is host-hermetic). It touches none of the failing files.

2 known inherited master mechanisms (both tracked in #4599):

  1. visibleNotices born-red (ubu22-3 / ubu24-3 / win22-4, 2 cases each): tests/notice-registry.test.ts expects storage-sqlite-default in visibleNotices() but it is missing. [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 (pure-SQLite default) added the notice gated by sqliteDefaultNoticeActive (src/notices.ts:82), which requires unifiedSelectionIsSqlite; the hermetic test does NOT pin the storage env vars, so the CI suite preload (tests/preload-storage-baseline.mjs) pins BILI_STORAGE_UNIFIED to a non-sqlite value → notice hidden → assertion missing. Same signature as CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 1305/1307/1310/1311/1312/1314/1317/1318/1320. Fix = make the test hermetic (pin/unset the storage env vars) → belongs in ci-fixes.
  2. EBUSY file-lock flake (win22-3 Scheduled full test failed: ee0dcc7c | 定时全量测试失败: ee0dcc7c #5506 ×3, win22-5 persist-zstd ×10): EBUSY: resource busy or locked, unlink '...index.db' in tests/tmp-rm.ts (SQLite handle not closed before temp-dir rm; Windows cannot unlink an open file). Known flake, rerun = green. CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 1307②/1310/1312.

ci-fixes is a no-op here: origin/ci-fixes (a007974) is 0 ahead / 5 behind master (e1f31ad) — the sentinel's hermetic fix has not converged. The sentinel has been stalled since #4599 floor 1309 (disk-full spawn refused, ~8h; owner flagged at floor 1320).

Per CI coordination policy (owner 2026-10-24): master-level fixes converge to ci-fixes (sentinel-maintained); I do NOT bundle an unrelated master-level test fix into this PR (one-scope + unrelated-changes discipline). The branch is already at master tip + 1 commit (merge ci-fixes = no-op), so I am leaving it untouched and waiting for the sentinel to converge the visibleNotices hermetic fix into ci-fixes. Reported to #4599 this run.


八问:

  1. 是什么问题:PR [PR] test(#5219): pin the JSON writer on so the decode-cap gate is host-hermetic #6569 的 5 个 test 分片红,全部是继承性 master 红,非本 PR 代码问题。
  2. 什么原因导致的:① visibleNotices born-red([PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 pure-SQLite default 落 master 后,hermetic 测试未 pin 存储 env,CI 套件 preload 钉 BILI_STORAGE_UNIFIED 为非 sqlite 值使 sqliteDefaultNoticeActive 门假,公告缺失);② Windows EBUSY 文件锁 flake(SQLite handle 未关闭前 tests/tmp-rm.ts 清理 index.db,Windows 无法 unlink 打开的文件)。
  3. 影响范围与严重程度:仅 CI 全矩阵(PR head)显形;clean env 本地绿;不影响用户、不影响本 PR 代码正确性;体验瑕疵(CI 红阻塞合并)。
  4. 怎么修复的:本分支不动(继承红不夹带修复,按协调纪律收敛到 ci-fixes);已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 报备,等哨兵把 visibleNotices hermetic 修复收敛进 ci-fixes 后 merge origin/ci-fixes 重跑即绿;EBUSY flake 重跑即绿。
  5. 是否有回归问题:无——本 PR 仅 +11/-3 测试文件(pin BILI_STORAGE_JSON_WRITER=1,finally 恢复),与 notices/storage 零交集,未触碰任何失败文件;既有行为无变更。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(仅测试内 pin env,finally 恢复,无新配置面)。

判定:本 PR 红 = 100% 继承性 master 红,非本 PR 代码问题;本分支不动,等哨兵 ci-fixes 收敛后重跑即绿。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

CI red triage (auto-fix lane 1/3) — outcome:

Re-verified live check state at head 5f406b12e3 (run 43462795962): 5 test shards red, 0 pending. All 5 = inherited master reds, NOT this PR's code. This PR is a clean test-only change (+11/-3 in tests/issue5219-bounded-boot-decode-cap.test.ts) that touches none of the failing files.

Two known master mechanisms (both tracked in #4599):

  1. visibleNotices born-red (ubu22-3 / ubu24-3 / win22-4): tests/notice-registry.test.ts is not hermetic wrt storage env — the CI preload pins BILI_STORAGE_UNIFIED to a non-sqlite value, hiding the storage-sqlite-default notice added by [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480.
  2. EBUSY file-lock flake (win22-3 / win22-5): SQLite handle not closed before temp-dir rm on Windows. Rerun = green.

ci-fixes is a no-op (0 ahead / 5 behind master, a007974); the sentinel's hermetic fix has not converged (stalled since #4599 floor 1309, disk-full). Per CI coordination policy (owner 2026-10-24), I left this branch untouched and reported to #4599. Once the sentinel converges the fix, merge origin/ci-fixes + rerun = green.

Full triage with 八问 posted above.

This branch has not been deployed

No deployments
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.

1 participant