Skip to content

[PR] fix(storage): in pure SQLite mode, confirmed index corruption no longer silently falls back to JSON; now fails loudly on | fix(storage): 纯 SQLite 姿态下索引证实损坏不再静默降级 JSON,改为响亮拒启 (#7156) - #7424

Merged
ranxianglei merged 7 commits into
masterfrom
fix/refuse-legacy-degrade-pure-sqlite
Nov 21, 2026

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

修复什么问题

2026-11-21 生产事故(bili 0.1.216,DSH host):3.2GB 的 index.db 被同 lane 多进程共写损坏(根因另案,见 #7156/#5281)。进程检测到「索引证实损坏」后走了旧契约——响亮告警 + 不挂索引照常启动、改用 JSON 信封服务。但当时的配置是纯 SQLite 姿态(index.db 是唯一持久副本,信封只是近乎为空的非持久视图),结果「降级」= 静默丢持久历史:面板显示 requests:2 / 上下文 0,而真实的 1,563 请求、124k 上下文、$12.41 成本全在损坏的索引里。降级比写坏更糟——写坏还能救,降级让「能救」这件事悄悄过期。

改了什么

回归

新增 tests/issue7156-pure-sqlite-refusal.test.ts(姿态真值表 + 两种纯 sqlite 拼法与 file 层的损坏拒启/逃生阀/重复拒启/字节不变断言 + 双写姿态保留降级契约);tests/issue4816-integrity-throw-quarantine.test.ts、tests/acp-status-storage-degraded.test.ts、tests/web-storage-banner.test.ts、tests/storage-durability.test.ts 及 storage 全量套件(69 文件 465 用例)绿,tsc --noEmit 0 错。

不碰的

… index instead of degrading to legacy JSON (#7156)

In the pure-sqlite stance the SQLite index is the ONLY persistent copy of
the sessions — but a proven corruption (this boot's own quick_check, or the
first post-open write on a large store with a cached verdict) still took the
historical #4626-era contract: loud alarm, start WITHOUT the index, serve
the JSON envelopes. Here those envelopes are a near-empty, non-persistent
view, so the degradation silently loses the durable history — worse than the
corruption itself (2026-11-21 production incident: 3.2GB index.db, panel
showed requests:2/context 0 while the real 1,563 requests / 124k context /
cost sat inside the index).

Now, when the effective stance is pure-sqlite (effective mode full + sqlite
backend + no encryption + jsonWriter off — the 2026-11-13 default flip or an
explicit off), a proven corruption makes bili REFUSE TO START with an
actionable manual fix (back up index.db{,-wal,-shm}, move them aside by
hand, start again). The files stay byte-identical (no move/copy/rebuild, the
#4609/#4626 no-auto-touch policy is untouched). Every stance where the
envelopes remain a real recovery source (explicit dual-write full, shadow,
legacy, network backends, encryption) keeps the historical alarm-and-degrade
contract byte-for-byte.

BILI_STORAGE_ALLOW_LEGACY_DEGRADE=1/true/on is the conscious escape hatch
that restores the degrade path in the pure-sqlite stance; it is never the
default and never implied by any config value.

The stance decision is a pure function (storageStancePureSqlite) using the
exact same knobs/precedence as the persist constructor's jsonWriterOff
switch, so the two can never disagree. The refusal is recorded on the
diagnostics surface (REFUSING TO START (pure-sqlite stance) prefix on the
sidecar open error, visible in /__bili/status and the diagnostics dump) and
applies again on every boot.

Docs: docs/configuration.md + configuration.zh-CN.md (BILI_STORAGE_QUICK_CHECK
row split by stance, new BILI_STORAGE_ALLOW_LEGACY_DEGRADE row), CHANGELOG
[Unreleased] Fixed.

Regression: tests/issue7156-pure-sqlite-refusal.test.ts (new: stance truth
table, corrupt-index refusal in both pure-sqlite env spellings + file tier,
escape hatch, repeat refusal, byte-identity assertions, dual-write stance
keeps degrading), tests/issue4816-integrity-throw-quarantine.test.ts,
tests/acp-status-storage-degraded.test.ts, tests/web-storage-banner.test.ts,
tests/storage-durability.test.ts and the full storage suite green.
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: fix/refuse-legacy-degrade-pure-sqlite (3ad00e8)

Latest build — install this exact version

npm install -g billion-context@0.0.11133-pr.7424.8f14692

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
3ad00e8 billion-context@0.0.11133-pr.7424.8f14692 build
92044e6 billion-context@0.0.11131-pr.7424.8bb7785 build
8dc4d68 billion-context@0.0.11129-pr.7424.c2b5ab2 build
7bf1b16 billion-context@0.0.11128-pr.7424.db7e02c build
6f5a562 billion-context@0.0.11126-pr.7424.4f0a072 build
0d7e0ec billion-context@0.0.11125-pr.7424.4c8be79 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(storage): 纯 SQLite 姿态下索引证实损坏不再静默降级 JSON,改为响亮拒启 (#7156) [PR] fix(storage): in pure SQLite mode, confirmed index corruption no longer silently falls back to JSON; now fails loudly on | fix(storage): 纯 SQLite 姿态下索引证实损坏不再静默降级 JSON,改为响亮拒启 (#7156) Nov 21, 2026
…+ lifecycle ledger (#7156)

The #7156 fix added the BILI_STORAGE_ALLOW_LEGACY_DEGRADE escape-hatch env var to src/ but only hand-edited the generated en/zh config docs. The seed (website/config-reference/env-only.yaml — the source of truth) and docs/lifecycle.md were never updated, so three doc gates went red: docs-coverage (undocumented env var), docs-sync (hand-edited docs drift from regenerated output), lifecycle-ledger-guard (no ledger entry).

Fix: add the seed entry (en/zh/ja) and split the BILI_STORAGE_QUICK_CHECK row by stance in all three languages, then regenerate (only the ja doc picks up the new rows — en/zh already matched the seed), and register the new var in lifecycle §2.4 as a permanent operator escape hatch.
@ranxianglei ranxianglei added bug Something isn't working dsh p1 scope/storage labels Nov 21, 2026
The new refusal test pinned the quick_check corruption branch (truncateHalf)
but not the first-post-open-write branch (async mode / large store / cached
verdict) — the path a >512 MiB store like the incident's 3.2 GB index.db is
most likely to hit. The dual-write stance's first-write branch is pinned by
issue7156-storage-corruption.test.ts (FIX 4), but the pure-sqlite stance was
untested there: same recipe (zeroed page 2 + forced async mode), now
asserting the REFUSAL throw, the latch, and the first-write error wording.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复。检索 open PR 无其他 PR 指向同一「纯 SQLite 姿态证实损坏拒启」修复;最接近的是 #5255(双写者根因政策:把第二个长驻 index.db 写者降级为 legacy-only,#5064)——那是防损坏的根因决策,属 open owner 决策(#5250/#5281),本 PR 明确不碰(「不碰的」一节),机制不同(损坏后响应 vs 损坏前预防)。

标签: bug + dsh + scope/storage + p1(数据丢失类:静默丢持久历史;事故宿主为 DSH;修复在存储层)。

审核结论:代码正确、回归干净、测试到位。已独立读完全量 diff、核对姿态公式与 persist 开关同一性、走查拒启的完整启动路径、本地定向验证 59 用例 0 失败。CI 3 红项已由 CI 工程师车道修复(见下),最终 head 全 CI 绿即可合并。

结构化八问

  1. 是什么问题:纯 SQLite 姿态(index.db 是唯一持久副本)下,索引被证实损坏时,旧契约「响亮告警 + 不挂索引照常启动、改用 JSON 信封服务」= 静默丢持久历史(2026-11-21 生产事故:1,563 请求 / 124k 上下文 / $12.41 成本全在损坏索引里,面板显示 requests:2 / 上下文 0)。
  2. 什么原因导致的:旧降级契约假设「信封是真恢复来源」——该假设只在双写姿态成立。纯 SQLite 姿态下信封是近乎为空的非持久视图,「降级」= 数据丢失。降级决策没有区分姿态。
  3. 影响范围与严重程度:p1(数据丢失类)。触发条件:纯 SQLite 姿态(effective mode full + sqlite 后端 + 无加密 + jsonWriter off,即 2026-11-13 起的默认姿态)+ 索引证实损坏(quick_check 或首个 post-open 写入)。修复前:进程照常启动,持久历史静默不可达,「能救」的窗口悄悄过期。修复后:拒启(文件原样不动 + 手工修复步骤),逃生阀显式可用。其余姿态(双写/shadow/legacy/网络后端/加密)旧契约逐字节保持。
  4. 怎么修复的:姿态判定纯函数 storageStancePureSqlite(与 persist 构造函数的 jsonWriterOff 开关同一公式、同一优先级,两开关永不分歧)+ 统一入口 applyProvenCorruptionPolicy(两个证实损坏分支共用:纯 sqlite 且无逃生阀 → 记录 REFUSING 前缀 + 大日志 + throw 拒启;其余姿态 → 保持旧告警 + return null)。throw 走既有 transient-failure 拒启管线(构造器 throw → initSessions → startServer reject → cli catch → 失败页 → exit(1)),文件原样不动、不自动搬移/复制/重建([Bug] 0.1.205+: open-time quick_check is O(index.db) — 14 GB takes 260 s, so the 60 s spawn budget always kills the child and the host stays on direct | 0.1.205+ 开库 quick_check 使启动变成 O(库大小):14GB 库 260 秒 → 必超 60 秒 spawn 预算 → 整生命周期直连 #4609/[Bug][split-brain] Restart-handover notice persists forever after the peer pid is gone (stale storage.splitBrain) #4626 政策不动)。拒启记录进诊断面(/__bili/status 与 diagnostics 可见),每次启动重新生效(latch 只短路进程内重扫)。
  5. 是否有回归问题:审过既有行为——① 双写姿态证实损坏降级契约:保持(新测试 control 用例断言 null/不 throw;issue7156-storage-corruption / issue4816 / acp-status-storage-degraded / web-storage-banner 四文件 21/21 绿);② 新 outer-catch 守卫 if (err instanceof StorageIntegrityError) throw err;(shadow.ts:448):只重抛内层 gate 的拒启——已验证 resetAllIngestWatermarks() 抛原始 driver 错误,StorageIntegrityError 只能来自 UnifiedStore.open 的两个子路径(quick_check store.ts:609 / migrateSchema store.ts:728)且都被内层 catch 处理,该守卫对既有路径零行为变化;③ 进程内 reopen([PR] fix(#5140): name the failed raw-tail reconstruction gate instead of failing closed silently #5188):latch 短路重试(persist.ts:3884 既有),REFUSED 日志恰好一次;mid-process 损坏仍按 2026-10-30「runtime findings are alarms only」政策继续服务——PR 明确只改 boot-time;④ maintenance/export 命令在纯 sqlite 证实损坏下同样拒启——一致,逃生阀可用;⑤ 无阈值/时序/输出格式漂移,唯一行为变更 = 纯 sqlite 证实损坏分支:告警+降级 → 拒启(PR 正文已披露)。本地定向验证:新测试 5/5 + 上述 4 文件 21/21 + storage-durability 7/7 + unified-store 批次 26 pass/1 skip,0 失败;tsc --noEmit 0 错。
  6. 是否破坏缓存:不涉及(不触碰缓存/重试/增量游标/去重键;拒启是 boot-time 决策,latch 只影响进程内重扫)。
  7. 是否改了设计方向:无架构转向。只改纯 sqlite 姿态「证实损坏后怎么办」(降级 → 拒启);双写者政策(根因)明确不碰,仍是 open owner 决策([PR] Degrade a second long-lived index.db writer to legacy-only instead of co-residing (#5064) #5250/Cache invalidation diagnostics misattribute overlapping session requests #5281/kernel authorization request: emergency-truncate latch can store a clip under the BLOCKED sentinel, corrupting every BLOCKED-resolving message (#5218) #5255)。
  8. 是否引入了新的配置:是——BILI_STORAGE_ALLOW_LEGACY_DEGRADE(env,默认不设;仅 1/true/on 生效,其余值按未设处理)。显式逃生阀:有意识恢复旧降级路径;永不缺省、不被任何配置值隐含。另 BILI_STORAGE_QUICK_CHECK 文档行按姿态拆分。

顺手修(1 处,commit 7bf1b168573,已推 PR 分支):新测试只覆盖了 quick_check 分支(truncateHalf 截半),纯 sqlite 姿态下「首个 post-open 写入撞损坏」分支(大库 / 缓存 verdict 路径——生产事故 3.2GB 大库最可能走的路径)没有钉住。补了与 #7156 FIX4 同配方的用例(zeroed page 2 + 强制 async mode),断言 REFUSAL throw + latch + first-write 错误措辞;本地 5/5 绿、tsc 干净。

CI 状态(live 核实):3 红项(docs-coverage / docs-sync / lifecycle-ledger-guard)同一根因——新 env var BILI_STORAGE_ALLOW_LEGACY_DEGRADE 缺 config-docs seed + lifecycle ledger 登记(本地复现:check-coverage 与 lifecycle-ledger-guard 均 exit 1 指向同一变量)。CI 工程师车道已修复(commit 6f5a562),该 run 进行中(10/30 pending);其上的新 head 7bf1b168573(上述顺手修)已推,将触发新一轮全量 CI。PR base 与 master 齐平(无需 rebase)。

判定:代码正确、回归干净、测试到位(含我补的首写分支钉测);最终 head 全 CI 绿即可合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Fixed the three red doc gates on this PR. All three are now green on the live mirror cache (head 7bf1b168573), with 0 failures across all 30 checks — the only in_progress items left are the full test/e2e suite, not doc gates.

Root cause. The #7156 fix added the BILI_STORAGE_ALLOW_LEGACY_DEGRADE escape-hatch env var to src/ but only hand-edited the generated en/zh config docs. The single source of truth — the seed website/config-reference/env-only.yaml — and docs/lifecycle.md were never updated, so:

  • docs-coverage — the new env var had no seed entry;
  • docs-sync — the hand-edited en/zh docs drifted from what gen-config-docs generate reproduces;
  • lifecycle-ledger-guard — the new var had no ledger entry.

Fix (one commit, 6f5a5626282). Added the seed entry in all three languages (en/zh/ja), split the BILI_STORAGE_QUICK_CHECK row by stance to match the new refusal behavior in all three languages, regenerated, and registered the var in docs/lifecycle.md §2.4 as a permanent operator escape hatch. Only the ja doc actually changed on regeneration (en/zh already matched the seed, confirming the wording). Docs-only — no src/ or test changes, so the test suite is unaffected.

Note: a concurrent agent pushed a test-pin commit (7bf1b168573) on top of mine after I pushed; my commit is intact in the branch and all three gates pass on the latest head.

七问:

  1. 是什么问题:[Bug][storage] Takeover spawns before reclaim: old and new sidecars simultaneously hold index.db, causing corruption; em | [Bug][storage] 接管时先 spawn 后回收:新旧侧车同时持有 index.db 引发损坏;空 payload_json 又让历史会话静默变 0 #7156 给 src/ 新增了 BILI_STORAGE_ALLOW_LEGACY_DEGRADE 环境变量,但只手改了生成产物(en/zh config 文档),漏更新种子源与生命周期台账,导致 3 个文档门禁红。
  2. 什么原因导致的:配置文档的单一事实源是 website/config-reference/*.yaml 种子;docs-sync 用 gen-config-docs generate 重算后 diff、docs-coverage 检查 src 读的每个 env 都有种子条目、lifecycle-ledger-guard 检查每个 env 都登记在 docs/lifecycle.md。只改生成产物、没改种子,三关全红。
  3. 影响范围与严重程度:仅 CI 门禁红(阻塞本 PR 合并),无用户面影响、无运行时行为变化。严重程度:低(纯文档/门禁)。
  4. 怎么修复的:补种子条目(en/zh/ja 三语)+ 把 BILI_STORAGE_QUICK_CHECK 行按姿态拆分(三语)+ 重新生成(仅 ja 文档实际变化,en/zh 本就与种子一致)+ 在 lifecycle §2.4 登记新变量为常设逃生阀。
  5. 是否有回归问题:无。纯文档改动,不触碰任何 src/ 源码或测试;生成幂等(连跑两次无额外变化)。
  6. 是否破坏缓存:不涉及(无缓存/重试/游标/去重键改动)。
  7. 是否引入了新的配置:本 run 未引入新配置——只是把 [Bug][storage] Takeover spawns before reclaim: old and new sidecars simultaneously hold index.db, causing corruption; em | [Bug][storage] 接管时先 spawn 后回收:新旧侧车同时持有 index.db 引发损坏;空 payload_json 又让历史会话静默变 0 #7156 本身已引入的 BILI_STORAGE_ALLOW_LEGACY_DEGRADE(缺省 off、不被任何配置值隐含)补齐到文档种子与生命周期台账,未改任何默认值或语义。

判定:3 个文档门禁已全绿,本 run 收工。

…rded-refusal cases (#7156)

The status wire's `requested` resolves from the REAL process env (the
defensive fallback used before the first SessionStore build records the
mode). Under a CI environment where the ambient unified selection resolves
to legacy, `degraded` is false and the wire `reason` is blank — so the
/WITHOUT the index/ and /REFUSES TO START/ assertions failed on the CI
test lane even though the refusal/degrade mechanism itself fired correctly
(every expected REFUSING/WITHOUT log was present in the CI output).

Tests 2 and 5 already pinned process.env.BILI_STORAGE_UNIFIED (and passed
on CI); the escape-hatch and recorded-refusal cases were the oversight.
Pin it the same way (save/restore in finally) so the wire `requested` is
deterministic regardless of the ambient environment — matching production,
where recordRequestedMode always sets the requested mode.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

CI 失败根因 + 修复(#7424 / 本 PR)

上一轮 head 7bf1b168573 的 CI test 车道红了:新增的 tests/issue7156-pure-sqlite-refusal.test.ts 里 2 个用例失败(escape-hatch、recorded-refusal);我上一轮补的 first-post-open-write 用例是绿的,机制类断言全部通过。

根因:状态线 storageStatusWire().reason 只在 degraded===true 时才有值,而 degraded 依赖 requested。这 2 个用例直接调 maybeOpen(绕过了 SessionStore 构造器里的 recordRequestedMode),所以 requested 走的是防御性回退 resolveStorageMode(process.env, fileStorageUnified()) —— 读的是真实进程环境。CI 环境里 ambient 的 unified 选择解析成 legacy ⇒ requested==="legacy" ⇒ degraded=false ⇒ reason 为空串 ⇒ /WITHOUT the index/、/REFUSES TO START/ 断言失败。CI 日志里每条预期的 REFUSING / WITHOUT-the-index 日志都正常打出,机制本身在 CI 上是好的,纯粹是测试对 ambient 环境的隐性依赖(用例 2、5 已显式钉了 process.env.BILI_STORAGE_UNIFIED 所以绿了,3、4 是漏网)。

修复(commit 8dc4d68f9f7,纯测试、零源码改动):给用例 3、4 加上与用例 2 相同的 process.env.BILI_STORAGE_UNIFIED save/restore 钉定,让 requested 与 ambient 环境无关、并与生产一致(生产里 recordRequestedMode 总会先记下 requested mode)。本地已复现 fail-before / pass-after(ambient=legacy)、tsc --noEmit 0 错、storage 兄弟套件 21/21 绿。

新 head 8dc4d68f9f7 的 CI 正在跑,全绿即可合并。

ci-check added 2 commits November 21, 2026 10:49
…ult now refuses, #7156)

The #5188 suite pins the round-5 degrade contract (a proven-corrupt index
alarms and boots envelope-served, reopen hooks never re-scan). Its 'actual
boot' ran under the ambient/default stance, which is now pure-sqlite (the
2026-11-13 default flip) — and the #7156 change makes a proven-corrupt
pure-sqlite index REFUSE to start instead of degrading, so the boot threw
and the test failed.

Pin the boot to the explicit dual-write stance (BILI_STORAGE_UNIFIED=full)
to preserve the test's intent (the round-5 degrade contract holds for
dual-write). The pure-sqlite refusal is pinned separately in
tests/issue7156-pure-sqlite-refusal.test.ts.

Closes the CI regression on the #7156 PR head (run 44855025220).
…s abandoned-handle lock

The first-write corruption branch intentionally abandons the opened store
handle (close() would run the close-time integrity-cache refresh and
re-stamp the poisoned verdict), and the background quick_check may still
hold the file. On Windows the abandoned handle keeps index.db locked until
GC runs, so the test's rmSync cleanup hit EBUSY (CI run 44855025220,
windows-22 shard 1).

Retry the removal briefly (50ms x 10); if it still fails with EBUSY, leave
the temp dir (the OS reclaims it) — the test's assertions already ran.
Non-EBUSY errors still throw.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

上一轮我提交的 8dc4d68 触发的 CI(run 44855025220)红了,三处失败已逐一定位并修复,新 head = 92044e6,CI 重跑中。

失败 1:#5188 测试被本 PR 的行为变更打破(真回归,已修)

  • 现象:a proven-corrupt index alarms ONCE and the reopen hooks never re-scan it (#5188 guard) 在 ubuntu-22/24 shard 2 + windows-22 shard 1 全部抛 StorageIntegrityError。
  • 根因:该测试的「actual boot」(new SessionStore)跑在 ambient/默认姿态下,而 2026-11-13 默认翻转后「什么都不设 = 纯 SQLite」——本 PR 让证实损坏的纯 SQLite 索引拒启而非降级,于是 boot 抛错。测试里的 direct probe 显式传了 {BILI_STORAGE_UNIFIED:"full"}(双写,仍降级→过),但 actual boot 没传,吃到了默认姿态。
  • 修法:把 actual boot 钉到显式双写姿态(BILI_STORAGE_UNIFIED=full),保住该测试的本意——它钉的是 round-5 降级契约(证实损坏→告警→带信封启动→reopen hooks 不再重扫),该契约对双写姿态依然成立;纯 SQLite 拒启由新文件 tests/issue7156-pure-sqlite-refusal.test.ts 单独钉。
  • 说明:PR 描述里「storage 全套绿」的结论不成立——本 PR 的 CI test lane 此前从未真正跑过(0d7e0ec 上被 3 个红色 docs guard 级联 skip),这个潜在的环境/姿态依赖是首次 CI 验证才暴露的。

失败 2:我新增的 #7156 首写损坏测试在 Windows 清理时 EBUSY(测试卫生,已修)

  • 现象:#7156 pure-sqlite: a first-post-open-write corruption REFUSES TO START too 在 windows-22 shard 1 报 EBUSY: resource busy or locked, unlink '…\index.db'(断言本身全过,是 finally 里的 rmSync 失败)。
  • 根因:首写损坏分支刻意放弃已打开的 store 句柄(close() 会跑 close-time integrity-cache 刷新、把「ok」重新盖到中毒的判决上),背景 quick_check 也可能仍持有文件;Windows 上被放弃的句柄在 GC 前一直锁着 index.db,rmSync 撞 EBUSY。
  • 修法:清理改为短暂重试(50ms × 10 次);仍 EBUSY 就留下临时目录(OS 会回收)——断言已跑完,清理竞态不应让测试失败;非 EBUSY 错误照常抛。

失败 3:e2e #3384(windows-22 shard 1,疑似 flaky,未改)

  • 现象:e2e #3384: after a refused compaction envelope, a modest-budget turn goes out unclamped 报 cancelledByParent + "Promise resolution is still pending but the event loop has already resolved"(挂起的 Promise)。
  • 判断:该测试在 compaction/ledger 子系统,与本 PR 的 storage 拒启无关;只在单个 windows shard 出现、ubuntu 全绿,符合 Windows 加载下的时序 flaky 特征。先不改,等新 head 的 CI 复跑确认——若仍红再单独查。

提交

  • cb02af3 test: pin the #5188 reopen-hooks boot to dual-write (pure-sqlite default now refuses, #7156)
  • 92044e6 test: make the #7156 first-write refusal cleanup robust to the Windows abandoned-handle lock

本地已验证:#5188 2/2、#7156 5/5(clean + legacy ambient 双环境)、tsc --noEmit 0 错。等新 head 全 CI 绿即可合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

新 head 92044e6 的 CI 已全绿(run 44858027262):28 个 job = 27 success + 1 skipped,0 失败;11 个 test matrix job(ubuntu/windows × node 22/24 × 分片)全部通过,上一轮红的 #5188、#7156 EBUSY 均已消除,疑似 flaky 的 e2e #3384 本轮未复现。

本 PR 的审核与 CI 收敛工作到此完成:

判定:可合并。 等 owner 合并即可(合并是 human-only,我不代合)。

…eage and lifecycle stats (#7156 follow-up)

A save made while the process served from JSON envelopes (degraded window) carried the envelope's coarser block structure into importRecord, which treated the incoming set as authoritative: the index's 103 fine blocks were deleted and replaced by 32 coarse ones, and lifecycle stats regressed (requests 1563->2). ingestSession gains an envelopeImport flag (set by UnifiedShadow.importRecord/importRecordAsync only): with a stored block lineage present the import adopts only messages that continue after the stored max(seq) and skips block upserts/stale sweeps entirely; stats_json keeps the stored value when stored requests >= incoming (import path only, zero overhead for organic saves). First-open imports into an empty index keep the existing adopt-the-envelope behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dsh p1 scope/storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant