Skip to content

[PR] fix(storage): accurate unified-FULL boot log for the default case (顺带 #6994) - #7000

Open
ranxianglei wants to merge 2 commits into
masterfrom
2026-11-17_storage-full-log-accuracy
Open

ranxianglei wants to merge 2 commits into
masterfrom
2026-11-17_storage-full-log-accuracy

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

顺带小修:unified-FULL 启动日志对默认档的措辞不准确(发现于 #6994)

#6994 的报告者「没设开关」却看到 unified FULL mode ENABLED,被启动日志里的 "unset the knob to roll back" 带偏去找一个根本不存在的 knob。

问题:src/storage/shadow.ts:378 的启动日志:

  1. 括号里只写了 (storage.unified=full or BILI_STORAGE_UNIFIED=full),漏了「两者都未设时默认就是 full」这一档(0.1.214+ 的纯 SQLite 默认,[PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480);
  2. "legacy files keep being written" 对纯 SQLite 默认档(jsonWriter 关)是错的;
  3. "unset the knob to roll back" 是错的 —— 默认档没有 knob 可 unset,回滚是设 storage.unified=legacy 或 BILI_STORAGE_UNIFIED=legacy。

修法:一行日志措辞,显式点出默认档 + 给正确的回滚开关。不动任何行为/逻辑,纯日志文本。

回归面:无 —— 只改一条 info 日志的字符串;tests/issue4341-early-twin-adoption.test.ts 与 tests/issue4977-present-twin-persist-gate.test.ts 只 match 前缀 /\[storage\] unified FULL mode ENABLED/,前缀保留,不受影响。

发现于 #6994 的 triage(#6994 主诉 A/B/C 的根因修复在 #5178 / #5691,不在本 PR)。

)

The boot log said 'unset the knob to roll back', but pure-SQLite full
mode is the DEFAULT when neither BILI_STORAGE_UNIFIED nor storage.unified
is set — there is no knob to unset. It also claimed 'legacy files keep
being written', which is false for the pure-SQLite default (jsonWriter
off). That misleading line is what sent #6994's reporter hunting for a
knob they never set. Now it names the default explicitly and gives the
correct rollback (set storage.unified=legacy or BILI_STORAGE_UNIFIED=legacy).
@ranxianglei ranxianglei changed the title fix(storage): accurate unified-FULL boot log for the default case (顺带 #6994) [PR] fix(storage): accurate unified-FULL boot log for the default case (顺带 #6994) Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-17_storage-full-log-accuracy (ef92886)

Latest build — install this exact version

npm install -g billion-context@0.0.10591-pr.7000.924a5e2

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
ef92886 billion-context@0.0.10591-pr.7000.924a5e2 build
c6988e0 billion-context@0.0.10551-pr.7000.89ea752 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei added documentation Improvements or additions to documentation p3 scope/storage bug Something isn't working labels Nov 17, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Re-verified the live check state first: architecture-docs was still red on head c6988e04d5 (every other gate green; the test lanes were skipped by the [ework:ci-held] marker still on the head).

Diagnosis — inherited master-red, not this PR's code. The failing line was FAIL: reference/architecture.md missing: src/responses-system-sections.ts, but this PR's diff is a single log-string line in src/storage/shadow.ts and never touches that file or the docs. The missing doc entry was introduced on master by #6922 (which added src/responses-system-sections.ts without registering it in reference/architecture.md); the check ran against a merge with the then-current master (301e1a5459) that predated the doc fix. Confirmed via #4599: the same inherited architecture-docs red was already reported for PR #7016 and the fix (8ed56be997) has since converged into master (6a641f3785).

Fix. Merged origin/master into the PR branch (clean, zero conflicts — master never touched shadow.ts), bringing in the doc fix 8ed56be997. Verified locally: node tools/check-architecture-docs.mjs → all green (map covers all 325 src files, no ghosts). The PR's own 1-line change preserves the [storage] unified FULL mode ENABLED prefix that the two storage tests match on, so no test impact. Pushed the merge commit as the final head (no [ework:ci-held] marker) → ef92886bc4.

Live re-verification after push: the new CI run on ef92886bc4 shows architecture-docs = success (24 checks already green, 12 test shards in progress, 11 skipped). The one red is cleared.

No design decision needed — pure inherited-failure sync: no new issue, no PR-body edit, no authorization gate touched.


结构化八问

  1. 是什么问题:PR 的 architecture-docs 门禁红——reference/architecture.md 缺登记 src/responses-system-sections.ts。
  2. 什么原因导致的:继承性失败,非本 PR 代码。[Bug] Inconsistent system prompt separator in Responses internal re-request breaks cache prefix | [Bug] Responses 内部重请求的系统提示分隔符不一致,破坏缓存前缀 #6922 在 master 新增该文件但未登记模块地图;门禁跑在与旧 master(301e1a5459)的合并上,早于文档修复。本 PR 只改 src/storage/shadow.ts 一行日志字符串,与该文件/文档无关。
  3. 影响范围与严重程度:仅 CI 门禁红、阻塞本 PR 合并;不影响运行时行为。同机制已波及多个在途 PR([PR] fix: egress fuse and preflight doom gates price the prompt mass, not the whole body (#7013) #7016 等)。
  4. 怎么修复的:把 origin/master(含文档修复 8ed56be997)merge 进 PR 分支(零冲突),让门禁在与当前 master 的合并上重跑即绿;不在 PR 分支手改文档——master 级修复收敛到 master/ci-fixes,由哨兵统一维护。
  5. 是否有回归问题:无。merge 零冲突;本 PR 自身改动是日志字符串,保留测试所匹配的 [storage] unified FULL mode ENABLED 前缀,无语义/阈值/时序/输出格式漂移。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:继承红已清除,architecture-docs 在新 head ef92886bc4 上已绿;PR 自身 diff 不变(仍为一行日志修正)。等其余 test 分片跑完即可合并,无需人工介入。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: opencode/qwen3.8-27b)

CI 自动修复 — test 分片红 → 绿(flake 重跑确认,无代码改动)

1. 是什么问题
PR #7000 的 CI 在 test (ubuntu-latest, 22, 2) 分片上红,失败用例是 #4982 e2e: draining same-lane predecessor + squatter → newcomer ladders instead of dying(tests/issue4982-draining-twin-ladder.test.ts:384,断言 "P1 must have registered itself",ERR_ASSERTION)。

2. 什么原因导致的
flake(偶发时序),不是真回归。 本 PR 的改动只有一行——src/storage/shadow.ts 里 unified-FULL 默认态启动日志的措辞(纯 cosmetic),与 registry marker 注册完全无关。marker 写入(registerInstanceAndWarn,src/server.ts:1343)是同步的、且在 server.listen()(src/server.ts:1569)之前完成,不存在"健康先于 marker"的竞态;近期 master 也没有改注册逻辑(最近一次 src/instance.ts 改动 33bec442d9 只是把 atomicWriteJson 导出,逻辑未变)。重跑后该用例通过,证实是偶发。

3. 影响范围与严重程度
仅 CI(单个 test 分片),无用户面影响。属测试质量层面的偶发(one-shot marker 读取),不是产品缺陷。

4. 怎么修复的
用 GitHub API rerun-failed-jobs 重跑失败分片(run 44046515311,attempt 2)。重跑通过(run conclusion=success,全 30 项绿)。无代码改动——PR 分支 head 保持 ef92886 不变(未推任何新 commit)。

5. 是否有回归问题
无。PR 改动是 cosmetic(一行日志字符串),不触碰任何行为路径。

6. 是否破坏缓存
不涉及。

7. 是否改了设计方向
不涉及。

8. 是否引入了新的配置
不涉及。

备注(状态源差异):GitHub API 已确认 run conclusion=success(attempt 2,全绿),但镜像缓存此刻仍显示该分片 completed failure(缓存滞后,尚未刷新到重跑结果)。以 GitHub 实际状态为准:PR CI 已全绿。若后续唤醒仍见镜像红,属缓存滞后,无需再动。

判定:收工。 PR CI 已绿,flake 重跑确认,无代码改动。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: opencode/qwen3.8-27b)

Duplicate wake — already resolved in the previous run. Live re-verification this run:

  • GitHub API: run 44046515311 conclusion=success (attempt 2, all 30 checks green).
  • Mirror cache: still shows completed failure for test (ubuntu-latest, 22, 2) — stale (lagging the re-run; not yet refreshed to attempt 2).

The flake was confirmed and re-run green in the prior run (see the 八问 above). No code change, no push, no further work. If this wake recurs, it's the mirror cache catching up — the authoritative GitHub state is green.

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

bug Something isn't working documentation Improvements or additions to documentation p3 scope/storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant