Skip to content

[PR] release v0.1.207 - #4585

Closed
github-actions[bot] wants to merge 12 commits into
masterfrom
bugfix-v0.1.206
Closed

github-actions[bot] wants to merge 12 commits into
masterfrom
bugfix-v0.1.206

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Ship PR for the patch train (dual-lane release): merging publishes the PRE-MERGE head tree — the base tag plus exactly this train’s fixes, none of master’s unreleased work — via release-bugfix.yml.

⚠️ Backport-labeled but NOT on this lane

These fixes expressed backport intent but their commits are absent from bugfix-v0.1.206 — a merged source PR whose picks all conflicted (no clean carry to merge), or a PR still open against the lane at ship time (possibly still holding conflicts). Ship only if leaving them for the next REGULAR release is acceptable:

Changes since v0.1.206

ranxianglei and others added 8 commits October 24, 2026 22:25
)

Four p2 fixes from the five-dimension storage review, one PR:

- identity column: cross-save JOIN key strips id/wireIndex (D4-1);
  content_hash stays the byte-faithful CAS key. v8 migration backfills
  and heals wireIndex-split generations (keep lowest seq, refund CAS
  refs). MySQL twin via information_schema probe + idempotent ALTER.
- authoritative sweep retires absent rows (retired_at tombstone)
  instead of DELETE; rewind-redo reactivates in place at the original
  seq (remap covers completeLog-less saves too); readers filter
  retired rows (D4-2).
- snapshot-render seam image signature hashes the bytes (24-hex
  sha256), not the length — same-size screenshots can no longer chain
  a false seam into silent truncation (D4-3).
- fork lineage: parent_session_id from metadata.derivedFromSessionId
  (D3-2).
- gc full vacuum routes through vacuum() (TRUNCATE checkpoint included,
  files actually shrink, D5-1); loadLegacyView counts tail pointer gaps
  and all three load paths warn instead of silently shrinking (D4-5).

Stakes first: tests/storage-review-p2s.test.ts (7), storage family +
golden/snapshot/fold-reconcile/incremental/web regressions green.
Review fix for CI reds on this branch, part 1 of 2.

- loadLegacyView's new tailGaps counter (D4-5) leaked into the shadow-parity digest surface: the expect leg (live session) structurally lacks the key while the got leg (loadLegacyView output) always carries it, so canonicalize()'s key-preserving normalization made every sampled verify report a fake drift. Drop the key from all digests — same class as the existing storageMode precedent (#2671): presence-not-value, and genuine missing rows still diverge the message arrays themselves, so nothing is masked. describeViewDivergence skips it too, keeping drift diagnostics clean (issue3919 forensics pins keys deepEqual).

- Two stale user_version=7 pins the v8 bump missed: tests/storage-ext.test.ts (v3→v7 title/asserts) and tests/storage-ingest-watermark.test.ts (v4→v7 title/assert) now expect v8, matching the updated pin in tests/storage-unified.test.ts.
…e degrade (#4444)

On a Node.js that has neither the builtin node:sqlite (< 22.5) nor a pinned
better-sqlite3 artifact (e.g. Node 21.x, ABI 120), the engine self-bootstrap is
refused before any download and the unified store degrades to legacy-only. The
degrade reason on the unsupported-node path carried the specific coverage detail
but DROPPED the "upgrade Node.js to >= 22.5" lever that the sidecar-open path
already carries — so a Node 21 user read "no engine supports this Node.js" with
no actionable way out.

- runtime-status degradeReason(): append nodeSqliteUpgradeHint() to the
  unsupported-node reason (keeps the #3894 specific-detail-first ordering).
- engine-bootstrap runBootstrap(): carry the same hint on both skip warns so the
  lane logs match the status surface.
- shadow UnifiedShadow sidecar-open catch: stop advising "delete the file to
  reset the index" for a no-engine failure — deleting cannot conjure an engine;
  that advice only fits a genuine open failure (byte-identical otherwise).
- regression test: force process.versions.node=21.6.1 and assert the acp_status
  STORAGE line carries both the coverage detail and the >= 22.5 upgrade lever.

Refs #4444
…s but bytes diverge

Review fix for CI reds on this branch, part 2 of 2.

The D4-1 JOIN migration made remapPlanToAbsolute reuse a seq whenever (msg_id, identity) matched, and INSERT OR IGNORE then silently kept the first generation's bytes for that seq. Any byte divergence under a matching identity became permanently unhealable by full ingest: (a) head truncation — the PR's own flagship scenario — leaves stored rows carrying the old wireIndex generation, so the parity digest never matches the live view again: every 20th save reports drift, the watermark is cleared, the next full save re-runs the same no-op remap, never converges, and after DRIFT_ESCALATE_STREAK consecutive samples #4323 freezes this process's envelope writes (legacy file goes stale = data-loss vector); (b) an externally corrupted CAS row (watermark boundary-tamper test) was healed pre-migration by the byte-faithful join minting fresh rows, and is now kept corrupted forever.

Fix: when the full path reuses an existing seq via the identity join and the stored content_hash differs from the plan row's hash, UPDATE the row in place to the fresher authoritative bytes (CAS ref juggling put-new -> update-ref -> release-old, FK/refcount safe; media mappings untouched because identity includes the {$media:hash} markers). Seq stability is unchanged; the delta path stays append-only. SQLite + MySQL twins. identity.ts doc updated to match; CHANGELOG notes the behavior change.
…-4444-4506

[PR] backport-carry: storage fixes for #4390 / #4444 / #4506 onto the v0.1.206 patch lane
@ranxianglei ranxianglei changed the title release v0.1.207 [PR] release v0.1.207 Oct 24, 2026
awork added 3 commits October 24, 2026 23:33
…ning silently (#4215)

C10a of the #3011 family checklist (#3025): the #4215 incident showed a
seeded fork child (isSeeded + correct parentSession) with ZERO adoption
trace in the whole log - eight silent early returns made "not a fork" vs
"a fork we could not see" unanswerable after the fact.

- forkChildOf() becomes exported forkChildVerdict(): names all eight
  shapes (initiator-threw/-missing, session-missing, sid-missing,
  header-missing, not-seeded, parent-missing, parent-is-self)
- a seeded candidate blocked at an entry gate (tools-ready / body-parse /
  side-shaped / proxy-base) logs once per session naming the gate
- malformed seeded lineage (isSeeded without a usable parentSession) logs
  a warn once per session
- ambient-blind shapes (fork status undeterminable) log ONE info notice
  per process, flagging whether scoped #4082 attribution was active - the
  C10b identity-route split named in the log
- plain non-fork traffic stays completely silent

Log-only change: no judgment, ordering, or wire behavior changes.
Regression suite: tests/issue4215-fork-gate-diagnostics.test.ts (verdict
matrix + both directions of every gate, #3617 discipline).

Identity-route widening (C10b) needs an owner decision and is NOT part
of this change.

(cherry picked from commit fb54f6e)
(cherry picked from commit 85af00f)
#4264)

When the resume-inheritance gate passed but no byte-exact chain match existed, handle.ts emitted zero logs — clone-inheritance failures (the #3011/#3025 family) were left unattributable; dsh (responses protocol) could not even reach the transcript-lineage log lines, so a miss was absolute silence.

Add PrefixAffinityResolver.diagnoseResumeMiss (diagnostics only, matching untouched): it re-runs the same gates in reporting mode and classifies the closest near-miss as equal-depth (duplicate conversation by design), prefix-break (head drift desynchronizes the prefix), or truncated (incoming shorter than the stored chain). The per-item divergence scan runs once on the single best near-miss over its stored trailing window (cost-bounded); deep chains report the pre-window bound instead of an unsound index. The server logs one line: info with best candidate id + depths + first divergence cell + 8-hex digests when any eligible candidate exists, debug when nothing eligible was tracked. Reuses MIN_RESUME_PREFIX=8; no new config surface, no behavior change.

Tests: the three miss shapes plus truncated, deep-chain pre-window break, scoped declared-parent states (untracked/too-shallow), scoped judging-only-declared-parent, self-exclusion, and hit-path regression (findResumeParent/findResumeParentWithin results unchanged).
(cherry picked from commit 7fff50a)
(cherry picked from commit c1272ae)
…4265 review)

When any gate conjunct short-circuits (derivedFromSessionId,
publicForkReceipt, or resumeInheritance=false) there was no
[resume-inheritance] line at all, so a log without "miss:" stayed
ambiguous between gate-skipped, pre-#4265 build, and miss. The gate's
else-branch now logs one debug line naming the skip reason. Same failure
domain as #4264's stated goal (is the fallback channel even being tried) —
absorbed here rather than a separate PR.

Bounded like the miss line: the else-if re-checks clientProvided &&
requests === 0, and stats.requests increments later in the prepare lanes,
so it fires at most once per session lifetime; anonAffinity is structurally
null on this path (only the anonymous lane sets it). Purely additive — the
gate condition itself is untouched, matching is unchanged.

New e2e pin (tests/resume-inheritance-gate-skip.test.ts): both directions —
skipped gate logs exactly one bounded debug line naming the reason, and an
unskipped gate keeps the existing miss line and never says skipped.

(cherry picked from commit f3f7578)
(cherry picked from commit ea712f8)
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

判定:不做 rebase/merge——这是 release-bugfix.yml 里写明的「conflicted ship PR」冲突类,而它指定的解法(backport-ship 按 head tree 直接发版)已经在途。 本次(2/2)只交判定,不动分支。

查重:不适用(系统转发的 rebase 唤醒,非新问题报告);冲突机制归属 #4576 follow-up / #4596(label-publish 路径)。
标签:scope/ci + p3(发版管道被合并按钮卡住;用户侧零影响,理由见第 3 问)。

八问

  1. 是什么问题:v0.1.207 补丁车道 ship PR(head 分支 bugfix-v0.1.206)与 master 有合并冲突,GitHub 合并按钮拒绝(dirty)。
  2. 什么原因:车道从 v0.1.206 tag 切出,但车上每一个修复后来都已各自落到 master——存储火车 Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390/SQLite unified storage degraded to legacy-only (bili v0.1.204, node v21.6.1, win32-x64) #4444/CI fully red (on master itself): #3250 WAL cap assertion failing across all platform shards — suspected that this mornin | CI 全红(master 自身):#3250 WAL cap 断言在所有平台分片失败,疑似今晨合入的存储层改动破坏 autocheckpoint 截断行为 #4506 分别经 [PR] storage: position-independent row identity + historian tombstones (#4390) #4395/[PR] fix: surface Node.js upgrade warning on unsupported-node storage degrade (#4444) #4451/[PR] fix(#4506): release media refs on historian retire + budget the #3250 custom-cap slack (#4390 follow-ups) #4511,[Bug][DSH] Fork loses fold inheritance without adoption diagnostics; interrupted preflight leaves child in repeated local 413 #4215/A resume-inheritance miss is a blind spot: when the gate passes but no byte-level chain match exists, zero logs are emit | resume-inheritance 未命中是盲区:门控通过但无字节级链匹配时零日志,克隆继承失败无法归因 #4264/[PR] No longer silent on resume-inheritance miss: add a line of bounded near-miss diagnostics (#4264) | resume-inheritance 未命中不再静默:补一行有界近失诊断(#4264) #4265 诊断各经自己的 PR——master 又前进了 303 个提交并改写了同一批文件(src/storage/store.ts、src/storage/identity.ts、src/agent/dsh-native.ts、src/prefix-affinity.ts、CHANGELOG.md、两个测试文件)。冲突是结构性的(lane 落后 master 整段历史),不是文本噪音。
  3. 影响范围与严重程度:没有任何面向用户的修复被搁置——车道上的修复全部已在 master,下次常规发版必带;npm latest 仍是 0.1.206,用户不受影响。严重度 = 流程阻塞(合并按钮不可用),非用户影响。
  4. 怎么修复的:设计上不能把 master merge/rebase 进车道——那会把 ~303 个未发布提交吸收进待发布的 head tree,违反 carve-out 契约(PR 自述「the base tag plus exactly this train's fixes, none of master's unreleased work」;release-bugfix.yml 头注释原话:resolving on the lane would absorb unreleased master work into the published head tree)。该冲突类的指定出口是 backport-ship 标签:pull_request_target 直接把 PR head tree 当产物发布,不经过合并。
  5. 回归风险:本次未推送任何内容,零回归。已核实的在途状态:backport-ship 标签已在 PR 上;[PR] fix(release): label-gated head-tree publish for conflicted carve-out ship PRs #4596(label-publish 实现)已于 03:24 UTC 合入 master;针对 head ec5d3e3e3 的 pull_request_target 发布运行自 03:26 UTC 起 queued(actions run 40158203332);版本守卫可通过(目标 0.1.207 > npm latest 0.1.206)。附带说明:开 PR 后补进车道的三个诊断 commit 是 master 已有提交的旧措辞变体(如 msgs/cells 文案),仅诊断文本漂移,无行为差异。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有——完全沿用 [PR] fix(release): train mode survives pre-#4449 patch lanes #4576 follow-up 的既有设计(agent 不替人做发布决策)。
  8. 是否引入新配置:没有。

给 owner 的行动项:

收工判定:冲突本身无需 agent 解决,机械动作(rebase/merge/push)在此场景下都是错误动作;设计决策(何时/是否按 head tree 发布)已由 label 动作表达且执行在途,本 worker 到此为止。

…review)

ResumeMissCandidate / ResumeMissReport are referenced only inside prefix-affinity.ts (describeResumeMiss consumes them); the leading export made them dead external surface and tripped the unused-exports gate, which fails the release-bugfix full-CI gate. Drop the export keyword only - type-level, internal references intact, no behavior change.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

PR #4585「release v0.1.207」patch-train 审阅 — 结论:内容可发;唯一 CI 红灯已定位并修掉

这是 dual-lane 补丁列车(合并即发布 pre-merge head 树 = v0.1.206 + 本列车修复,不含 master 未发布工作)。我拉了分支逐段核对 diff、本地复跑门禁、确认了 CI。唯一红灯 unused-exports 非继承自 master,是本列车新文件引入的,已作为独立标注 commit 推到分支;除此之外全部真客户端 e2e 车道绿。

查重:不重复——v0.1.207 补丁列车的发布 PR;存储修复对应已立项的 #4390/#4506/#4444,末尾三个 carry(#4215/#4264/#4265)是 master 已合并工作的回移(cherry-pick,不同 SHA:master 侧 85af00f / c1272ae / ea712f8),非新开发。无并列重复发布。

八问:

  1. 是什么问题:v0.1.203–204 引入的一批存储可靠性缺陷——①折叠上下文在模型/窗口切换后悄悄膨胀直至超窗;②图片会话媒体引用泄漏(字节只增不减);③存储校验误报漂移 + After idling for one hour, the fold override is lost: the client resends byte-for-byte identical content, and the previo | 闲置一小时后折叠覆盖丢失:客户端重发逐字节不变,已折叠的 ~240K token 内容自己回到上下文 #4323 信封冻结的数据丢失向量;外加 fork-adoption / resume-inheritance 门控静默跳过、事后无法诊断。本 PR 把这些修复打包到 v0.1.207。

  2. 什么原因导致的(分层):行身份掺入 wire 位置元数据(wireIndex/id)→ 客户端头部截断一条就让后续全行换血、seq 重铸、区间账记抖动(Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390 D4-1);权威集清扫用物理 DELETE + retired 行媒体映射/CAS 引用永不释放 → 历史丢失 + 字节泄漏(CI fully red (on master itself): #3250 WAL cap assertion failing across all platform shards — suspected that this mornin | CI 全红(master 自身):#3250 WAL cap 断言在所有平台分片失败,疑似今晨合入的存储层改动破坏 autocheckpoint 截断行为 #4506, Same image bytes stored once per conversation/message copy — split media payloads into a content-addressed store (follow-up to #3751/#3748) #3762/Storage cleanup wave 2: Batch-clearing nine items (Correctness #3841/#3798 + GC #3463/#3671/#3762 + Posture #3723/#3489/ | 存储收尾第二波:九项一次清账(正确性 #3841/#3798 + GC #3463/#3671/#3762 + 姿态 #3723/#3489/#3633/#3788) #3901);snapshot 接缝指纹用图片长度而非字节 → 同尺寸截图连击假接缝 → 静默截断(D4-3);全量 ingest 对「identity 相同、字节不同」靠 INSERT OR IGNORE 留旧世代 → 头部截断后永久失配 → After idling for one hour, the fold override is lost: the client resends byte-for-byte identical content, and the previo | 闲置一小时后折叠覆盖丢失:客户端重发逐字节不变,已折叠的 ~240K token 内容自己回到上下文 #4323 数据丢失向量;fork/resume 门控多处 early-return 不写日志 → 静默([Bug][DSH] Fork loses fold inheritance without adoption diagnostics; interrupted preflight leaves child in repeated local 413 #4215 无从诊断)。

  3. 影响范围与严重程度:p1 级(数据丢失 / 上下文失控类)。触发条件:模型或窗口中途切换(→膨胀超窗)、图片重度会话(→媒体泄漏)、多实例写同一目录(→After idling for one hour, the fold override is lost: the client resends byte-for-byte identical content, and the previo | 闲置一小时后折叠覆盖丢失:客户端重发逐字节不变,已折叠的 ~240K token 内容自己回到上下文 #4323 假性死局 502)、fork 子会话(→继承静默失败)。命中路径的用户会话会退化甚至不可用,未命中者不受影响——「特定条件下有问题但后果严重」,故定 p1。

  4. 怎么修复的(机制层):messages 行新增位置无关 identity 列作跨保存 JOIN 键(剥离 id/wireIndex 后哈希),content_hash CAS 键保持字节忠实不变,v8 迁移回填并合并 wireIndex 分裂世代(MySQL 同款幂等 ALTER);权威集清扫改 retired_at 墓碑(不物理删,rewind 历史耐久保留,同身份原地复活保 seq,读面默认过滤 retired、CAS 引用不释放);retire 时释放媒体映射+引用、复活时幂等重建;接缝图片段改 sha256(base64) 前 24 hex 真指纹;fork 谱系 parent_session_id 从信封 derivedFromSessionId 落库(此前恒 null);fork/resume 门控改结构化 verdict + 有界诊断。

  5. 是否有回归问题:高危域逐一过——

    • dsh-native.ts(+153):全是观测性重构(forkChildOf→forkChildVerdict + 有界日志),真实 adoption 调用与门控条件未变,仅检查顺序微调(verdict 先于 toolsReady 计算,不影响是否 adoption)。
    • handle.ts(+32):纯增量诊断(miss/skip 各一行 log),注释明写「Diagnostics only: matching untouched」。
    • snapshot-render.ts:identitySig 图片段 length→sha256 是有意行为变更(修假接缝),见第 3 问。
    • storage/*:row identity / tombstone / media-release 均为有意修复;全量 ingest 采纳更新字节(seq 稳定,delta 追加仍只增不改)。
    • 唯一红灯 unused-exports:非继承(client-build-note.ts 在本 base 不存在),是 prefix-affinity.ts 两个 internal-only interface 误加 export。已修(de-export,类型级零行为变更),本地 check-unused-exports.mjs 复跑 clean。
    • 高危模式逐项:fail-fast 变吞错=无;阈值/时序漂移=仅测试预算 CAP_SLACK 4KiB→64KiB(test-only,注释引 Four storage-layer defects: identity hash contaminated with positional metadata (truncation triggers identity swap) / sw | 存储层四缺陷:身份哈希掺位置元数据(截断即换血)/清扫删除回退历史/渲染接缝图片只比长度/fork 谱系死列 #4390 行体积);输出格式=新增有界 log 行;缓存键=未动(见第 6 问)。
    • 覆盖率诚实声明:dsh-native / handle / snapshot-render / prefix-affinity / 版本文件我做了行级精读;storage 核心(identity/store/ingest/mysql/schema)以 CHANGELOG 详述 + 绿色定向 e2e/测试族(mysql-contract、storage-review-p2s +241、acp-status-storage-degraded、media-cas)+ diffstat 交叉印证,未逐行通读每个文件。
  6. 是否破坏缓存:否。prefix-cache 键未动,content_hash CAS 键保持字节忠实;position-independent identity 反而提升稳定性(消除截断引发的 seq 重铸/假性 re-fold)。snapshot identitySig 改动只进接缝探测(折叠边界证据),不进 cache key。净效应为正。

  7. 是否改了设计方向:否。既有存储架构内的可靠性加固(identity 列扩展 + 墓碑化清扫),非重构/转向。

  8. 是否引入新配置:否。无新 env/config/默认值。SQLite unified storage degraded to legacy-only (bili v0.1.204, node v21.6.1, win32-x64) #4444 只是把既有 Node.js 升级指引浮到 unsupported-node 降级提示上,不是新开关。

发布机制核对:package.json 0.1.206→0.1.207 ✓;package-lock 两处版本同步 ✓;release-notes/package.json 新增 0.1.207 条目(tier=recommended,2026-10-24)✓;CHANGELOG 详实且与 diff 一致 ✓。#4519/#4503(CI carry 机制本身)确认不在本 lane,按 issue 口径留给下次常规发布可接受,不影响发布物正确性。

两个待 owner 注意的非阻塞项(我不改写 bot 生成的 PR 正文,仅在此指出):

收工判定:内容可发。除已修的 unused-exports 外,无回归、无缓存破坏、无方向变更、无新配置。待 CI 在新 head b60e0755e 转绿后即可由你合并发布。

@ranxianglei

Copy link
Copy Markdown
Owner

不要再开这个pr 这个pr有很大问题 打赏标签后会里面发布

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant