Skip to content

[PR] fix: storage tail defects from the #3130 review (#3135) - #3144

Closed
ranxianglei wants to merge 7 commits into
masterfrom
2026-10-14_fix-3135-storage-tail
Closed

ranxianglei wants to merge 7 commits into
masterfrom
2026-10-14_fix-3135-storage-tail

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #3135

All six items + the INFO note from the PR #3130 pre-release review of the SQLite storage layer. Host-side only: no kernel/** changes, no new config surface.

Fixes

① 3-strike self-disable tick lost one save (jsonWriter=off) — src/persist.ts: the writerOff branches of scheduleSave/writeNow/flushSync checked writerOffActive() BEFORE running the builder, but the disable flip happens INSIDE the builder (shadow.record). On that tick neither the JSON write nor the index write happened — the turn was memory-only until the next save. The branches now re-arm the legacy JSON write in the same tick when the flip occurs mid-build (writerOffBuild helper); flushSync returns the real file-write result instead of an unconditional true (which let callers evict a never-persisted session). Strikes 1–2 stay transient by design (the next save retries sqlite).

② BILI_PERSIST=0 → permanent false "degraded" banner with a wrong reason — src/storage/runtime-status.ts + constructor: persistence-disabled is recorded as an intentional opt-out via a new recordPersistDisabled seam (same path as the encryption block): degraded=false, intentionalOptOut=true, no bogus "no SQLite engine available" reason; the diagnostics blob names the real cause ("persistence disabled" vs "BILI_ENCRYPTION_KEY opt-out").

③ storageMode stamp said the requested mode, not the opened mode — src/persist.ts / src/session.ts: new SessionStore.stampMode is decided once at construction: if the sidecar did not open (open failure, encryption block, persistence off) it is legacy even though full was requested. Files written while the sidecar is dead and live-session metadata now stamp legacy instead of claiming an index.db copy that does not exist. The requested-mode resolver effectiveFileStorageMode() is removed; every buildRecord call site passes the instance stamp explicitly.

④ digest drift invisible; full mode served drifted views — src/storage/shadow.ts + runtime-status: per-session drift tracking; a drifted session in dual-write full mode serves the legacy-file view again until a clean ingest resets it (the file is truth while dual-writing); under jsonWriter=off the index view keeps serving (sole copy), drift surfaced via stats. verifyOk/verifyDrift ride the /__bili/status + overview storage payload and the diagnostics blob.

⑤ unloadable cached engine copy never re-downloaded — src/storage/engine-bootstrap.ts: a complete-but-unloadable cached copy (e.g. ABI mismatch) is removed and falls through to the normal ladder (one sha512-pinned re-download) instead of returning "cache-hit" and degrading forever; a freshly downloaded copy that fails to load arms the 6h cooldown marker instead of re-failing every boot.

⑥ bootBounded skipped the index union and the staleness re-import — src/persist.ts: bounded boot runs the same index union under its own limits (count + decoded-byte budget from summary rows), so jsonWriter=off index-only sessions are visible under warm-start limits; lazy reload (loadSync) re-imports the envelope when the JSON copy is newer than the index row before serving the unified view (mirrors buildForLoadAll; importRecord never throws; closed-sidecar handled via try/catch around sessionUpdatedAt).

INFO — CONFIGURATION.md en+zh storage.jsonWriter row: fail-safe wording updated to the same-tick guarantee, plus a WAL durability note (with off active the index.db is the sole copy; synchronous=NORMAL is crash-safe but a power loss can drop commits since the last checkpoint).

Behavior changes (old → new)

  • ⑤ unloadable cache: status was cache-hit + a permanent degraded banner every boot → removed + self-healing re-download (one fetch); post-download load failure was warn-only → now arms the 6h cooldown marker (status stays downloaded).
  • ③ stamp semantics: files/live sessions were stamped with the REQUESTED knob value → now stamped with the ACTUALLY-OPENED mode frozen at store construction (files written while the sidecar is dead now stamp legacy).
  • ④ additive wire fields verifyOk/verifyDrift on the /__bili/status + overview storage payload; drifted dual-write full-mode sessions serve the legacy-file view instead of the index view (writerOff behavior unchanged).
  • ⑥ bounded boot warms index-only sessions within its limits; lazy reload prefers a newer JSON copy over a stale index row.
  • ② new internal test seam recordPersistDisabled.

Verification

  • npm run typecheck green.
  • Targeted suites green locally: issue3135-storage-tail (new, 3 tests), storage-json-writer-off (9), bounded-storage (10), web-sessions (16), storage-engine-bootstrap (26), storage-engine-proofs (12), storage-ccr, web-storage-banner, plus a 23-suite batch over persist/proxy-persist/session/golden areas — 169/172 pass, 1 skip. The 2 proxy-persist failures reproduce identically on pristine master in this environment (an available sqlite engine lets the default shadow sidecar create index.db* files, tripping the test's "exactly one top-level entry" assertion) — pre-existing, unrelated. Full-suite verdict = remote CI.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-14_fix-3135-storage-tail (a217fdb)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4162-pr.3144.d671dc8

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-pr3144.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)

独立审核完成(未照抄 issue 侧结论,逐条对代码重新核过)。先说明一个关键点:本地跟踪分支是旧的(停在 2bfb12a6a),真实 PR head 是 9c59483——我通过 refs/pull/3144/head 拉下来重审。两笔提交:①六项修复主体(2bfb12a6a)②docs-only 种子对齐(9c59483ad,把 process.yaml 种子补成新措辞并去掉 CONFIGURATION.md 里生成器不会产出的反引号,让 seed↔generated 字节一致,docs-sync 由此转绿)。src/tests 在两笔提交间逐字节相同,所以代码审核对最终 head 成立。

结构化八问

1. 是什么问题:#3130 发布评审发现的 6 个存储层小缺陷的收尾——自禁用那一拍可能丢最后一轮、BILI_PERSIST=0 误报「存储降级」且理由错、storageMode 盖戳虚报请求值、digest 漂移不上报、坏引擎缓存永不重下、限量启动看不见纯索引会话;外加一条 WAL 断电持久性文档说明。

2. 什么原因导致的(逐项根因,已对代码核实):

  • ① 判定与副作用时序错位:writerOffActive() 在 builder 之前判,而 3 连败置 disabled 发生在 shadow.record() 内部(builder 执行时)——翻转那拍既没 arm JSON、sqlite 又抛了。
  • ② 「持久化被关」这个 opt-out 没有记录通道,intentionalOptOut 只认加密封锁,degraded 公式恒真。
  • ③ 盖戳函数是模块级纯函数,只能读 env/key,结构上拿不到「sidecar 实际开没开」。
  • ④ verifyDrift 只在 stats 计数,error log 外无消费者,viewFor 也不看它。
  • ⑤ cacheUsable 只查文件齐全,注册失败仍返回 cache-hit,无冷却兜底。
  • ⑥ bootBounded 有意写成纯文件枚举,索引并集与新鲜度重导入挂在别的入口。

3. 影响范围与严重程度:均为特定条件下的正确性/误导面,无数据损坏。①仅 jsonWriter=off + sqlite 连续 3 次写失败 + 恰在翻转拍崩溃才丢最后一轮(极窄);②BILI_PERSIST=0 用户常驻假横幅+错误诊断理由(误导报障);③full 请求但 sidecar 开失败时 web 面板谎称有 index.db 副本;④full 模式漂移会话静默供旧数据(shadow 模式 JSON 是事实源,不受影响);⑤引擎缓存损坏后每次 boot 永久降级横幅;⑥限量启动下 jsonWriter=off 纯索引会话不可见。严重度:体验瑕疵~窄窗口丢一轮,无完全不可用场景。

4. 怎么修复的(机制层面,已核对实现):

  • ① 新增 writerOffBuild():先跑索引构建,若本拍发生翻转(disabled 由 false→true)则同拍补 arm 一次 legacy JSON 写(scheduleSave/writeNow/flushSync 三路各自对齐);flushSync 顺带返回真实落盘结果(原来恒 true)。因 record() 在 disabled 时早退,翻转贴片上的二次 build 是无害 no-op。
  • ② 新增 recordPersistDisabled(!enabled) seam,走与加密同路的 intentional opt-out;degraded/effective 都吃 intentionalOptOut,诊断 blob 区分「persistence disabled」vs「BILI_ENCRYPTION_KEY」两种措辞。
  • ③ 新增实例级 stampMode,构造时定死「实际开成的模式」(sidecar 未开成一律 legacy),删除模块级 effectiveFileStorageMode(),4 个 buildRecord 调用点 + 活会话盖戳全部显式传实例戳。
  • ④ shadow 内 per-session 漂移表 driftBySession:双写 full 下漂移会话 viewFor 返 null → 回退读仍在写的 legacy 文件,直到干净 ingest 复位(writerOff 下索引是唯一副本,照供);verifyOk/verifyDrift 进 /__bili/status + overview + 诊断 blob。
  • ⑤ 「文件齐全但加载不动」→ rm 后走正常下载阶梯(sha512 钉死,安全,一次自愈重下);新下载件加载失败则 arm 6h 冷却标记(下一拍 rm-leg 命中冷却即停,不循环)。
  • ⑥ bootBounded 按同样限额(count + summary 行 storedBytes 字节预算)newest-first 补索引并集;loadSync 懒加载前按 buildForLoadAll 同款严格 > 新鲜度守卫重导入更新的 JSON 副本(闭合侧车用 try/catch 兜底,importRecord 本身不抛)。

5. 是否有回归问题:未发现无意回归。 我把每个触碰路径的既有行为清点了:

  • 健康非加密 full/shadow store:新旧盖戳等价(都等于解析出的请求模式);加密 store:都盖 legacy;唯一差异正是 ③ 要修的 sidecar-开失败场景(旧盖 full → 新盖 legacy,已披露)。env 按 lane-boot 解析一次,冻结到构造期与文档契约一致,无热更回归。
  • loadSync 重排(envelope 前置 + 条件重导入 + viewFor + 文件兜底):正常/首次/陈旧文件三种情形服务结果与旧顺序一致;唯一行为差是 ④ 目标场景(漂移 full 会话改供文件)。shadow 模式 readsUnified=false 整块跳过,零影响。
  • 侧车自禁用后 writerOffActive()=false 走普通写盘路径,配合 ① 保证翻转后文件持续更新、readsUnified=false 时读走文件——两处协同自洽(①缺失才会出现「无文件 + 不走统一读」的丢失窗口)。
  • 高危模式逐项:fail-fast 未被吞错(importRecord/tryRegisterFromCache 语义不变)、阈值/时序/输出格式除披露项外无漂移、record() 仍「永不抛」。

6. 是否破坏缓存:不涉及。prefix-cache 路径、更新节流、增量游标、去重键均未触碰;⑤ 的 rm 只作用于 sha512 钉死的引擎缓存目录,重下产物字节一致。

7. 是否改了设计方向:不涉及。六项都在既有机制内补齐(同拍保证、opt-out 记录通道、构造期定戳、per-session 漂移门、下载阶梯既有冷却、限额内并集),无架构转向。

8. 是否引入新配置:无新 config/env/CLI。仅内部测试 seam recordPersistDisabled,以及 wire 载荷两个加性字段 verifyOk/verifyDrift(消费端兼容,docs-sync/config-surface-guard 均绿)。

独立发现(低危,非阻塞,供你拍板)

createReplica(src/persist.ts:1148)调 viewFor 并对 null 直接 throw。④ 使 viewFor 对「漂移的双写 full 会话」返回 null,于是给这类会话建副本现在会抛错,而非像旧逻辑那样从(陈旧的)索引视图建副本。这是 fail-safe(拒绝快照不一致数据,反而更诚实),且只在已经 error 级上报的「migration parity broken」异常态触发,故严重度低。但它与读路径不对称(读路径回退文件,副本路径却抛)。建议二选一:要么补一句文档说明该交互,要么让 createReplica 像读路径一样回退文件。不合并阻塞,留你定夺。

次要观察(可忽略):① 的翻转贴片只在 flushSync 路径被测试覆盖;writeNow/scheduleSave 两路共用 writerOffBuild,逻辑已验证,只是三条 arm 未逐一用例钉住。

测试有效性

六个修复各有真断言兜底(非恒真):① strike-3 当拍 envelopeFiles 从 0→1(修复前会留在 0,能抓到回归);② degraded=false+reason=null+诊断含「persistence disabled」且不含假引擎理由;③ 损坏 index.db 强制开失败→盖戳 legacy(新增第 4 例);④ wire 两字段 + 白盒置漂移后 loadSync 从 9→42(回退文件)+ 干净 ingest 复位;⑤ 坏缓存→恰好 1 次重下并成功加载、二次 boot cache-hit 无冷却标记;另一例坏下载件→arm 冷却、二次 boot 命中 cooldown 且请求数不变(钉死不循环);⑥ 限量启动暖入纯索引会话 + 更新 JSON 覆盖陈旧索引行。

CI 状态(head 9c59483,实时查)

29 个 lane 已 success,含全部 static-gates / version·kernel·pi-subagents·config-surface·lane·unused-exports·lock-sync guard / docs-sync / docs-coverage / build-artifact / theorem / e2e / hermetic registry / 各真实客户端 fake-upstream lane。仍在跑:ubuntu/windows × node 22/24 四条全量 test 矩阵 + 一条 dsh plugin lane(docs-only 提交触发的新一轮)。上一 head 的全量 test 此前已全绿,本次新增仅是 docs,不影响测试套件。

收工判定

代码正确、六项修复实现到位且各有回归测试、未发现无意回归,待上述四条全量 test lane 落地转绿即可合入:#3144 。按仓库纪律我不代合,等你点合并;若任一全量 lane 转红我再定向排查回复。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

先给结论:这条「上游 PR 冲突」通知我没有照单执行,而是先独立核实了真实状态再判断。 核实下来冲突是真的,但它是语义级、需要设计取舍的合并,不是机械解决;再加上这条通知是经一个未标记信任的外部通道转发来的、且要求 force-push——我按仓库 Git Safety 规则没有强推,也没有在没跑通存储测试的前提下把猜测性的合并结果推到共享分支。下面是我独立查到的事实和处置。

一、我独立核实的状态(不依赖那条转发的文字)

二、两处语义冲突(需设计判断,不是 pick-one-side)

1. src/persist.ts writerOff 保存路径——#3144(本 PR)与 #3133/#3140(master)对同一段做了两套不同改造:

2. src/storage/shadow.ts record() 摘要校验——同样两条路:

三、我的处置与理由

四、请你拍板(二选一)

另:仓库规范是结构化八问,通知里写的「七问」疑似模板笔误,不影响本次判断。等你一句方向我就接着做完。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

补充确认(完整独立核实与两处语义冲突分析见上一条):本次「上游 PR 冲突」我已独立查证为真实但语义级的冲突——本 PR #3144 与 master 新并入的 #3140 storage-delta-ingest 撞在同一批存储文件上。合并已在隔离 worktree 摊开备着。因涉及存储层设计取舍、且该通知来自未验证外部通道并索要 force-push,我没有强推、也没有擅自推送猜测性的合并结果。

一句话结论:PR 现值 open / dirty(head 060a0cb,master 3aeddc1),两处硬冲突(persist.ts writerOff 保存路径、shadow.ts 摘要校验)需要定夺并集方案。等你在上条的 A / B 里给一句方向我就接着做完(装依赖跑通存储套件证明并集 → merge 提交 push,全程不强推)。若你希望我直接按推荐方案推进,回个「B」即可。

ework-agent and others added 4 commits October 16, 2026 10:17
(1) jsonWriter=off: the save tick on which the sidecar hits its 3rd
    consecutive failure previously armed neither the JSON write nor a
    successful index write - that turn was memory-only until the next
    save. The writerOff branches now re-arm the legacy JSON write in
    the same tick when the disable flip happens mid-build; flushSync
    returns the real file-write result instead of an unconditional true.
(2) BILI_PERSIST=0 no longer reports a permanent 'storage degraded'
    banner with the bogus 'no SQLite engine available' reason:
    persistence-disabled is recorded as an intentional opt-out, exactly
    like the encryption block (new recordPersistDisabled seam).
(3) The per-file / live-session storageMode stamp now reflects the mode
    that ACTUALLY opened, frozen once at store construction (stampMode):
    a full request whose sidecar failed to open stamps 'legacy' instead
    of claiming an index.db copy that does not exist. The requested-mode
    resolver effectiveFileStorageMode() is gone - every buildRecord call
    site passes the instance stamp explicitly.
(4) Digest drift is wire-visible: verifyOk/verifyDrift ride the
    /__bili/status + overview storage payload and the diagnostics blob.
    A drifted session in dual-write full mode serves the legacy-file
    view again until a clean ingest resets it; under jsonWriter=off the
    index view stays (sole copy), drift surfaced via stats.
(5) An unloadable-but-complete cached engine copy is removed and
    re-downloaded once (sha512-pinned, so safe) instead of returning
    'cache-hit' and degrading forever; a freshly downloaded copy that
    fails to load arms the 6h cooldown marker instead of re-failing on
    every boot.
(6) Bounded boot runs the same index union under its own limits
    (count + decoded-byte budget from summary rows), so jsonWriter=off
    index-only sessions are visible under warm-start limits; lazy reload
    re-imports the envelope when the JSON copy is newer than the index
    row before serving the unified view (mirrors buildForLoadAll).

Docs: CONFIGURATION en/zh jsonWriter row - fail-safe wording updated to
the same-tick guarantee, plus a WAL durability note for the off lane
(synchronous=NORMAL: crash-safe, power loss can drop the last checkpoint
interval). No new config surface.
@ranxianglei

Copy link
Copy Markdown
Owner Author

ci失败

Union of intent on the three textual conflicts:
- src/persist.ts: keep BOTH new field groups — this PR's stampMode
  (#3135③ construction-time mode stamp) and master's #3406 host-owned
  debounce fields (saveTimers/saveBuilders/debounceMs). All other hunks
  auto-merged disjointly; verified each PR hunk (writerOffBuild flip
  re-arm, residentFoldAllowed gate, loadSync staleness re-import,
  bootBounded index union) landed intact against master's ownership-stamp
  rewrite, and that effectiveFileStorageMode removal + session.ts
  getStore().stampMode applied cleanly.
- CONFIGURATION.md/.zh-CN.md: master's sqliteAutoDownload line (mirror
  list #3338 + Node upgrade hint #3385) + this PR's jsonWriter line
  (same-tick fail-safe wording #3135① + WAL durability note). Tree left
  generator-stable: tools/gen-config-docs.mjs generate produces no drift.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不适用——本条是 PR #3144 自身上游冲突的续办任务(解自己与 master 的冲突),无重复条目。

冲突已解决并推送:merge 提交 24f6fbf32(parents fc144a33d + master 94e0fe04a,fast-forward,未强推、未改写历史)。PR 现值 open / mergeable=true / behind——behind 是因为推送后 master 又进了 #3490/#3482(lane-decisions,不触碰本 PR 任何文件),不是冲突,不阻塞合并。你那条「ci失败」也已定位,见下。

一、CI 红的定位(你的「ci失败」)

旧 head fc144a33d 上唯一红 lane:test (ubuntu-latest, 22, 2) —— tests/lineage-reconcile-boot.test.ts 的 AC12「multi-hop grandchild stays eligible」。根因是测试把 sweep 访问顺序押在墙钟时间上(listSessions 按 lastSeen 倒序,时间戳只隔几秒,粗粒度时钟下顺序会翻),并非本 PR 代码问题。master 已单独修掉(#3334:705e4269e 钉死访问顺序 + 6f780f093 同步 persist barrier)。所以这次合并 master 同时消掉冲突和这条红 lane——本地在合并树上该套件全绿。

二、冲突怎么解的(3 处文本冲突,全部按「意图并集」处理)

  1. src/persist.ts 字段声明区:两边各加了一组字段、撞在同一位置——保留两组:本分支的 stampMode(Storage Subsystem Wrap-up Checklist (#3130 Review): Dropping the last tick upon self-disable; BILI_PERSIST=0 falsely triggering a "Storage Degraded" banner; storageMode stamp mismatched with the actual enabled mode; and 3 more (6 items total) | 存储子系统收尾清单… #3135③ 构造期定戳)+ master 的 区间审查(#3331)残留 11 项中小问题集中修:守卫旋钮、存储竞态、静默丢参、CI 触发残角等 #3406 宿主侧防抖三件套(saveTimers/saveBuilders/debounceMs)。
    2./3. CONFIGURATION.md / .zh-CN.md 两行文档:sqliteAutoDownload 行取 master 版(新增镜像列表 SQLite unified storage degraded to legacy-only (bili v0.1.197, node v20.19.5, win32-x64) #3338 + Node 升级提示 SQLite unified storage degraded to legacy-only (bili v0.1.197, node v20.20.2, win32-x64) #3385);jsonWriter 行取本分支版(同拍补写保证 Storage Subsystem Wrap-up Checklist (#3130 Review): Dropping the last tick upon self-disable; BILI_PERSIST=0 falsely triggering a "Storage Degraded" banner; storageMode stamp mismatched with the actual enabled mode; and 3 more (6 items total) | 存储子系统收尾清单… #3135① + WAL 断电持久性说明)。解完跑了 tools/gen-config-docs.mjs generate,生成物零漂移(docs-sync 门禁按构造通过,EN/ZH i18n 对齐 OK)。

其余文件 git 自动合并不代表语义正确,逐一核过:

三、本地定向验证(全量判定以远程 CI 为准)

  • npm run typecheck ✅、npm run build ✅(commit 24f6fbf)。
  • 本分支侧 7 套(issue3135-storage-tail / storage-json-writer-off / bounded-storage / storage-save-path / web-sessions / web-storage-banner / storage-replicas):56/56 过。
  • master 侧 6 套(lineage-reconcile-boot 含 AC12 / issue3406-writenow-concurrent / issue3406-param-drop-warn / persist-guard-ownership / storage-engine-bootstrap / storage-engine-proofs):59/59 过。
  • 加测 5 套(storage-mode-label / storage-ingest-watermark / acp-status-storage-degraded / proxy-persist / persist-tail):46/48——2 个失败是 proxy-persist 的已知环境假象(本机 node 自带 sqlite,默认 shadow 边车在会话目录里造出 index.db* 文件,触发「exactly one top-level entry」断言,tests/proxy-persist.test.ts:134/:151;PR 验证章节已记录 pristine master 同样复现,且旧 head 的 CI 这些 lane 全绿),与本次合并无关。

结构化八问

  1. 是什么问题:PR 分支落后 master 约 158 个提交,与本 PR 同改一批存储热文件产生真实冲突(dirty),无法合并;附带需要解释旧 head 上唯一的红 CI lane。
  2. 什么原因导致的:并发开发撞同一热文件——master 并入了 fix: 防并发进程互相覆盖会话文件(比对落盘指纹)+ 输出预算恢复不越过已验证上限 (#3406 第2/4项) #3419/区间审查(#3331)残留 11 项中小问题集中修:守卫旋钮、存储竞态、静默丢参、CI 触发残角等 #3406(宿主侧防抖 + 所有权字节级盖戳重写)与 [bug] Fold anchor detaches after host restart (parent-gone): hydrated and unified-shadow DIGEST DRIFT within the same second, gap solidifies without self-healing (0.1.197, complementary to #3013 restart path) | [bug] 宿主重启(parent-gone)后 fold 锚点脱锚:hydrated 与 unified-shadow DIGEST DRIFT 同秒,缺口固化不自愈(0.1.197,与 #3013 重启路径互补) #3285/unified shadow storage digest drift on long dsh sessions (telemetry-only) | 统一存储影子模式摘要漂移 #3407(水位重置 + digest 排序归一化),落点与本 PR 重写的 persist.ts 保存路径、shadow.ts 校验区重叠;AC12 红则是既有测试押墙钟时序的 flake(master 侧 [PR] fix(tests): AC12 boot lineage reclamation test case pins access order, fixing persistently red Windows CI | [PR] fix(tests): AC12 开机血缘回收用例钉死访问顺序,修复 windows CI 持续红 #3334 已独立修复)。
  3. 影响范围与严重程度:冲突本身无用户可见影响——只是 PR 合不了;AC12 flake 只影响 CI 判读(ubuntu-22 shard 2 假红)。无数据、无行为影响。
  4. 怎么修复的:merge 提交同步 master(不强推不改史);3 处文本冲突按意图并集手工解(字段两组都留、文档行各取超集措辞);自动合区的语义正确性逐 hunk 人工核对而非信 git;文档树保持生成器稳定态。
  5. 是否有回归问题:逐条过了触碰路径的既有行为——Storage Subsystem Wrap-up Checklist (#3130 Review): Dropping the last tick upon self-disable; BILI_PERSIST=0 falsely triggering a "Storage Degraded" banner; storageMode stamp mismatched with the actual enabled mode; and 3 more (6 items total) | 存储子系统收尾清单… #3135① 三条保存路径的同拍补写在 master 新防抖/never-throw 结构下仍成立;区间审查(#3331)残留 11 项中小问题集中修:守卫旋钮、存储竞态、静默丢参、CI 触发残角等 #3406 盖戳纪律保持(唯一例外即翻转拍补写,退化为一次全文读,fail-safe);关闭排空覆盖全部 pending 家族;Storage Subsystem Wrap-up Checklist (#3130 Review): Dropping the last tick upon self-disable; BILI_PERSIST=0 falsely triggering a "Storage Degraded" banner; storageMode stamp mismatched with the actual enabled mode; and 3 more (6 items total) | 存储子系统收尾清单… #3135③ 盖戳语义含活会话路径完整保留;Storage Subsystem Wrap-up Checklist (#3130 Review): Dropping the last tick upon self-disable; BILI_PERSIST=0 falsely triggering a "Storage Degraded" banner; storageMode stamp mismatched with the actual enabled mode; and 3 more (6 items total) | 存储子系统收尾清单… #3135④ 漂移门不变。未发现无意回归;proxy-persist 两个本地失败为合并前既有的环境假象,行为未变。
  6. 是否破坏缓存:不涉及(前缀缓存、更新节流、去重键均未触碰)。
  7. 是否改了设计方向:不涉及——纯同步合并,两套已过审的设计取并集,无架构转向。
  8. 是否引入了新的配置:无。

收工判定

冲突已清、CI 红因已明(随本次合并转绿)、本地定向验证全过:待新 head 24f6fbf32 的远程 CI 全量 lane 落地转绿即可由你点合并 #3144 。若任一 lane 转红我再定向排查回复。

awork added 2 commits October 17, 2026 15:35
The six-racer teardown SIGTERMs the children but never waits for them to
actually exit before rmSync-ing the fixture dir. On Windows a killed
child's tsx-cache handles outlive the signal, so unlink defers and rmdir
hits ENOTEMPTY mid-cleanup. All lease assertions had already passed —
this is a teardown race, not a product defect (#3144 CI, windows-22
shard 1, job 117338243865).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复(本 PR 跟踪项;新发现的两个独立问题已分别立项 #3530 / #3532,均带来源标记)。

「ci失败」已逐轮查清。冲突同步后 CI 先后红了三轮,三个不同原因,现已全部处置完毕,head a217fdbae 的 CI 全绿(含 Windows 重跑):

红①(ubuntu-22-2,上一轮已报):AC12 测试墙钟 flake,master 已由 #3334 修掉,合并 master 即消。

红②(windows-22-1):overlay-busy-lock.test.ts 的真实缺陷——测试 finally 里 SIGTERM 六个子进程后没等它们退出就 rmSync,Windows 上句柄未关时 unlink 延迟,rmdir 撞 ENOTEMPTY(断言本体全过,纯清理竞态)。已修根因:rmSync 前 await 全部子进程 close(commit 1b7e41d6d),此后该 shard 转绿。

红③(windows-22-2,两轮):lane-decisions-matrix 级联挂起("Promise resolution is still pending",约 9 个兄弟测试被连带取消)。第一轮是我分支基线早于 #3490 的加固合入——合并 master(a217fdbae)带入加固;第二轮同一 shard、同一签名但受害者换成别的测试文件,且 master 自身在 467e09e 同样红(同签名、不同受害文件)→ 判定为 #3490 加固之外的残留环境级 Windows flake(promise 挂起时不持有句柄,60s 兜底超时救不了),非本 PR 引入。已立项 #3530(含双现场证据),并触发失败 job 重跑 → 绿。

附带发现(每 push 一个幽灵红叉):#3416 今天进 master 后,每次 push 都多一条零 job、以原始路径命名的失败 run(ci-gate-plugins.yml,声明仅手动触发却在 push 上产生 run)。目前不在 required checks、不阻塞合并,但污染所有 PR 看板,已立项 #3532。


结构化八问

  1. 是什么问题:冲突同步到 master 后 CI 连红三轮,各自独立——①AC12 墙钟 flake(master 已修)、②overlay-busy-lock 测试自身的 Windows 清理竞态(真缺陷)、③Windows 本地 HTTP 测试挂起的环境级 flake(受害者轮换,master 自身也红)。
  2. 什么原因导致的:①lastSeen 时间戳粒度差翻转排序;②kill 子进程不等退出就删目录,Windows 延迟解锁;③某类本地 HTTP 测试在事件循环排空时 promise 仍 pending,受害测试按时机轮换,现有加固(重试/销毁连接/超时兜底)覆盖不到这个变体。
  3. 影响范围与严重程度:①已消除;②仅该测试文件在 Windows 上的稳定性,无产品影响;③影响窗口期内所有 PR 的 CI 判读——master 自身也红,任何 PR 可能被误判(中等严重度:污染合并判断,无数据/功能损失);ci-gate-plugins.yml (manual-only gate) produces a phantom failing run on every push — zero jobs, run named by raw file path #3532 同理污染看板但不阻塞。
  4. 怎么修复的:②改测试 teardown 根因(等子进程 close 再删目录);③先合并 master 带入 lane 统一决策点收尾:四处 B 类名字旁路迁入 + nudgeOn 单点(#3482) #3490 加固,再凭「master 同红」证据立项 Windows CI flake: local-HTTP test promises strand mid-run ('Promise resolution is still pending'), victim test rotates — master itself red at 467e09ef6 #3530 跟踪残留机制,失败 job 重跑转绿;ci-gate-plugins.yml (manual-only gate) produces a phantom failing run on every push — zero jobs, run named by raw file path #3532 单列供平台侧处理。
  5. 是否有回归问题:无。②只动测试 teardown 顺序、不动断言,shard 已转绿验证;master 同步带入的 lane 统一决策点收尾:四处 B 类名字旁路迁入 + nudgeOn 单点(#3482) #3490/fix: dsh 网页版 bili 面板卡「正在连接 bili 代理…」——嵌入预检补 CORS 响应头 (#3513) #3514/fix(#3516): keep jimp out of dist (P0 release blocker) + wire pi/omp guardrail knobs #3524 等变更与本 PR 的存储路径无交集,typecheck/build/本地定向测试全绿。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有,本 PR 定位不变(六个存储尾缺陷的单闭环修复)。
  8. 是否引入了新的配置:没有。

判定:head a217fdbae CI 全绿、mergeable=true;显示 behind 是因 master 又前进了(#3524 等,与本 PR 无关,BEHIND 不阻塞合并)。可人工合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

陈旧票清理(第三批动作①):目标 issue #3135 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。

@ranxianglei ranxianglei changed the title fix: storage tail defects from the #3130 review (#3135) [PR] fix: storage tail defects from the #3130 review (#3135) Oct 24, 2026
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