Skip to content

[PR] storage: snapshot table compression foundation P0+P1 (schema v12 4-table + shadow write, all off by default, zero behavi | storage: 快照表压缩底座 P0+P1(schema v12 四表 + 影子写,默认全关、零行为变化) - #5901

Closed
ranxianglei wants to merge 60 commits into
masterfrom
2026-11-07_snapshot-table-foundation

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

这是啥 / 做什么

讨论 #5874「快照表式压缩底座」的干净实现,一次 PR 做到 P0 + P1 两个阶段,全程默认关闭、不改变任何现有行为:

  • P0(零行为变化):schema 升到 v12,加四张新表(l1_world 身份账本 / snap_rows 快照行 / snap_log 事件日志 / snap_ckpt 折叠点)+ 一个索引,外加单事务提交原语(事件按序落行 → 逐条记日志并写 S4 校验和 → 可选折叠进 checkpoint,任何一步出错整个事务回滚,不留半态)。读侧重建会重算校验和,对不上就永久关死该会话的平面(R1)。
  • P1(影子写):每次 ingest 提交后,同一 tick 内用一个独立事务把平面推导出来(稳态 delta 追加走快路,其余走最终态 diff:cast/update/delete/compact,全部按内核管道自己的证据寻址——block 覆盖区间 / ledger seq,不做模糊匹配)。推导不出事件的那一轮直接不写(R2);crash 丢掉的一轮由下一轮保存自愈(diff 是幂等的最终态对比)。读侧只比对、永不对外提供服务——出站字节一个都不变。

回滚 = 关旗(两表自动空转)或 DROP 四张表 + user_version 退回,没有任何数据迁移。

关键设计点

  • 提交原语(src/storage/snap.ts):单事务;seq 严格单调且恒 > max(log 最大 seq, ckpt_seq);折叠时写三件套 meta(内核 kstate 原文 + 块覆盖映射 + S4 聚合),日志在折叠点截断,深度有界。
  • 行永不物理删除:delete/compact 只翻 active=0,pre/post 双形态保留;物理清理只在该行的覆盖块消失后发生(GC 释放阀)。
  • 两级开关(storage.snapBase,只走 config-file,不新增 env 旋钮,彻底整治环境变了滥用,除非必要都走配置文件 #2030 纪律):enabled(master)⊃ shadowWrite(lane),任一层在 knobs 和 store 两处都强制嵌套,默认全关。
  • /__bili/status 加 snaplane 字段(旗状态 + 各表计数 + 按 sid 的死锁列表),sessionStorageStats 加平面维度。
  • deleteSession 级联四张表,不留孤儿(T6)。

测试

  • tests/issue5874-snapbase-p0.test.ts(9 个):T1 v11→v12 纯加性升级(11 张 legacy 表 dump 逐字节不变)+ DROP 回滚复原;T1b 新装直达 v12;T2 原子性/无半态;T2b 跨折叠 seq 单调;T2c S4 篡改 ⇒ R1 粘性死锁;T2d delete/compact 不物理删;T6 级联无孤儿;flag 嵌套两层各 5/4 例。
  • tests/issue5874-snaplane-p1.test.ts(4 个):T3 B1 陷阱钉(同一 wire 重放 ×3 次重启,l1 只发一次、一轮武装、重启稳定);T4 A/B 影子比对(每次保存后平面活跃行 == legacy live 行,逐 pos 逐字节;含 crash gap 自愈);T7 块覆盖区间落进 ckpt 覆盖映射([["blk-c1", 0, 7]])且被盖行双形态保留;T9 40 轮 B1 重放下日志深度 ≤256、行数 O(pos)。
  • 既有迁移套件的 schema 头断言 11 → 12(5 个文件、纯数字改动)。
  • 本地全绿:新增 13 个 + storage 回归 73 个(69 pass / 4 skip),tsc --noEmit 干净,check:unused-exports 干净。

config surface

新增 storage.snapBase 两个键(config-file only,不新增 env,#2030 纪律):

key type default 说明
storage.snapBase.enabled boolean false master 旗:启用 v12 四表平面的读/写原语
storage.snapBase.shadowWrite boolean false lane 旗:ingest 提交后同 tick 影子推导;knobs 与 store 两层强制嵌套 ⊂ enabled
storage.snapBase.egress boolean false 出站旗:P2 切面成为出站权威(direct authority,无 tripwire);true 才生效
storage.snapBase.egressCohorts string[] 4 协议全含 egress 生效的协议名单(responses/openai/anthropic/google)
  • 为什么现有面表达不了:providers 表管上游接入、compress.* 三级层次管压缩引擎参数——快照表平面是存储层新机制,两处都没有可挂载的键位;按纪律走 knobs 的 config-file key(env > file > default),不加 env。
  • 兼容性/迁移:默认全关 ⇒ 现有实例零行为变化;v11→v12 纯加性升级(T1 逐字节钉);回滚 = 删配置段或 DROP 四表 + user_version 回退,无数据迁移。文档已随 docs commit 落 CONFIGURATION.md en/zh + website/config-reference/process.yaml。

需要 owner 裁定的点(先按我的默认做,讨论后改)

  1. 与 [PR] Re-land v6 composite-identity fastpath lane — inverse of #5854 revert (base for snapshot-centric rework, #5643) #5855 的时序依赖:未合并的 fastpath re-land 也占用了 v12/v13 版本号(pf_* 两张表组)。本 PR 基于最新 master 拿 v12;两个 PR 后落地的一方机械重编号自己的 CREATE 块即可(形状互相独立,无数据迁移)。[PR] Re-land v6 composite-identity fastpath lane — inverse of #5854 revert (base for snapshot-centric rework, #5643) #5855 先合就我来改,它后合就它改——请裁定。
  2. cohort 名单:提案 §9 说 cohort 名单走配置级声明,本 PR 的开关是全局两级旗(master ⊃ lane),没有做 per-cohort 名单(P1 影子写对所有非 lane 会话生效,仍不出站)。如果 owner 希望 P1 就按名单限定影子范围,加一个 key 即可。
  3. mysql 后端:平面目前只接了 sqlite 路径(async/mysql 后端打开时不传旗,等价于关)。

Refs discussion #5874.

2026-11-11 update — P2 (mapEgress) landed + P2-final in-request snapshot write

P2 (earlier in this PR): the outbound compressed context is now served from the S4-verified snap plane instead of the in-memory history. Owner ruling (2026-11-11): the plane is the DIRECT outbound authority — no per-round diff, no tripwire, no seam-walk re-alignment; the only degrade paths are the defined no-plane ones (no plane → legacy bytes, assembly error → legacy for one round, degrade-reason counters on /__bili/status). Opt-in via storage.snapBase.egress: true (+ egressCohorts protocol list) — the 2026-11-08 100% soak ran it on and was reverted to default-OFF on 2026-11-13; flipping egress off is a zero-byte rollback.

P2-final (this push): the six-stage chain now runs in the proposal's own order — raw bytes → protocol conversion → kernel rewrite → snapshot write (in-request) → egress rewrite → egress. Previously the plane was fed by the 500ms debounce AFTER the response, so the egress stage always read one save behind and had to splice this round's own resend as a client tail. Each kernel lane now flushes the store synchronously right after processTurn (snapshotMessages first, then SessionStore.flushOrSkip); a failed flush degrades the round to the legacy egress path (tripwire-safe), and the debounce is re-armed only if the session mutated after the flush. A compression turn's brand-new block is plane-readable in the same round and this round's own resend carries an empty tail. The watermark window pin (wpHit.windowCores) moved with the write, expression unchanged; nothing between the two positions reads session.lastMessages, so pin semantics are byte-identical.

Docs updated: configuration en/zh (regenerated from the process.yaml seed), proposal README en/zh status lines.

kernel-change: kernel/src/relocate-compress.ts + parse-compress-input.ts + tests — relocated fold summaries ride the #335 live-carrier protection; parse classifies a re-sent fold-point pointer (already-folded-echo) and salvages a stringified single-entry content (kernel version follows master, workspace path unchanged).

2026-11-11 update — master merge (#5608-C/D) parity fix

Master's #5608-C/D (resume-timestamp-ledger-carry) was merged in: a fold's ledger alignment raises the timestamp visibility high-water mark, after which the kernel's render intentionally drops the time attribute from old refs (prefix-cache economics). Two follow-ups:

2026-11-11 update — image-plane fix (fafca54)

The plane rows persist the media-offloaded form (imageBase64 = {"$media": hash}, #3762), and every row accessor hydrates it on read — the new snapEgressView was the one accessor that returned the raw split form. Any image in the history fed that offload object into sha256 inside the seam walk / tripwire, the TypeError escaped into the lane catch, and the lane forwarded the unprocessed client bytes (kernel render, watermark and tripwire all skipped). Symptom in CI: the full-resend arm lost its <acp> render tags while the incremental arm kept them — rolling cache_control: image payloads stay exact when marks move red, deterministic.

  • store.snapEgressView now hydrates postJson through the same hydrateMedia the other accessors use (CAS bytes, byte-identical).
  • applySnapEgress now enforces the never-fail contract: any assembly error degrades (counter + warn + legacy bytes) and can no longer throw into the lane.
  • identitySig is robust to the offloaded form (the $media hash is the byte identity — both forms sign identically) and cannot throw.

Verified: the previously red suite green 3/3 locally (CI preload chain), P0/P1/P2 + snapshot-render 45/45, media/ingest regression 18/18, full CI green on fafca54.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_snapshot-table-foundation (7526eb8)

Latest build — install this exact version

npm install -g billion-context@0.0.10050-pr.5901.7c58bc8

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
7526eb8 billion-context@0.0.10050-pr.5901.7c58bc8 build
eb0670d billion-context@0.0.9932-pr.5901.ee92921 build
f42f251 billion-context@0.0.9920-pr.5901.feb8ed2 build
a5bc1f8 billion-context@0.0.9612-pr.5901.0d116ad build
7b6eb98 billion-context@0.0.9585-pr.5901.27c033c build
26ec84c billion-context@0.0.9571-pr.5901.37c82e1 build
676bd28 billion-context@0.0.9570-pr.5901.bdaf2ba build
d64044b billion-context@0.0.9557-pr.5901.087ea5e build
7d569c4 billion-context@0.0.9548-pr.5901.f4d3146 build
8518b8c billion-context@0.0.9498-pr.5901.8fbf5d4 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title storage: 快照表压缩底座 P0+P1(schema v12 四表 + 影子写,默认全关、零行为变化) [PR] storage: snapshot table compression foundation P0+P1 (schema v12 4-table + shadow write, all off by default, zero behavi | storage: 快照表压缩底座 P0+P1(schema v12 四表 + 影子写,默认全关、零行为变化) Nov 7, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

接单。查重结论:不重复——开放 [PR] 列表里没有第二个快照表底座实现 PR;相关但有区别的两条:#5873(设计提案 PR,同主题的 design 阶段,本 PR 是其实现)与 #5855(fastpath re-land,与本 PR 争 v12/v13 schema 版本号,PR 正文已自行标出)。

标签:p3 + scope/storage(默认全关、零行为变化的存储层底座,当前无用户面影响;非缺陷类不打 bug)。

正在做完整 review(方向/回归/代码/测试有效性/diff 整洁度五关)+ 核对 CI 实时状态,结构化八问结论随后在本线程给出。PR 里三个待裁定点我会各自给独立判断供你拍板。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 自动修复 lane(attempt 1/3):原 head 0b54eee4 的 4 个红 test shard 归因到 两个独立失败,均在 PR 分支上以机械修复合入,新 head 2723ec58 全矩阵已绿。

修复内容(2 个独立标注 commit)

  1. docs: — 补 storage.snapBase.enabled / storage.snapBase.shadowWrite 两条 seed 条目(website/config-reference/process.yaml,双语描述、file-only、无 env 档),并跑 node tools/gen-config-docs.mjs generate 再生成 CONFIGURATION.md / zh-CN 索引行。修掉 config-surface-guard(对现有配置文件的形态进行盘查,需要增加特殊ci专门屏蔽违规添加的配置 #2643)在 3 个 shard(ubuntu 22/3、ubuntu 24/3、windows 22/4)的红。
  2. test: — tests/issue5874-snapbase-p0.test.ts 的 flags 测试原来开了 5 个 UnifiedStore 却不在清理前关闭,rmSync 时 sqlite 句柄仍持有目录;Linux 允许 unlink 打开中的文件所以本地绿,Windows 直接 EBUSY(windows 22/2 shard 红)。改为收集 store、finally 里先逐个 close() 再删目录,与同文件 T1/T2/T6 的既有清理模式一致。

结构化八问

  1. 是什么问题:PR 新增的两个配置键没进文档种子(guard 对任何未文档化新叶子红);新增测试在 Windows 上因未关库句柄删不掉临时目录。
  2. 什么原因导致的:前者是文档面遗漏(guard 的设计本意就是拦住这种);后者是测试资源生命周期缺陷——close 缺失在 Linux 上不可见(unlink 成功),只有 Windows 的文件锁语义暴露它。
  3. 影响范围与严重程度:纯 CI 红,零运行时影响——两旗默认全关、出站字节不变是本 PR 的核心承诺,未被触碰。严重度 = 阻塞合并(4/12 个 test shard 红)。
  4. 怎么修复的:文档面按仓库既有流程补种子 + 再生成(不手改生成块);测试面补 close,不改任何断言语义。
  5. 是否有回归问题:无。审计过 diff 触碰路径的既有行为:flags 嵌套语义(master⊃lane 在 knobs 和 store 两处强制)、schema v12 纯加性升级、deleteSession 级联——均未动;commit 1 只增文档行,commit 2 只动测试自身。本地定向验证:config-surface-guard 5/5、issue5874 P0+P1 共 13/13 通过、typecheck 干净。
  6. 是否破坏缓存:不涉及——未触碰缓存/重试/增量游标/去重键。
  7. 是否改了设计方向:不涉及——仅文档补齐与测试修复。
  8. 是否引入了新的配置:无新增——本次只是把 PR 自己已引入的两个键(均默认 false、仅配置文件层、无 env,符合 彻底整治环境变了滥用,除非必要都走配置文件 #2030 纪律)补进文档面;配置面本身由 PR 作者设计裁定(见 PR 正文「需要 owner 裁定的点」),本 lane 未越权改动。

收工判定:新 head 2723ec58 全部 51 项 check 完成,37 success + 14 skipped,0 failure(含此前红的 4 个 shard 与 static-gates/docs-sync/mysql-contract)。可进人工 review/合并。

@ranxianglei ranxianglei added the enhancement New feature or request label Nov 7, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Review 结论(PR #5901,现 head 73c429c33c)

先报状态(均实时核过):

结构化八问:

  1. 是什么问题:这是功能 PR(快照表压缩底座 P0+P1),不是缺陷报告;review 在其内发现一个真 bug——宿主侧行退役(rewind)后,GC 物理释放行却不重锚 S4,下次读把健康平面误判为损坏(R1),粘性锁死该会话平面直到进程重启。
  2. 什么原因导致的:设计不变量是「rows 表是真相,任何物理变更必须伴随锚点更新」。提交原语满足它,但 snapGcCoveredRows 在提交原语之外的独立事务里删行、不更新锚点——末条日志的 sumAfter 覆盖了已不存在的行,读侧重算必然对不上。
  3. 影响范围与严重程度:仅两旗开启时可达(默认关 ⇒ 现有用户零影响);影子阶段不出站字节,但影子模式的核心承诺(每轮跟踪 + A/B 对账)对含 rewind 的会话永久失效,deadSids 会进 /__bili/status。机制自身致命、用户侧暂无感。
  4. 怎么修复的:GC 物理删除时在同一事务内做一次纯重锚 fold(当前 log tail),保留原设计「deleted 立即释放」的时序,只补锚点一致性。同时补齐至今缺失的快路覆盖——既有 P1 测试全走 planIngest(full),snapFastAppendEvents 从未在 CI 跑过:新增测试驱动真实 watermark/delta 机制,稳态 append 走快路('append' kind 钉住)、rewound tail 使 delta 作废并经 diff 逐字节收敛、且跨释放轮保持存活(该条即 R1 回归钉)。
  5. 是否有回归问题:逐项审过既有行为——schema v11→v12 纯加性(T1 钉 legacy 11 表 dump 逐字节不变 + DROP 回滚复原);/__bili/status 新增 snaplane 字段是 additive;sessionStorageStats 多 4 个 COUNT 子查询(微开销);deleteSession 级联四表无孤儿;旗嵌套两层强制、默认关 ⇒ 既有路径零变化。无意回归:无。有意行为变更披露:schema 版本 11→12(纯加性)、status 新字段、stats 新 4 维度、新配置键 2 个(默认 false)。
  6. 是否破坏缓存:不涉及——存储层纯增量,不碰出站 wire/前缀缓存,pf-*/增量信道不感知这四张表。
  7. 是否改了设计方向:没有——按提案 提案:快照表式压缩底座(六段固定链,单一存储真源) #5874 原样落地(P0/P1 边界、两级旗、R1/R2 语义);本次修复只修 GC 的内部不变量违背,不改方向。
  8. 是否引入了新的配置:有——storage.snapBase.enabled / storage.snapBase.shadowWrite(config-file only,不新增 env,默认 false/false,嵌套 ⊂)。迁移方式:无需迁移(默认关 = 现状);CONFIGURATION.md en/zh 已随 docs commit 落文档。

三个待裁定点的我的判断:

  1. 版本号时序:建议 [PR] Re-land v6 composite-identity fastpath lane — inverse of #5854 revert (base for snapshot-centric rework, #5643) #5855 先合(它标题自述是 snapshot-centric rework 的 base),本 PR 随后 rebase 拿下一个空 user_version。两种顺序都是机械操作,但 base 先落地少一轮互相重编号。
  2. cohort 名单:全局两级旗对 P1 够用(影子不出站,爆炸半径=本地磁盘);建议到 P2+ 出现服务面时再加 cohort key。
  3. mysql 后端:sqlite-only 与「默认全关零行为」一致,可接受;边界已在 config surface 章节注明。

另两点观察(非阻塞,留作放量前记录):

  • snapShadowSync 的 catch-all 把任何非 R1 异常(含 SQLITE_BUSY 这类瞬态错)也判平面死并粘到重启——影子阶段代价可接受(该会话平面停摆至重启),放量前应区分瞬态与完整性类错误;
  • 每事件一次全表重读 + 全量 SHA-256 聚合,O(events×rows)/commit——P1 规模可接受,放量前需盯。

判定:方向正确、实现扎实、测试有牙。CI 在新 head 转绿后即可合入;但本 PR 触及持久化格式(schema v12)+ 配置面,按 §7.4 属人工合并门禁——请人工合并:#5901

@ranxianglei ranxianglei added 马上合并 ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR labels Nov 8, 2026
@ranxianglei
ranxianglei force-pushed the 2026-11-07_snapshot-table-foundation branch from 0e0804a to 2cae3e4 Compare November 8, 2026 08:55
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI-lane run (conflict resolution, attempt 1/3): the PR's conflict with master is resolved. Merged origin/master into the PR branch as commit e3add70445 (pushed fast-forward, no force-push). Live GitHub read after push: head=e3add70445, mergeable=true, state=blocked (= clean, awaiting CI re-run + review — normal).

What I found and did

结构化八问

  1. 是什么问题:PR 分支与 master 冲突(mergeable_state=dirty)——分支被他人重建到较旧 master 之后,master 又继续前进,两侧编辑了相同文件。
  2. 什么原因导致的:时序叠加——分支重建基线([PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920 后)落后于当前 master(含 [PR] fix(opencode): opencode lane minor-fixes roundup vol. 6 — log host noise + gate warmup round | fix(opencode): opencode 车道小修合集第六辑 —— 宿主杂音入日志 + gate warmup 回合 #5922/[PR] docs: land the stacked docs on master + add docs/README navigation page #5936/[PR] docs: live architecture hub — overall diagram + module pages with diagrams + file-map CI guard #5924/[PR] docs: slim AGENTS.md — KDD full text to reference/design-decisions.md, triage table to reference/triage.md #5934/[PR] Upstream hang on compressed summary no longer silent: added first-byte budget + watchdog/preflight logging (#5904) | 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) #5917);两侧都在 docs/index 同一锚点插入索引行造成文本冲突;src/config.ts 两侧改不同区域,自动合并。
  3. 影响范围与严重程度:纯合并阻塞,零运行时行为变化——冲突仅涉文档索引行与非重叠配置区。严重度 = 挡住合并,不影响功能。
  4. 怎么修复的:merge(非 rebase)origin/master 进 PR 分支——不重写历史、对并发 agent 安全、符合该分支既有先例;两处冲突按行并集解决(保留 PR 的 storage-relations 行 + master 的架构 hub 行 + README 落地页行);fast-forward 推送,无 force-push。
  5. 是否有回归问题:无。审计过两侧变更共存性:opencode 键与 snapBase 字段不同区域互不干扰,索引行纯新增;自动合并的生成文件 configuration.md 同时含 snapBase 行与 master 新行(throttle429Scope 等)。本地 typecheck 干净 + 定向测试 26/26 通过。
  6. 是否破坏缓存:不涉及——未触碰缓存/重试/增量游标/去重键逻辑。
  7. 是否改了设计方向:不涉及——纯冲突接合,无方向性改动。
  8. 是否引入了新的配置:不涉及——本次合并未引入新配置;PR 自带的 storage.snapBase.{enabled,shadowWrite}(默认 false、仅配置文件层)保持不变,并入的 [PR] Upstream hang on compressed summary no longer silent: added first-byte budget + watchdog/preflight logging (#5904) | 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) #5917 first-byte-budget 键属 master 自身工作,不在本 lane 范围。

收工判定:冲突已解,PR 现为可合并态(待 CI 重跑转绿 + owner review/合并)。

ranxianglei added a commit that referenced this pull request Nov 8, 2026
…ries

The design doc pair (proposals/snapshot-compression-foundation) moves from the
proposal branch into the implementing PR, per the docs-centralization standard:
- bilingual README.md / README.zh-CN.md + 4 arch diagram pairs (svg+png)
  + the arch-migration generator script
- status line updated: P0+P1 implemented in #5901 (schema v12, shadow-write
  soak, zero egress change); P2 egress cutover still pending owner ruling
- §5 version-stacking corrected to reality (landed v12 on v11 master while
  #5855 is still open; later-landing side renumbers mechanically)
- §9 keys finalized (storage.snapBase.enabled / .shadowWrite, config-file only)
- §12/§13 notes: P0+P1 shipped as one PR; #5855 prerequisite not waited on
- cross-links to the per-table map docs/storage-relations.{en,zh}.svg
- registered in docs/index.md + docs/index.zh-CN.md
ranxianglei pushed a commit that referenced this pull request Nov 8, 2026
…th (#5874)

docs-sync red on fb17874: the committed generated rows claimed default
'on (soak; off in release)' while the canonical seeds
(website/config-reference/process.yaml) say default false — the generated
artifact had drifted from its source. Rerun tools/gen-config-docs.mjs
generate and commit its output (2 rows per file, en+zh).

Note for reviewers: the #5901 soak (dab9292) makes the code default ON
when the config file is silent until the owner-instructed pre-merge revert;
this doc describes the seed state, which equals the post-revert code.
@ranxianglei

Copy link
Copy Markdown
Owner Author

Field incident + fix (2026-11-08, commit 4edda51)

The #5855 collision flagged in the PR description happened in a real shared environment today: a database co-written by instances running the #5855 re-land code had been migrated to user_version=13 with the pf_* planes present — so this branch's if (from < 12) DDL block was skipped by migrateSchema's early return, the four snap tables never existed, and every first save died with no such table: l1_world → plane marked dead (R2, by design). Gate stayed green because it runs on isolated scratch databases.

Fix: the v12 DDL is probe-first now (table-existence check, the discipline v2/v5/v6/v8 already use) instead of version-gated — the DDL is pure CREATE … IF NOT EXISTS (no backfill, no rewrite), so it is safe at any from version. Both merge orderings with #5855 now coexist without renumbering (the final master version number stays a mechanical merge-time step); user_version is never downgraded. T1c pins the exact field state (v13 + pf_* + no snap tables → open → snap tables created, version stays 13, sibling rows untouched, legacy dump byte-identical, plane functional).

Verification: 14/14 suite + 35 storage regressions green, tsc clean; redeployed the shared 2.1 GB database live — tables now coexist with pf_* at user_version=13, previously-dead sessions self-heal on their next save (the derivation is a final-state diff).

ranxianglei pushed a commit that referenced this pull request Nov 8, 2026
…CI)

readPkgVersion is polled every 500ms by waitFor in the registry/advisory e2e suites; a poll landing inside the updater's remove-and-reinstall window hits a transiently absent package.json and the raw readFile throws ENOENT out of the predicate, killing the subtest at ~1.6s despite a 60s budget (ubuntu red job 128697545236; windows green on identical code = race). All four copies of the helper now return null on ENOENT ('not yet', not an error); one-shot assert sites still fail loudly on absence.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

This run — two red CI lanes fixed on PR #5901 (new head 1130399f30)

1. docs-sync red (was head fb17874130) → fixed in fdbda4bcfb

2. Hermetic registry e2e (ubuntu) red (was head 4edda51d44) → fixed in 1130399f30

  • Failing subtest "rollback-form advisory lands" died at 1.6s with ENOENT … package.json despite a 60s wait budget; identical code green on Windows = cross-platform timing race, not a code defect (this PR touches none of the update/advisory surface).
  • Mechanism: readPkgVersion is polled every 500ms inside waitFor; a poll landing inside the updater's remove-and-reinstall window hits a transiently absent package.json, and the raw readFile threw ENOENT out of the predicate — killing the subtest instantly instead of keeping the wait alive.
  • Fix: the helper is copy-pasted across four suites (e2e-advisory-rollback / e2e-registry / e2e-update-state / e2e-release-canary); all four now return null on ENOENT ("not yet", not an error) — one-shot assert sites still fail loudly on absence. Test-only; zero production code touched. Local verification = typecheck clean + call-site audit; CI re-run was the verdict for the race.
  • Not inherited: CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floor 1137 shows master tip 3ac3e95c0e green (17/17) today 09:37Z. One-line conclusion posted there per CI-coordination policy.
  • Verified green: hermetic registry e2e (ubuntu) SUCCESS on 1130399f30.

3. Your field-incident commit 4edda51: landed on top of my docs-sync fix — verified ancestor chain (my fix intact underneath; your diff touches only src/storage/schema.ts + the P0 test, no config/doc surface, so the two fixes don't interact). Synced local fast-forward, no history rewrite.

Live state at time of writing (single direct check-runs read on 1130399f30 — the mirror cache froze again this run): 41 checks completed = ALL success, including both previously-red jobs; 18 in progress; zero failures.


八问(中文)

  1. 是什么问题:本 PR 两个红 CI——①docs-sync:已提交的生成配置文档与规范种子漂移(snapBase 两行写着 "on (soak)",种子自出生起就是 false);②registry e2e(ubuntu):测试轮询竞态导致的假失败(子测试 1.6s 即死,预算 60s)。
  2. 什么原因导致的:①soak 默认值时期生成文档被手改,种子回归 false 后未重新生成;②readPkgVersion 在 waitFor 的 500ms 轮询中裸 readFile,轮询落在更新器"删旧装新"窗口时 package.json 瞬态缺失,ENOENT 从谓词直接抛出杀死子测试(Windows 时序不同故同码绿)。
  3. 影响范围与严重程度:两者都只影响本 PR 的 CI 门禁,无用户面影响;①纯文档门禁红;②偶发 e2e flake(跨平台时序差异),非产品缺陷——PR 未触碰任何 update/advisory 代码路径。
  4. 怎么修复的:①以规范种子为权威重新生成配置索引并提交(fdbda4bcfb);②四个 e2e 文件同款 helper 统一改为 ENOENT→null(「还没装好」≠报错),一次性断言点缺失仍响亮失败(1130399f30)。零生产代码改动。
  5. 是否有回归问题:无生产行为变化。文档旧值→新值已披露:on (soak; off in release)→false、"ON by default for the [PR] storage: snapshot table compression foundation P0+P1 (schema v12 4-table + shadow write, all off by default, zero behavi | storage: 快照表压缩底座 P0+P1(schema v12 四表 + 影子写,默认全关、零行为变化) #5901 soak…"→"Off by default — zero behavior change until set"。残留披露:代码侧 soak 回退(store.ts:648,静默=ON)仍在,按你的指示合并前 revert——届时代码静默默认值才与文档一致。helper 语义变化仅限测试内部,断言语义不变(null 永不匹配任何版本比较)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:无。

判定:两个红 job 已在新 head 1130399f30 验证复绿(41/41 完成项全 success,含此前两个红 job;其余 18 项在跑、零失败)——等 CI 跑完即可,无需其他动作。

@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 — the reported docs-sync failure was already fixed by an earlier auto-fix wake; nothing left for me to do this run.

Live state at current head 1130399f30 (mirror cache + one GitHub check-runs GET, fetched ~18:39 local):

  • docs-sync: success (was red at the event's head fb17874130)
  • All gate jobs success; 0 failed checks overall
  • Only test (windows-latest, 22, 1) still in progress — completes on its own; a new wake fires if it goes red
  • Local HEAD == remote head == checked sha → no push needed this run

The fix landed as fdbda4bcfb ("docs: regenerate configuration index — snapBase rows back to seed truth (#5874)") from the earlier ci-check lane: it re-ran node tools/gen-config-docs.mjs generate and committed the regenerated docs/configuration.md / docs/configuration.zh-CN.md (4 lines each) — exactly the artifacts the docs-sync job diffs. Two sibling commits also landed after the event's head (4edda51d44 probe-first v12 DDL coexistence, 1130399f30 e2e mid-reinstall ENOENT tolerance); both green in CI as well.

七问

  1. 是什么问题:事件报告 PR(head fb17874130)的 docs-sync 检查红——配置文档生成物与种子 YAML 漂移。
  2. 什么原因导致的:分支引入 snapBase 配置行后,docs/configuration.md / docs/configuration.zh-CN.md 没有随种子重新生成(docs-sync 就是跑 gen-config-docs.mjs generate 再对四个生成物做 git diff --exit-code)。
  3. 影响范围与严重程度:仅 CI 门禁红、阻塞合并;纯文档漂移,不影响任何运行时行为。
  4. 怎么修复的:本次运行未动手——上一轮自动修复已在 fdbda4bcfb 重跑生成器并提交再生成文档;我核对了提交内容与 docs-sync 校验的文件一致。
  5. 是否有回归问题:无——只改两份生成文档各 4 行(snapBase 行回到种子真值),无代码/行为变更;当前 head 全部已完成的检查为绿。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向 / 引入新配置:均不涉及。

判定:本轮无需进一步动作,等最后一个测试分片(windows 22 shard 1)自行收尾即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

[bot] 🏷 Already posted above — this run's full summary (live-state verification + 七问) is my previous comment in this thread; nothing new to add.

Outcome in one line: the reported docs-sync red was already fixed by the earlier auto-fix wake (fdbda4bcfb, regenerated config-doc artifacts); live re-check at head 1130399f30 shows docs-sync success, all gates success, 0 failed checks (only test (windows-latest, 22, 1) still running) — no push needed, no further action this run.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI run summary (head fc7ef2c78e) — no branch changes needed; one targeted rerun triggered.

Re-verified live first: by the time this wake ran, every gate previously reported red had been resolved by your own commits, so I pushed nothing. What happened across this session's wakes:

  1. image-billing-e2e tsc fail (tests/issue5874-snaplane-p2.test.ts:187 "system" vs the msg() helper's narrower role union at :101) → you fixed it identically in 71f729b6fb (widen the helper's role union).
  2. docs-sync + config-surface-guard (storage.snapBase.egress / .egressCohorts documented but absent from the seed) and architecture-docs (src/server/snap-egress.ts missing from the file map) → resolved by e9785e5436 (process.yaml seeds, reference/architecture.md map row, plus lockfile/types/docs touch-ups).
  3. lock-sync (red at e9785e5436: kernel/package-lock.json stuck at acp-kernel 0.0.187 vs kernel/package.json 0.0.189) → I ran the gate's own npm install --package-lock-only recipe locally and prepared the sync commit, then found your fc7ef2c78e already carried the byte-identical blob — I dropped my duplicate (git reset --hard back to remote head) instead of pushing redundant diff noise.
  4. kernel-guard → no action from me per lane rules: the gated kernel commits (ded2f5a21a, 995a71ba6a) are yours, and I verified via a single PR-body read that line 46 now carries your own declaration (kernel-change: kernel/src/relocate-compress.ts + tests — relocated fold summaries ride the #335 live-carrier protection …). It went green on the next run; no decision request was warranted.

The one remaining red (wake 4): test (windows-latest, 24, 2) — single failure not ok 1896 - abort x proxy-openai-sse: client abort mid-stream destroys the upstream request, assertion upstream socket(s) must be destroyed after the client abort (closed=0) (tests/wire-exit-matrix.test.ts:273), case duration 22.5 s against the win32 teardown budget (base 20 s, tests/wire-exit-matrix.test.ts:65). Attributed to the known Windows/node24 abort-teardown flake family, not this PR: same shard was green 8 minutes earlier at e9785e5436; fc7ef2c78e differs from that head by a kernel lockfile version string only (zero runtime effect); three sibling abort cases in the same file passed in milliseconds on the same head (anthropic-sse 111 ms, responses-sse 79 ms, proxy-json 410 ms); and the PR diff touches none of the abort/teardown path (relay.ts hunk is comments-only around the relocateCompressCarriers call; the test file and src/loop/ are untouched). Precedents: #4099/#4100 (same test, win/node24), #5625 (doubled the win32 poll budget, 2026-11-05), #3228/#3233 (wall-clock timing family).

Actions taken: zero branch changes (nothing mechanical to fix); one-line conclusion posted to #4599 per CI-coordination policy; targeted rerun-failed-jobs POSTed on run 42482420728 (HTTP 201) so only the failed shard re-runs. Live matrix at fc7ef2c78e: 29/30 green incl. every static gate, pending = the rerunning shard. PR remains mergeable_state: behind (behind master only, not conflict-blocked).

Carried-forward disclosure (unchanged since floor 18): the temporary SOAK fallback at src/storage/store.ts:648 (config silent ⇒ plane ON) is marked "revert before merge per owner instruction" — until it's reverted, code-on-silent ≠ doc default false.


七问

  1. 是什么问题:本会话跨四次唤醒处理同一 PR 的 CI 红——前四次唤醒报的 5 条门禁(image-billing e2e 类型错、docs-sync、config-surface-guard、architecture-docs、kernel-guard)与最后一次唤醒的 1 条测试分片(windows/node24 abort 用例)。
  2. 什么原因导致的:前 5 条全是 PR 自身新面(新配置键未登记种子、新文件未入文件图、测试 helper 类型偏窄、kernel 版本 bump 漏同步 lockfile、kernel 改动缺声明)——均由 owner 自己的提交修掉;唯一残留红是 Windows runner 上 abort→上游 socket 拆除超过 20s 预算,属该测试已知的 Windows 时序 flake 家族(wire-exit-matrix abort test is flaky on windows/node24: fixed 300 ms sleep racing against abort propagation | wire-exit-matrix abort 测试在 windows/node24 上偶发红:固定 300ms 睡眠赌 abort 传播 #4099/opencode lane: native /bili/ URL rewrite breaks provider-scoped plugins (rework of reverted #4280 / #4276) #5625/wire-exit-matrix 的墙钟时序断言在 CI Windows runner 上偶发误报,挡合并 #3228)。
  3. 影响范围与严重程度:仅影响本 PR 的合并信号,无任何用户侧/运行时影响;flake 触发条件=Windows CI runner 高负载下的 socket 拆除延迟。
  4. 怎么修复的:未推任何分支改动(所有门禁修复已由 owner 提交落地;我本地备好的 lock-sync 修复与其 fc7ef2c78e 逐字节相同,主动丢弃避免重复 diff);对失败分片触发定向重跑(rerun-failed-jobs,只重跑该 shard),并在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 留一行结论。
  5. 是否有回归问题:无——本次零代码改动;flake 归属证据链完整(同 shard 8 分钟前绿、两 head 仅差 lockfile 版本串、同文件兄弟用例毫秒级通过、PR diff 不触及 abort 路径)。若重跑再红,归属翻转为真回归,将升级处理。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及;遗留事项不变(store.ts:648 SOAK 回退仍待按 owner 指示在合并前 revert)。

收工判定:head fc7ef2c78e 除一个重跑中的 flaky 分片外全绿,分支无需任何改动;等待重跑结果即可,再红才需要升级。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Base conflict resolved — origin/master merged into the PR branch, pushed as head 73f2aa1ce9.

Live re-verify first: master had advanced to 82e2d53c6e (merging #5917, #5929, #5837, #5947 among others) while the branch sat behind, which is what GitHub flagged as dirty. I fast-forwarded local through your three newer P2 commits (eb8603cb17) and merged origin/master into the branch (merge, not rebase — same treatment as this branch's earlier conflict round).

Conflicts: exactly 3 files, all one issue — kernel/package.json, kernel/package-lock.json, root package-lock.json, each carrying the same version clash: branch 0.0.189 (your relocate-compress v2 kernel work) vs master 0.0.188 (#5919 shredded-merge recovery, ae5c9a5224). Resolved to 0.0.190 = max+1: the merged tree's kernel/src is the union of BOTH sides' kernel changes — a state that has never carried a version number — so it takes a fresh one; keeping 0.0.189 would let two different kernel contents share one version, against the "a commit IS the pin" discipline. Everything else auto-merged, and I verified union-of-intent file by file: src/server/relay.ts carries master's measuredOutboundTokens egress-fuse block (~line 745) AND your v2 relocation comment (line 2294); website/config-reference/process.yaml and docs/configuration.md(+zh-CN) carry master's updated network.upstreamFirstByteMs descriptions AND all four storage.snapBase.* rows intact.

Local verification before push: the lock-sync gate's own recipe (npm install --package-lock-only → zero drift on both lockfiles) and a full typecheck — both green.

Push wrinkle, handled per discipline: your 2e0131c86e landed mid-merge (first push rejected) — I redid the merge from the new head with the identical resolution; then f0cb969a6a (test-only, 18 lines in tests/issue5874-snaplane-p2.test.ts, zero overlap) landed before my second push — integrated cleanly and pushed once, no force-push, no branch fighting.

Post-push live state: mergeable: true, mergeable_state: blocked — the text conflict is gone; blocked is branch protection (required checks/reviews), i.e. CI now running on the new head. If any lane goes red on 73f2aa1ce9, that's the next wake's job. Carried-forward disclosure unchanged: the SOAK fallback at src/storage/store.ts:648 still awaits its pre-merge revert per your instruction.


七问

  1. 是什么问题:PR 分支落后 master 多个合并([PR] Upstream hang on compressed summary no longer silent: added first-byte budget + watchdog/preflight logging (#5904) | 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) #5917/[PR] fix: compression merge deadlock — auto-consolidate or explicitly notify when turns are split across multiple blocks (fix | fix: 压缩合并死锁——回合被拆散在多个块里时自动收拢或明确告知(修复 #5919) #5929/[PR] fix(dsh): hide the host composer seat while the Context tab is open (#4406) / 打开上下文标签页时隐藏宿主 composer 座位 #5837/[PR] Fix #5807: Classify TTFB timeout separately on gateway hang and replay within the proxy | 修 #5807:网关装死时,首字节超时单独分类并在代理内重放 #5947 等),GitHub 报 merge state dirty(文本冲突),挡住合并。
  2. 什么原因导致的:共同祖先之后两侧独立动了 kernel 版本——master 经 New error in v0.213, following up on the previous bug where old blocks can't be compressed and tokens double. | 0.213版本新报错,接着上次的旧块无法压缩token翻倍bug #5919(shredded-merge recovery,unit-projection.ts +182 行)bump 到 0.0.188,分支侧经两个 relocate-compress v2 提交 bump 到 0.0.189;三个文件(kernel/package.json + 两个 lockfile)的版本字段正面相撞。其余文件(relay.ts/docs/process.yaml)两侧改动区域不重叠,均自动合并。
  3. 影响范围与严重程度:仅合并信号层,无用户侧/运行时影响;解决前 PR 无法合并。
  4. 怎么修复的:按本分支先例用 merge(非 rebase)把 origin/master 合入分支;版本冲突统一取 0.0.190(max+1)——合并后 kernel 内容是两侧改动的全新并集状态,必须给新号,复用 0.0.189 会让两种不同 kernel 内容共用一个版本号;自动合并结果逐文件核对保留双方意图(fuse 块与 v2 注释并存、配置文档新描述与四条 snapBase 行并存)。
  5. 是否有回归问题:逐项验证过——lock-sync 门禁配方本地零漂移(npm install --package-lock-only 逐字节复现两个 lockfile)、全量 typecheck 绿、自动合并文件与两侧原 diff 对照无丢失 hunk。行为变更披露:kernel 版本号分支侧 0.0.189 → 0.0.190(原因见第 4 条,纯编号钉扎,零运行时影响)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。

收工判定:冲突已清(mergeable: true),新 head 73f2aa1ce9 上 CI 重跑中,转绿与否等下一轮唤醒。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI auto-fix lane (attempt 1/3) — all 4 red test shards on PR #5901 fixed in one commit, pushed as head 062c96a758.

Live re-verify first: the mirror cache was frozen at a 14:55Z snapshot (stale), so I took one direct check-runs read — the event's 4 failures were still live at head 8f233c0e2c: test (ubuntu-latest, 22, 1), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 5), test (windows-latest, 24, 5).

Attribution (from the job logs): all four shards fail on the SAME single deterministic test — tests/text-safe.test.ts → "family gate: no raw negative string slices outside the allowlist" (ubuntu 22/1 = not ok 3204, windows 24/5 = not ok 1589; ubuntu runs 3 shards / windows 5, so the file lands in different shard numbers per platform). The gate is a static source scan over src/** — zero timing/environment dependence, so this is not a flake and a rerun could never turn it green. It needs a code fix.

Root cause: your P2 commit 8f233c0e2c ("richer tripwire dump") added the mismatch-dump helpers in src/server/snap-egress.ts with raw negative/positive slices on model-derived field values:

  • const tail = (v: unknown) => JSON.stringify(String(v ?? "")).slice(-200); ← the flagged line
  • const head = (v: unknown) => JSON.stringify(String(v ?? "")).slice(0, 400); ← same helper pair, same defect class

A cut landing between the two halves of a surrogate pair serializes as an unpaired \uXXXX escape — exactly the #816/#1615 family the gate exists to ban. Not inherited: snap-egress.ts exists only on this PR branch; master has no such file.

Fix (commit 062c96a758, one annotated commit): route both helpers through the shared clamp from src/text-safe.js — safePrefix(..., 400) / safeSuffix(..., 200) — which is precisely what the gate's error message prescribes and what that module's header doctrine requires for head/tail excerpts. Output is byte-identical for every input where the old slices were already safe; it only differs when the cut would split a surrogate pair (the bug being fixed).

Local verification before push: tests/text-safe.test.ts 18/18 (the previously-failing gate now passes) · tests/issue5874-snaplane-p2.test.ts 23/23 (tripwire-dump path behavior unchanged) · full npm run typecheck clean.

Push wrinkle, handled per discipline: your dc6d9e63cb landed while I was working; I integrated it via pull --rebase (clean fast-forward, no conflicts — the offending lines were untouched by it) and pushed once, no force-push. New head 062c96a758; CI is running on it now. One-line conclusion also posted to #4599.

Carried-forward disclosure (unchanged): the temporary SOAK fallbacks — src/storage/store.ts:648 (config silent ⇒ plane ON) and the egress default v?.egress !== false in snap-egress.ts (comment marks "Release cut: change to opt-in") — still await your pre-merge revert per earlier instruction. Not touched this run.


七问

  1. 是什么问题:本 PR 四个 test shard 红(ubuntu 22/1、ubuntu 24/1、windows 22/5、windows 24/5),全部命中同一条用例——text-safe 家族门禁「no raw negative string slices outside the allowlist」。
  2. 什么原因导致的:P2 提交 8f233c0e2c(tripwire dump 增强)在 src/server/snap-egress.ts 的 mismatch-dump helper 里对模型派生字段用了裸 .slice(-200)(及同行对的 .slice(0, 400))——正是仓库自家 compactEntry summary clamp (slice(0,199)+'…') can strand a lone high surrogate → same deterministic UTF-8 gateway 500 family #816/[bug] summaryFingerprintLine 的 head/tail 裸码元切片产生孤立代理项 → 上游 JSON 400、会话永久卡死(#816/#828 同族第三站点;0.1.169 仍未修) #1615 家族门禁禁用的模式(切点落在代理对中间会序列化成不成对 \uXXXX 转义)。门禁是静态源码扫描,确定性失败,重跑无法转绿。非继承:该文件仅存在于本 PR 分支。
  3. 影响范围与严重程度:纯 CI 门禁红、阻塞合并;零运行时影响——涉事行是 egress tripwire 路径里的诊断日志 dump helper,修复只在旧切法会劈开代理对时改变输出(即要修的那个缺陷本身)。
  4. 怎么修复的:两个 helper 改走 src/text-safe.js 的 safePrefix/safeSuffix(门禁报错信息指定的唯一正解,也是该模块头注释的教义);独立标注 commit 062c96a758;对旧切法本就安全的输入输出逐字节不变。
  5. 是否有回归问题:无。本地验证:text-safe 套件 18/18(原红门禁转绿)、issue5874-snaplane-p2 套件 23/23(tripwire dump 行为保持)、全量 typecheck 干净;未触碰任何生产语义(除 clamp 本身)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向 / 引入新配置:均不涉及。遗留披露不变(store.ts:648 SOAK 回退 + egress 默认 ON,均按你的指示留待合并前处理)。

收工判定:根因已修并推送(新 head 062c96a758,叠在 dc6d9e63cb 之上),CI 在新 head 重跑中;若重跑再红,归属翻转为真回归,升级处理。

@ranxianglei

Copy link
Copy Markdown
Owner Author

验证汇总:真实模型 soak + 自评审修复 + 100% CI + 100% 本地 gate

1. 真实任务 soak(qwen3.8-27b,dsh 车道,tmux 三任务)

用本 PR 的构建起了 3 个真实任务:评审本 PR、写双语 README 高管摘要、追踪入站→出站管线。三个任务全部完成、产出质量合格(评审抓到了真 bug,见下)。压缩轮全部正常触发(累计 5 个 block,~11 万 token),出站 egress=cutover 36 次、red 0 次。

2. soak 评审发现的问题(全部核实、全部已修)

发现 处置 提交
tripwire 对 sidecar 字段失明(rawAnthropicBlock/thinkingSignature/toolIsError 等编解码器优先于 .text 的字段不参与比对,远程签名 URL 轮换类漂移可能假绿) normTuple 增加 13 个 sidecar 字段的稳定摘要;失配红会点名具体字段 69ac349
两个相邻被裁剪的工具结果会打断缝链(并行大调用是常见形态) 缝走增加 toolCallId 配对臂(与采纳循环同款) 69ac349
内核紧急截断标记字面量在代理侧重复,改措辞会静默失效 内核导出 TRUNCATION_CLIP_RE,两侧锁定同一正则(带内核测试防漂移) 69ac349
transform 异常裸奔 / 空文本误采纳 / active 行损坏被静默吞 transform-error 降级、空文本拒绝采纳、row-unparsable 降级(D-lane 同款) 69ac349
折叠后 plane 比 legacy 多消息(hide-compress-calls / absorb 视图只跑在 legacy 侧) plane 侧同样跑 hideConsumedCompressCalls + applyAbsorbView + attachSubagentSessions(与车道同序);length 红现在附带 (role,contentType,toolName) 差异直方图 4103c33

3. CI

ci:full 全矩阵在 4103c33 100% 绿(ubuntu + windows 全部通过;red-signal 无红可报按设计跳过)。

4. 本地真模型 gate(release-gate-local,--with-update)

单次运行 100% 绿:A 9/9(折叠+折叠后连续性,含中途窗口收缩)B 6/6(中继 glm-5.2 大上下文)U 2/2(dsh 托管安装+私有 registry 更新)。 出站证据:bili.log 中 egress=cutover 5 次、decision=red:egress 0 次、降级 0 次——折叠后的后续轮次(n=7 tail=0)也直接从平面出站。

gate 备注:此前几轮 U 灯红是环境竞速——公共 npm 上的 0.1.213 稳定版比 gate 候选(0.1.213-gate.x 预发布)高,#3619 滚动更新策略抢先安排了"升级到 0.1.213",240s 观察窗内自然等不到 up-to-date 行。候选改用 0.1.214-gate.x 后单次全绿,与产品代码无关。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

已做 live 复核,与你的汇总一致:

  • 镜像 check 缓存快照恰在 head 4103c33ab(fetched 18:47Z):30/30 全绿(failed 0 / pending 0),其中此前红的四个 test shard(ubuntu 22/1、24/1;windows 22/5、24/5)全部转绿——family-gate 修复(062c96a758)在 CI 上确认生效;red-signal 无红可报按设计跳过。
  • 本地确认 062c96a758 在当前树内(是 4103c33 的祖先),你后续五个提交未触碰该修复。
  • mergeable_state=behind(master 前进了),不影响合并。
  • 剩一个合并前遗留项(未变):两处 SOAK 回退按你此前的指示仍待处理——src/server/snap-egress.ts:71(v?.egress !== false → opt-in)与 src/storage/store.ts:~648(config silent ⇒ plane ON)。已在 4103c33 上确认这两处仍为默认开。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge-conflict lane (attempt 1/3) — all conflicts resolved, merge commit 2b70700c9e pushed (fast-forward, no force-push).

Live re-verify first: the mirror check cache snapshot was stale (frozen Nov-8 18:55Z, known freeze), so I took git ground truth instead: branch 4103c33ab2 was 320 commits behind origin/master (4dea18eabf) with 5 content-conflicted files. Confirmed real conflict via git merge-tree before touching anything.

What conflicted and how each was resolved (merge of origin/master into the branch — merge, not rebase, so no force-push was needed):

  1. src/server/prepare-responses.ts — the one semantic conflict. Master refactored repairResponsesAssistantOrdering out of server.js into ./responses-ordering.js and changed its return shape from CoreMessage[] to { messages, slots } (Compression breaks Responses assistant history ordering, causing repeated invalid_assistant_history 400s #564/[Bug][Responses] acp_turn_sep 合成分隔符进入持久压缩覆盖集合,导致重复历史漂移误报 #2627 separator-manifest work). This PR's P2 applySnapEgress block had been inserted around the old single-line call. Resolution = union of both intents: keep master's ordered.messages/separatorSlots capture, keep the egress block after it, and adapt the egress transform callback to the new API by taking .messages on the inner repair call. Verified the other three lanes' applySnapEgress transforms don't use the reordered function (no further adaptation needed) and that every remaining call site uses the new shape.
    • Residual interaction disclosed (not a blocker): on an egress-cutover turn where the plane view replaces the legacy messages, the legacy-side separator slots can no longer be proven against the final body, so collectSeparatorManifest returns undefined and the invariant judge runs without the separator exemption. That is the module's own documented fail-closed direction, the judge is advisory-only (never disturbs the request), and the intersection requires both a fold-merged assistant run AND a divergent cutover in the same turn — rare by construction.
  2. src/web/i18n.ts (zh+en) — both sides flagged the cfg.q_require_nudge string: master rewrote it to describe the new nudge-credit mechanism (20-model-round credit); the branch side was just the base text (this PR only rewrote the adjacent cfg.q_cafp strings, which merged cleanly above). Took master's wording — the merged code implements the credit mechanism, so the string must match it.
  3. kernel/package.json + both lockfiles — version-line conflicts: branch 0.0.190 vs master 0.0.191. The post-merge kernel tree still contains this PR's unreleased TRUNCATION_CLIP_RE/buildTruncationClipMarker export (verified: post-merge kernel/src differs from master's released tree exactly by those exports), so the CI-enforced kernel version rule requires a bump above both → resolved to 0.0.192 in all three files. Root package.json version untouched.

Everything else (docs, config.ts, knobs.ts, persist.ts, relay, e2e…) auto-merged cleanly; master's #6066 persist-knob PR touches different writers than this PR's snapBase surface — no semantic overlap.

Local verification before push: full npm run typecheck clean (rebuilds kernel + pi-subagents first) · targeted host suites 55/55 (issue5874-snaplane-p2, issue564-responses-ordering, invariant-judge-continuity-owned-separators) · targeted kernel suites 127/127 (truncation-clip-export, relocate-compress, parse-compress-input). Full-suite verdict comes from CI on the new head.

Carried-forward disclosure (unchanged): the temporary SOAK fallbacks — src/server/snap-egress.ts:71 (v?.egress !== false) and src/storage/store.ts:~648 (config silent ⇒ plane ON) — still await your pre-merge revert per earlier instruction.


七问

  1. 是什么问题:PR 分支落后 master 320 个提交且处于 dirty(冲突)状态,5 个文件内容冲突,阻塞合并。
  2. 什么原因导致的:分支长 soak 期间 master 大幅前进(Compression breaks Responses assistant history ordering, causing repeated invalid_assistant_history 400s #564/[Bug][Responses] acp_turn_sep 合成分隔符进入持久压缩覆盖集合,导致重复历史漂移误报 #2627 responses 排序重构、[PR] persist: wire debounce/max-delay knobs into session-order & prefix-affinity writers #6066 persist knobs、内核发版到 0.0.191 等),两侧改了同一行/同一区域。
  3. 影响范围与严重程度:纯合并阻塞,零运行时影响;其中 1 处是语义级冲突(repairResponsesAssistantOrdering 返回形状从数组变为 {messages, slots}),若机械拼接会产生类型错误与错误的出站消息数组。
  4. 怎么修复的:把 origin/master merge 进分支(不用 rebase、不 force-push)。i18n 取 master 的 requireNudge 信用措辞(合并后代码实现的就是信用机制);prepare-responses 取两侧意图的并集并适配新 API(transform 内加 .messages);内核版本按 CI 强制规则解为 0.0.192(合并后树含本 PR 未发布的 TRUNCATION_CLIP_R 导出,max(190,191)+1),两个 lockfile 同步。
  5. 是否有回归问题:无。本地全量 typecheck 绿;定向测试宿主侧 55/55(P2 egress 套件 + responses-ordering 套件 + judge separators 套件)、内核侧 127/127(clip-export + relocate-compress + parse-compress-input)。残留交互一处(保守方向、非回归):egress-cutover 轮中平面视图替换 legacy 消息时,legacy 侧 separator slot 无法对最终 body 自证,manifest 降级为 undefined、judge 失去 separator 豁免——advisory 层永不干扰请求,恰是该模块文档化的 fail-closed 语义。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向 / 引入新配置:均不涉及(纯机械合并收敛;内核版本号是 CI 强制动作,根 package.json 版本未动)。SOAK 默认开遗留项不变(snap-egress.ts:71、store.ts:~648,按你此前指示留待合并前处理)。

收工判定:冲突已收敛并推送(merge commit 2b70700c9e,fast-forward),等 CI 在新 head 重跑;若再红,下一轮按归属继续处理。

ranxianglei added a commit that referenced this pull request Nov 10, 2026
Resolves the PR's dirty merge state (CI had stopped re-triggering on
pushes). The one conflict — src/persist.ts afterLoad: master's #5608-D
deferred the #4316 ledger alignment from cold load to the next fold;
take the master side and keep the #5874 forensics log line there so
every cold load stays observable with session-object identity.
ework-agent and others added 18 commits November 14, 2026 16:10
…ps retired blocks

Rebased head is red on master's own pin (3de75ff, tests/snapshot-render.test.ts):
a retired block stays active=true (kernel sync.ts: 'the retired flag is the
only switch'), and every other #5765 consumer suppresses its summary anchor
— D-lane snapshot-render.ts 'if (retired) continue', kernel
collectSummaryAnchors prune.ts — but the plane egress anchor loop only checked
b.active, so a direct-authority egress re-rendered the retired block's anchor
(its covered rows stayed suppressed, the anchor came back). The loop now skips
b.retired exactly like the two kernel/D-lane sites; knownSummaryIds already
covers all blocks so stale rendered copies are still dropped.
snapshot-render 13/13, snaplane p0+p1+p2+fastpath 17/17, snapshot-render-chain,
storage-engine-proofs 12/12, opencode-rolling 10/10 all green.
… back to master state

f25f772 exported TRUNCATION_CLIP_RE + buildTruncationClipMarker 'so hosts
can recognize their own legacy bytes as kernel clips (the egress tripwire
adopts them)'. 533b72f (direct-authority ruling) deleted the tripwire: the
plane now stores the kernel's own tagged processTurn output, so the clip
marker arrives already in the served bytes and no host ever needs to
recognize it. Grep-verified zero consumers outside kernel/ (src, tests,
pi-subagents); invariant-judge.ts keeps its own independent looser regex
(#3842). Reverting the four kernel files + both lockfiles to master state
makes the kernel diff of this PR exactly zero — no kernel-change gate, no
human-gated kernel surface left in the diff.
…nel-input assembly, delta outbound (#6181)

Implements the 2×2 brief (discussion 5874 comment 19544722) on top of the
P2 plane, kernel unchanged. The snapshot table (l1_world + row rows) stays
the single truth; the two selection points are independent:

- Inbound (stage 0, prepare-openai lane): the client's (sess_raw, msgid[])
  pair is matched against the stored world canon (matchWorld:
  echo/probe/scatter/issue/diverge/resync). Probe rounds assemble the kernel
  input from plane rows + only the NEW span, so M1 (full resend) and M2
  (incremental) reach byte-identical kernel cores. R3 identity faults
  (declared msgids vs element count) 400 with zero side effects, 3-strike
  window latch degrades to the legacy path.
- Outbound (egress stage, snap-egress + prepare-responses): the snapshot
  view carries a per-element side channel; the responses lane (provider
  retains context via previous_response_id) selects seed/delta/no-op via
  selectOutbound — first round full (incl. anchors), next rounds only new
  rows, isFullResend trips a reseed. Degrade to legacy resets the delta
  frontier (one-round convergence, #7).

Files: src/snapshot/{assemble,checksums,delta,identity,plane,types}.ts
(new), store.ts snapStage0/snapStage0Cores/snapStage0Reset facades,
snap.ts l1 envelope + clearSnapPlaneDead, msgid-pin.ts seqs channel,
session.ts responsesDelta persistence, architecture.md map.

Tests: tests/issue5874-2x2-p3.test.ts (33: verdicts ±, M1/M2 byte pin,
T5 scatter pin, #7 resync, #8 delta pin, R3 red gates, store round trip).
Regression: p1/p2/fastpath 23/23, snapshot-render 24/24,
storage-engine-proofs 12/12, opencode-rolling 10/10. tsc clean,
unused-export gate clean, architecture-docs guard green.
…sponse_id only after this proxy established a delta frontier

CI run 43079490144 red: 'ACP_KEEP_RESPONSE_ID=1 keeps the id forwarded and
stays silent' — the Part B strip condition (!deltaServed) removed the id on
EVERY non-delta round with the knob on, including the native case (no
snapshot frontier ever established) where the pinned #1954 contract says the
id is forwarded intact.

Fix: capture hadFrontier (a persisted delta state existed before this
round's selection). The id is now stripped only when hadFrontier && the
round served no partial delta — i.e. the provider's retained context equals
exactly the sent prefix, so a full replay would duplicate it. Before the
first frontier the native semantics hold regardless of the outbound (seed /
full view / legacy).

deltaServed tightened to mean 'a PARTIAL delta went out': a reseed and a
full-resend (delta grew to the whole view) both send the full view and now
read as no-delta. onSelection carries the total element count so the lane
can tell them apart. The dev-message gate (skip on partial delta) keeps its
meaning.
…nel, frontier commit-on-accept, pure continuation, shared stage-0, codec-level pin)

Review of PR #6299 found four blockers and six majors; this is the
complete fix round.

B0 (root): a chained turn on the responses lane has no full-view
reconstruction (the D lane is skipped for pluginMode and #4804
augmentation is WS-only), so its kernel view is a delta, not the world.
Flushing that view to the plane deleted every row it did not contain.
Now a chained turn that is neither cohort (msgid-pinned stage-0) nor
WS-anchored sets session.skipPlaneFlush (one-shot, consumed by the
persist build — snapShadowSync returns before any plane work) and
passes bypass:true to applySnapEgress (the outbound is the legacy
bytes; the plane stays stale-but-intact until the next full/cohort
turn, which re-syncs it one-round).

B1: FoundationRejectError was swallowed by the lane 'kernel transform
failed, forwarding unchanged' catch -> 200. Both lane catches now
rethrow it first; the server funnel maps it to a 400 with
x-bili-snapshot: identity and {error:{type:'snapshot_identity_fault'}}
before the generic 503 path.

B3: a plugin chained round with EMPTY input (a pure provider-chain
continuation) is routed to the raw-body passthrough
(prepareResponsesCompact) at the dispatcher — no dev-message
injection, no chain-id strip, no kernel round. The injected dev
message + stripped id on a no-content round produced a blind provider
response that the host then chained from (permanent context loss).

B4: the delta frontier advanced at egress-build time with no rollback
on upstream failure. The selection now stashes pendingResponsesDelta
on the Prepared and commits session.responsesDelta only in the relay
when the upstream response status is < 400 (4xx -> null = reseed next
round; never advances on failure).

M1: stage-0 arming now requires the pluginLaneServerHistory rollout
(featureEnabled in runStage0), tying R3 to the rollout that makes it
reachable. M2: checkR3Identity is now the single R3 arbiter, called in
runStage0. M3: the R3 breaker latch persists (l1_world.r3_latched_at,
probe-first ALTER, upsert — the first fault precedes the session's
first l1 row) and survives a process restart; a latched session
degrades forever, never 400s again. M4: A1d pins the kernel-core
byte-identity at the CODEC level (the new element's core is
byte-identical between the M1 full-array parse and the M2 standalone
parse, wireIndex aside). M6: session.responsesDelta is cleared at
every stage-0 resync (s0.resynced). M5: PR body rewritten to match
the code.

Shared stage-0: the pin + R3 + stage-0 decision + assembly moved out
of the openai lane into src/snapshot/stage0.ts (runStage0), wired
into BOTH the openai and responses lanes (the responses lane reads
biliMsgIds/biliLedgerSeqs from its body; cohort = pluginMode +
declared).

Tests: tests/issue5874-2x2-p3.test.ts 40/40 (was 33): new A1d (M4
codec pin), B0a (skipPlaneFlush leaves the plane untouched), B0b
(egress bypass ref-identity), M3 (latch persistence across store
instances), and HTTP e2e B1 (400 + header + zero upstream forwards),
B3 (pure continuation raw passthrough), B4 (400 turn does not commit
the frontier; the next round re-seeds the full view). Regression:
snaplane-p2+snapshot-render+chain+shadow 41/41, storage-engine-proofs
+opencode-rolling 22/22, snapbase-p0+snaplane-p1+fastpath+
responses-previous-response-id 23/23, tsc clean.
…-body M2 retries no longer wipe the plane, and the first chained round seeds its frontier at the stored-world boundary (gated on a trusted, never-refused chain)

- Residual 1a: an empty delta (frontier already covers the world — the
  host retried the same body after an upstream failure) is now classified
  as a NOOP: the chain id is kept, no developer message is injected, and
  the empty input rides the provider's own cache. Before: id stripped +
  dev injected = a blind response the host would chain from forever.
- Residual 1b: stage 0 recognizes a full replay (every incoming id already
  in the stored canon, carrier seqs at/below the plane frontier) as
  echo+replay — zero side effects. Before: an M2 retry ([m5] vs head m1)
  read as headMoved -> diverge -> snapStage0Reset: a harmless retry wiped
  the plane.
- Residual 2: the first CHAINED round of a keepResponseId chain carried no
  committed frontier (round 1 had no id), so it re-seeded the whole world
  the provider's chain already holds from this proxy's own round-1 full
  view (2x the world's tokens, one time). Stage 0 now proves the safe case
  (probe + nothing gone + new elements -> the chain provably holds the
  stored world) and seeds the frontier at the stored-world boundary;
  everything else keeps the plain re-seed.
- B4 hardening: a REFUSED selection round now sets a persisted
  responsesChainBroken marker (committed with the session). While set, the
  frontier seed is blocked and the round re-seeds the full view — the
  in-request flush wrote the refused turn's rows before the forward, so
  the plane holds more than the provider's chain and trusting
  storedFrontierPos would lose the refused content. The flag clears on a
  full-view/noop acceptance; the pending delta now carries its kind
  (full/noop/partial) so the relay can maintain it.
- Tests: p3 42/42 (new: residual-2 unit shape pin, residual 1a+2 e2e
  through the proxy, A1/A1d legs now use isolated DBs — the two legs are
  ALTERNATIVE client behaviors on the same turn and sharing a file let
  leg M1's canon contaminate leg M2's verdict).
- Regression: p0 10, p1 4, p2 17, fastpath 2, snapshot-render 13+6,
  snapshot-shadow 5, storage-engine-proofs 12, opencode-rolling 10,
  responses-previous-response-id 7 — all green.
…a delta frontier only for an id this proxy minted (#6181)

previous_response_id proves nothing about which world the provider's
chain holds. A host forking/rewinding to an older response id (or
carrying an id another proxy minted) can pass the strict-extension
proof yet lose the gap between the old chain's world and the stored
world when we seed at the stored boundary.

- session.lastMintedResponse {id, frontierPos}: the latest response
  id THIS proxy emitted for the session, paired with the plane frontier
  the chain provably held — recorded in the relay from the id observed
  on the outbound stream (SSE response.created/completed scan on the
  exact bytes written to the client, json.id for non-streaming),
  accepted forwards only (a refused round mints nothing the client
  chains from).
- store facade snapPlaneMaxPos (store/shadow/persist) — the lane
  records the post-flush plane max pos as prepared.mintFrontierPos.
- seed gate: the first-chained-round frontier seed now also requires
  lastMintedResponse.id === previous_response_id AND
  lastMintedResponse.frontierPos === storedFrontierPos.
- persisted-frontier trust: a chained round whose id this proxy did not
  mint last drops the persisted frontier and re-seeds the full view
  (id kept, dev injected — the pre-seed status quo, at-least-once,
  never a loss); the persisted state is cleared so the next round
  re-establishes verifiability from a fresh seed.
- B3 latent bug: the pure-chain-continuation route reuses the
  compact-passthrough base, which hard-codes resetAfterSuccess —
  scheduling a native-compaction rebase (resetSessionCompression) for
  the next turn although nothing compacted. Dropped for the B3 route.
- p3: per-round upstream ids in the e2e harness; the Residual 1a+2
  e2e chains from the ids the responses actually carried and gains a
  round-4 fork case (old id + full current world + new element →
  full re-seed, id kept). 41/41.
…ate)

The Residual-2 hardening commit added a raw mintSseTail.slice(-32768)
which the text-safe family gate (tests/text-safe.test.ts) rejects — raw
negative string slices reintroduce the #816/#1615 lone-surrogate family.
Replace with safeSuffix(mintSseTail, 32768) (same last-32768-code-units
semantics, surrogate-pair-safe). safeSuffix was already imported.
… rule) + mint tap spin

Two regressions surfaced when the branch was re-based onto the #5901 head
(f000197, which carries #6326 durability-before-render):

1. B4 e2e: #6326's ingestRowsNow persists the ledger rows BEFORE render as
   an UNTAGGED save; its final-state diff then deleted/re-homed the pinned
   plane rows (ids the tagged plane cannot address — R2 doctrine) and the
   next tagged save marked the plane sticky-dead. snapShadowSync now
   guards untagged saves against a sid that holds active plane rows with a
   PREFIX RULE: the save is allowed only when its ledger-id view
   prefix-identically extends the stage-0 l1 envelope (that save is the
   one that materializes the rows stage-0 declared — ids agree,
   idempotent); a stale view (re-derived kernel ids, pre-turn transcript,
   compaction) is skipped for the plane, the disk record still lands, and
   the plane converges at the next tagged save or stage-0 resync. The
   guard runs BEFORE the transaction (after it the destructive diff is
   already committed).

2. Residual-2 e2e: the mint-id scan (the record that lets the next chained
   round seed the delta frontier at the stored-world boundary) existed
   only in the compress-loop (injected) branch; plugin and non-injected
   responses turns never entered it, so the first chained round re-seeded
   the whole world. The scan is factored into MintIdTap and rides a tee'd
   twin of the plugin-lane stream and of the plain (non-rewrite) proxy
   stream — both branches where the client-facing bytes ARE the upstream
   bytes. The tap fix also repairs a latent infinite-spin in the old
   inline scan: the event-boundary recompute ran only at the loop bottom,
   which the non-marker  skipped — a non-marker event preceding
   a marker event pinned the boundary on a shrinking tail and spun the
   loop forever (event loop blocked; no timers fired). The recompute is
   now unconditional on every pass.

p3 42/42 (incl. B4 frontier-commit-on-accept + Residual 1a+2); p0 10/10,
p1 4/4, fastpath 2/2, p2 17/17, responses-previous-response-id 7/7,
snapshot-render 13/13, render-chain 6/6, shadow 5/5, storage-engine-proofs
12/12 (kernel rebuild for #5901's compress.ts), opencode-rolling 10/10.
…wline in the #5901 merge

The 941447a merge joined the egress-cohort desc_ja value with the next
'- key: sessions' entry onto one line, which tools/gen-config-docs.mjs
rejects (quoted value not valid JSON) — docs-sync + docs-coverage red.
Split the line back; generator checks pass (coverage ok: 204 env + 63 keys;
i18n ok: 254 keys).
… v11 test title, comment indent

- pr-body-6299.md: #6299's PR-body draft (already merged) was committed at
  the repo root — authoring artifact, not repo content (violates the docs
  layout: root keeps README*/AGENTS/CHANGELOG only)
- tests/storage-ingest-watermark.test.ts:594: title said 'migrates to v11'
  while the body has asserted v12 since this PR bumped STORAGE_SCHEMA_VERSION
- src/server/prepare-openai.ts:204: comment block started at column 0
…6480's pure-sqlite default flipped the absent-selection JSON writer off, and these suites assert the legacy JSON persistence surface (session files / cold-disk-restore content-store reads). First exposure: the ci:full gate ran them on the #6480-merged tree; reproduced on bare master, fixed by the explicit dual-write pin.

#6480
… missed by the #6480 pin commit (the ci-e2e-dsh-native workflow runs TWO suites; persona asserts raw-conversation-key session persistence too).

#6480
… the CI storage pin in notice-registry (master #6480 regressions)

Two master-side regressions first exposed by this branch's full test shards:

1. fork-ccr-adoption reads the companion session ENVELOPE off disk, but the
   #6480 pure-sqlite default stops writing JSON envelopes. Pin dual-write
   in the test (same one-liner as the native e2e suites).

2. The notice-registry suite is hermetic by design (absent config file,
   fresh XDG) but the CI test baseline pins BILI_STORAGE_UNIFIED=legacy
   (preload-storage-baseline.mjs, #4011). An explicit selection is a user
   decision that legitimately hides the fresh-install default-flip notice,
   so the two 'fresh install sees the default flip' assertions failed on
   every shard. Lift the pin for this file only.

Master merged #6480 without a main-CI run (the push event was dropped), so
neither regression had been seen in CI before this branch.
… pin (Windows EBUSY/EPERM)

persist-metadata-fold-gate.test.ts to keep the legacy envelopes their
assertions read. unified=full opens index.db, and Windows cannot unlink a
file whose SQLite handle is still open — both suites rm'd their temp dirs
without closing the stores, so the windows-latest shards failed
deterministically (EBUSY unlink index.db / EPERM rmSync tmpdir) while every
ubuntu shard passed. Close the stores (closeQuietly) before rmrf.

Same master-side regression class as the notice/pin fixes in 7b6eb98:
master merged #6480 without a main-CI run, so none of these had been seen.
…t-off revert, test coverage, docs

- B0: on non-cohort chained bypass rounds the in-request flush was the only
  consumer guarded by the one-shot skipPlaneFlush; the relay success path
  re-arms the debounced save and that save rode turn.messages' DELTA view as
  a tagged world — snapViewEvents (final-state diff) deleted every plane row
  the delta lacks. The lane now clears session.lastPlaneMessages on bypass
  rounds, so later saves derive untagged from the DB final state (append-only
  rows — correct).
- Default off (discussion #5874 section 9): the 2026-11-08 100% soak default
  is reverted in all four spots — store.ts field + open() fallback, admin.ts
  status payload, snap-egress.ts gate (egress now opt-in, v?.egress === true) —
  and the p0 flag test now pins default-off. e2e suites arm the flags
  explicitly via a dedicated config file.
- Test gaps from the review: T2 covers the in-transaction rollback leg
  (valid append + R2-unknown update in one batch => nothing lands); T9 raises
  N 40->160 so SNAP_FOLD_DEPTH (128) actually fires and asserts a fold
  happened (ckpt_seq >= 1) — at 40 saves the bound was vacuous; the
  byte-identity oracle's LEGACY_TABLES now includes kv_store (was 11 of 12);
  p2 G2-G5 set egress: true explicitly (they had relied on the soak default).
- Docs: process.yaml egress default false + 3-lang regeneration; proposal
  READMEs (EN/zh) status line, DDL block (actual v12 columns incl. envelope /
  r3_latched_at), probe-first migration note, stage-5 row, section 9 key list,
  section 10 metrics all updated to the direct-authority + default-off state;
  config.ts schema comment; stale comments fixed (session.ts lastPlaneMessages,
  handle.ts B3 string-input admission, snap.ts l1 upsert, p0 T6).
The #5901 rebase auto-merge kept BOTH ../persist.js imports: master's
standalone 'import { getStore }' (added for the #3397 ingestRowsNow
durability-before-render call) and this branch's 'import { SessionStore,
getStore }' (added for the in-request SessionStore.flushOrSnap plane path).
Both are needed symbols (getStore at the ingestRowsNow + budget calls,
SessionStore at the flushOrSkip call), so the superset import stays and the
redundant standalone getStore line is dropped. Fixes TS2300 duplicate
identifier surfaced by the post-rebase typecheck.
@ranxianglei
ranxianglei force-pushed the 2026-11-07_snapshot-table-foundation branch from d30da8b to f42f251 Compare November 14, 2026 08:11
…seeds (docs-sync guard)

The #5901 rebase resolution of website/config-reference/process.yaml dropped the
desc_ja lines for storage.snapBase.enabled and storage.snapBase.shadowWrite.
Master's gen-config-docs.mjs now requires desc_ja on every seed entry, so the
docs-sync CI job fails at the 'generate' step (exit 1) before the drift check.
Restored both lines verbatim from the pre-rebase PR head; generate now exits 0
with no drift and docs-coverage stays green.
…conflict)

Union of both intents:
- #5901 (HEAD): snapshot-plane count columns (snapRows/snapLogEntries/snapCkpts/
  l1Entries) + the #5874 snap_rows inline-footprint term.
- master: sessions/conversations count columns + CAST AS BLOB on every
  LENGTH() (accurate byte count for multi-byte content).

Resolved: 15 sessionId params (15 SQL columns), full result type, CAST AS
BLOB applied to the session_ext term for consistency with the auto-merged
sessions/blocks terms; the #5874 snap_rows term is kept verbatim.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

冲突已解决并推送(2026-11-15)

master 在 owner 上次合并后又前进了(到 f21b601893,比 PR 分支 head eb0670d748 多 153 个提交),GitHub 报 merge state = dirty(与基分支冲突)。本轮把 origin/master 合进 PR 分支,解决了唯一一处冲突,已 fast-forward 推送。

做了什么

验证

  • 本地 worktree 无 node_modules(环境被重置),npm run typecheck 的 pre-hook(kernel build)跑不了。冲突解决已逐行核对:15 参数 ↔ 15 SQL 列、.get() 结果类型 / return 语句 / SessionStorageStats 接口字段齐全、CAST AS BLOB 一致、snap_rows 项保留。完整 typecheck + 回归交给远端 CI(新 head 7526eb826b 的 check 正在排队)。

八问

  1. 是什么问题:PR 分支落后于 master(master 又前进了 +153 提交),GitHub 报 merge state = dirty(与基分支冲突),PR 无法合并。
  2. 什么原因导致的:master 持续合入新工作(batch8-wave8 等),PR 分支(快照表底座)在 owner 上次合并 master 后再次落后;sessionStorageStats() 被两侧独立改动(本分支加快照平面统计、master 加 sessions/conversations + CAST AS BLOB 字节数修正),git 无法自动合并,产生内容冲突。
  3. 影响范围与严重程度:仅阻塞 PR 合并(merge state = dirty),不影响任何已发布行为;PR 本身默认全关、零行为变化。
  4. 怎么修复的:把 origin/master merge 进 PR 分支,对唯一冲突 store.ts 的 sessionStorageStats() 取两侧并集(15 计数列 + 完整类型 + CAST AS BLOB + snap_rows 项),fast-forward 推送。
  5. 是否有回归问题:无。冲突解决是两侧独立改动的并集,未改变任何一侧的语义;CAST AS BLOB 是 master 的字节数修正(更准确),snap_rows 项是本分支新增(默认关)。既有行为(sessions/conversations 计数、内联字节统计)保持。
  6. 是否破坏缓存:不涉及(纯存储统计函数,无缓存/重试/游标)。
  7. 是否改了设计方向:不涉及(仅解决合并冲突,未改架构/边界/数据流)。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。

合并判定:冲突已解决、已推送(7526eb826b)。owner 上轮说的 5 项前置条件现在只剩 CI 绿——新 head 的远端回归正在跑,全绿后这个 PR 可合。

@ranxianglei

Copy link
Copy Markdown
Owner Author

已收编进统一 PR #6785(与 #6564 合并验证,前向合并 master f21b601 解冲突,新增 gate --snapbase-full 全开 lane,gate 双模式 + 平面实证 + 真机 dsh/pi 全过)。请合并 #6785,本 PR 关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR enhancement New feature or request p3 root-cause scope/storage 马上合并

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant