Skip to content

[PR] fix: derived-parent decompress honors toFile and spills oversized restores (#5013) - #5038

Open
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-28_decompress-derived-gate-5013
Open

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-28_decompress-derived-gate-5013

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What this changes

resolveDerivedDecompress (the read-only #1333 fallback serving parent blocks to derived/child sessions) was the only decompress route without the size gates its siblings carry — confirmed by the v0.1.208 audit in #5029/#4992:

  • an explicit toFile argument was silently ignored (always inline);
  • bodies over 10000 chars were served unbounded inline — an oversized parent block restored into a near-full child window rode the wire as-is (the "decompress context explosion" symptom family from the audit).

Changes

  • extract autoSpillReceipt() as the shared spill leg for all three inline restore paths (whole-block, range, derived-parent); filenames stay byte-identical on the two pre-existing paths (acp-decompress-<tag>-<Date.now()>.txt, 0600, reaper-tracked);
  • wire the derived-parent path through toFilePointer() + autoSpillReceipt() like its siblings.

Behavior changes (old → new)

Path Old New
derived-parent + toFile ignored; always inline honored; writes to the caller's path with the standard receipt (#1691/#2204 contract)
derived-parent, body > 10000 chars unbounded inline spills to a tracked temp file; pointer receipt
whole-block / range restore spill at > 10000 chars unchanged (pure refactor; filenames identical)

Tests

New tests/issue5013-decompress-derived-gate.test.ts pins both gate directions:

  • positive: over-cap body → pointer receipt, temp file holds the full body, raw body absent from the wire text; full: true serves the full view; explicit toFile honored on the derived path;
  • negative: under-cap body stays inline (no written to: pointer);
  • read-only invariant: ancestor state untouched (restoredInline never flagged).

Targeted local run: 53/53 across the 8 decompress suites (new file + proxy-decompress-cache / issue2204-to-file-outcome / fix-decompress-tofile / fix-decompress-reaper / decompress-empty-range / decompress-image-ref-dispatch / issue1333-derived-inheritance); typecheck clean. Full-suite verdict = CI on this head.

Part of #5013 (window-relative threshold semantics for the preflight gate still await owner decision — this PR closes only the decision-free gap). Audit thread: #5029 (duplicate of #4992).

Base: current master b0b0e66 (already includes the #5017 ci-fixes convergence).

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-28_decompress-derived-gate-5013 (0e4906e)

Latest build — install this exact version

npm install -g billion-context@0.0.9539-pr.5038.a0d9058

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
0e4906e billion-context@0.0.9539-pr.5038.a0d9058 build
e0defe2 billion-context@0.0.7414-pr.5038.b1bfd11 build
8958c69 billion-context@0.0.7178-pr.5038.521768d build
4741cdb billion-context@0.0.6893-pr.5038.9bfe71f build
7f03fb2 billion-context@0.0.6644-pr.5038.7c81baa build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix: derived-parent decompress honors toFile and spills oversized restores (#5013) [PR] fix: derived-parent decompress honors toFile and spills oversized restores (#5013) Oct 28, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。 本 PR 是 #5013「无决策依赖部分」的交付(正文已注明 Part of #5013);#5029/#4992 是发现该缺口的审计线(#5029 标为 #4992 重复)。open/closed 中无其他条目覆盖同一机制(derived-parent 路径漏建尺寸门)。相邻但不同机制:#4080(整块 spill 不置 restoredInline)——本 PR 未触碰该路径行为。

标签:bug / pi / scope/kernel / p3(缺陷修复;派生路径即 pi RLM 子会话车道 #1333;decompress 决策面,与 #5013 口径一致;严重度随父 issue p3)。标签接口当前不可用,未能落库,在此代报。

身份核对:head 7f03fb291、base master b0b0e66ff(= 现行 master)、单 commit、mergeable。#5013 floor 4 确认这是本舰队交付——按「识别自己的 PR」流程执行:拉分支核对代码、确认 CI、报告结论,不重做。以下审核基于独立通读 diff 产出,不复用 issue 侧结论。

diff 核对(2 文件:src/decompress-shared.ts +69/-29,新增 tests/issue5013-decompress-derived-gate.test.ts +97;逐行与本 PR 目的相关,无跑题、无空白噪音):

  • autoSpillReceipt() 抽取:与改动前两条既有路径(整块、range)逐行比对——阈值语义(严格 >10000 才 spill)、文件名(acp-decompress-<tag>-<Date.now()>.txt,range 的 tag 含 startRaw-endRaw,字节级不变)、0600、trackedTempFiles 登记 + reap、成功回执文本、失败回执(exportFailureReceipt)全部一致。纯重构成立。
  • derived-parent 接入:先 toFilePointer(显式 toFile 生效;拒绝/写失败回失败回执,与兄弟路径一致),再 autoSpillReceipt(tag <blockId>-derived),cap 内保持原内联返回。两个 helper 只碰日志、文件写、模块级临时文件账本,不触祖先状态——只读不变量(无 restoredInline / markDirty / 缓存写)成立。
  • 分派顺序未动:imageRef 拦截 → blockId 门 → 本地块命中?miss → derived 回退;derived 内部先拒 range args 再走闸门,「derived + range + toFile」类请求行为不变。
  • 热文件提示:[PR] fix: cover every Han block in plan search term extraction (planTokenize) #4325(planTokenize 扩展汉字)同改 src/decompress-shared.ts 但函数区不相交,合并顺序均安全。

既有行为回归审计(逐项结论):

  1. 整块恢复:inline / spill / toFile / restoredInline 标记 / refold hint —— 零变化(逐行核对 + proxy-decompress-cache、fix-decompress-tofile 套件绿);
  2. range 恢复:注入队列去重、rangeRestores 统计 —— 零变化(fix-decompress-reaper、decompress-empty-range 绿);
  3. 图片恢复(imageRef)—— 未触碰(decompress-image-ref-dispatch 绿);
  4. 失败回执 [decompress FAILED: 前缀(loop 重复失败守卫与 plugin 成功头检测的识别面)—— 各路径措辞零变化;
  5. 临时文件生命周期(reaper 上限、beforeExit 清理)—— derived 路径新入同一账本,上限逻辑不变(fix-decompress-reaper 绿);
  6. 前缀缓存 —— 不受影响:decompress 结果本就是新消息,spill 路径字节不进线;祖先 blockContents 仍只读。

测试有效性:新测试钉住闸门双向(超 cap→指针回执 + 临时文件内容==全文 + 原文不出现在 wire 文本;低于 cap→保持内联且无指针)+ full 视图 + 显式 toFile 生效 + 祖先 restoredInline 未置位。断言有牙(文件内容精确相等、wire 负向断言),该 bug 回归时两例都能抓住。小缺口(不拦):derived spill 文件入 reaper 账本无专门断言(内部实现,reaper 本体由兄弟套件覆盖);derived 小正文 + toFile 组合无专例(toFilePointer 为共享代码,issue2204 套件已钉)。

验证:head 上定向跑 8 个 decompress 套件 53/53 通过(与 PR 描述一致),typecheck 干净(均为定向运行,全量判定以 CI 为准)。CI 最新镜像快照(11:29Z):0 failed / 14 passed(kernel-guard、config-surface-guard、lock-sync、pi-subagents-guard 等守卫全绿)/ 11 skipped / 5 pending(test-import-graph、version-guard、lane-guard、docs-sync、plan),主 test 车道尚未入快照——最终判定等 CI 跑完。

八问

  1. 是什么问题:子会话恢复父块的 decompress 路线([pi plugin] Prime RLM inline 派生子会话在代理模式下零继承:搜不到也解压不了父会话压缩块(billion-context-pi#531 同场景) #1333 只读回退)是唯一没有尺寸闸门的路线——显式 toFile 被静默忽略,父块超 10K 字符时无界原样灌进子窗口。
  2. 什么原因导致的:三条兄弟路线建尺寸门(10K 落盘 + toFile 生效,decompress: toFile is documented but never read — every restore goes to os.tmpdir() #1691/[decompress] toFile 将虚拟 URI 当磁盘路径,导出写入失败仍返回成功 #2204)时漏掉了 derived 路径——纯疏漏,非设计缺陷。
  3. 影响范围与严重程度:仅派生会话(现 pi RLM 子会话)恢复超大父块或传 toFile 时触发;低频、可恢复(内容不丢,只是体积失控上线 / toFile 被忽略)。p3,随父 issue decompress lacks preflight size check — oversized restore fails at upstream instead of failing early #5013。
  4. 怎么修复的:抽出共享 spill 腿 autoSpillReceipt(),derived 路径接入与兄弟同款两道门(toFile 优先、超限落盘回指针),不引入新机制。
  5. 是否有回归问题:无。两条既有路径纯重构、文件名与回执字节级一致(逐行核对 + 套件绿);唯一行为变化是 derived 路径获得闸门,正是修复本身,旧→新已在正文披露且经我核对属实。
  6. 是否破坏缓存:不涉及。decompress 结果本就是新消息;derived 对祖先保持只读。
  7. 是否改了设计方向:不涉及。补漏网闸门,数据流与架构不变。
  8. 是否引入新的配置:无。10000 升格为具名常量 INLINE_RESTORE_CHAR_CAP(值不变),不加 env/config key。

判定:可合(待 CI 收尾;当前快照 0 红、守卫全绿)。本 PR 只收 #5013 的无决策部分;预检阈值语义的决策请求(推荐 C+0.9)仍在 #5013 线程等你拍板,未被本 PR 抢跑。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

进度汇报(进程曾被强制重启一次,现恢复)

审查结论已在上一条给出(可合,待 CI 收尾)。补充 CI 终态与红腿定性进展:

  1. CI 终态(head 7f03fb291,47 项 check):34 success / 12 skipped / 仅 1 红——test (windows-latest, 22, 1)。全部 ubuntu 分片、windows 分片 2–5 及所有守卫(kernel-guard / config-surface-guard / lock-sync / unused-exports / docs-coverage …)全绿;本 PR 新增测试文件在其所在平台分片上通过,diff 自身路径全线绿。
  2. 红腿交叉比对: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 414(16:23Z)记录 PR [PR] fix(served-markers): ignore prior container generations with same PID on restart (#3923) #5028 同车道(windows×node22 shard 1)同签名红——2709 用例仅 2 失败,均在 tests/issue4982-draining-twin-ladder.test.ts(「timed out waiting for P1 to stamp portReleasedAt」+「uncaughtException read ECONNRESET」),且该树已含 [PR] ci: converge master-CI fixes (register issue4982 spawning suite in LIVE_FILES) #5017 收敛修复 → 指向该套件的在档残留 flake 家族,与本 PR diff(decompress 恢复门)零交集。
  3. 下一步:拉取该红腿 job 日志确认失败签名;若与在档签名一致,按在档口径处置(ci-fixes 若有新修复则 merge 入分支,否则 rerun-failed-jobs 一次),结论补到本帖并在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 留一行。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 红腿定性完成:继承性 flake,非本 PR 引入

  1. 日志证据(job log 逐行核对):唯一红腿 test (windows-latest, 22, 1) 共 2709 用例、仅 2 失败,全部来自 tests/issue4982-draining-twin-ladder.test.ts 的两条 e2e:
  2. 本 PR 自身路径全绿:新增测试在同一失败分片内通过(ok 947 derived-parent restore over the inline cap spills…、ok 948 …under the inline cap stays inline (#5013 negative gate));diff 只触碰 decompress 恢复门,与 [PR] release v0.1.209 #4982 套件零交集。其余 46 项 check(含全部 ubuntu 分片、windows 分片 2–5、所有守卫)均 success/skipped。
  3. 无 ci-fixes 可合并:ci-fixes tip c24c30341 经本地 merge-base --is-ancestor 确认已是本 PR base b0b0e66ff 的祖先(它就是 [PR] ci: converge master-CI fixes (register issue4982 spawning suite in LIVE_FILES) #5017 收敛链上的提交),分支侧没有可继承的新修复。
  4. 已执行动作:按在档 flake 口径触发 rerun-failed-jobs 一次(run 40679132537,HTTP 201);已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 留一行状态。

判定维持不变:可合。 若重跑后同签名在干净 runner 复发,再按在档口径升级——届时问题归属是 #4982 套件自身的 waitUntil 预算与僵尸 socket 处置,与本 PR 无关,另行跟进。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

进度汇报(进程再次被强制重启,现恢复)

rerun-failed-jobs 已完成:test (windows-latest, 22, 1) attempt 2 仍红(job 123022515852),全套其余 job 均完成。正在拉取 attempt-2 日志核对失败签名:

  • 若与在档签名一致(同两条 tests/issue4982-draining-twin-ladder.test.ts e2e)→ 按在档口径升级:[PR] release v0.1.209 #4982 套件自身的 waitUntil 预算/僵尸 socket 处置是独立缺陷,另行立项跟进,不阻塞本 PR 的审查结论(本 PR 自身测试两连绿、diff 与失败路径零交集);
  • 若出现新签名 → 重新定性。

结论与判定不变,签名确认后在此与 #4599 各补一行。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

结案:红腿定性完成,审查判定维持「可合」

  1. attempt 2 日志核对:同一失败对、逐字同签名——not ok 945(timed out waiting for P1 to stamp portReleasedAt and release the socket,duration 21649ms,再次耗尽 waitUntil ~22s 预算)+ not ok 946(测试结束后僵尸 socket uncaughtException read ECONNRESET)。本 PR 新增测试在同一失败分片内再次全绿(ok 947 / ok 948)。
  2. 三连发证据链:该签名在 [PR] fix(served-markers): ignore prior container generations with same PID on restart (#3923) #5028(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 414)、本 PR attempt 1、本 PR attempt 2 共出现三次,三棵树的 base 均含 [PR] ci: converge master-CI fixes (register issue4982 spawning suite in LIVE_FILES) #5017 收敛修复 → 判定为 [PR] release v0.1.209 #4982 e2e 套件自身的残留负载依赖竞态(master 级测试侧缺陷),与本 PR diff(decompress 恢复门)零交集。
  3. 处置:已按在档口径在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 升级一行(建议 ci-fixes 收敛:win×node22 放宽 waitUntil 预算 + socket 补 error handler);按 CI 协调政策未另开 issue。不再自行 rerun(两次同签名后继续重跑只会消耗 fleet runner)。
  4. 最终判定:可合。唯一红腿为继承性 flake;待 w22s1 转绿(runner 负载回落或套件硬化落地)即可直接合并,或由 owner 视情况 override。合并动作按系统规则由 owner 执行:[PR] fix: derived-parent decompress honors toFile and spills oversized restores (#5013) #5038

行为变更披露(重申自 PR):derived-parent restore 的 toFile 从「静默忽略」变为「生效」,超 10000 字符从「无界内联」变为「spill 到受追踪临时文件 + 指针回执」;whole-block/range 两路径为纯重构,文件名与阈值逐字节不变。无新增配置项。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

最终状态确认(进程重启后补发,工作已全部完成、无待办)

本 PR 审查已结案,结论不变:可合。要点回顾(详见本帖上方各条):

  1. 独立 diff 审计 + 三条 restore 路径回归清点 + 测试有效性检查通过;本地定向验证 53/53 + typecheck 干净;
  2. CI 唯一红腿 test (windows-latest, 22, 1) 经两轮 job 日志核对 = [PR] release v0.1.209 #4982 e2e 套件自身的残留负载竞态(master 级,与本 PR diff 零交集;本 PR 新增测试两连绿);
  3. 已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 留升级行(三连发证据链 + ci-fixes 硬化建议),按政策不再 rerun、未另开 issue。

剩余动作仅一项且归 owner:合并 https://github.com/ranxianglei/billion-context/pull/5038(待 w22s1 转绿或 override)。本 agent 侧无进一步动作。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b) Merge-guard update-branch: merged origin/master (09a5b5b) into this PR branch -> new head 4741cdb (clean merge, no conflicts; master did not touch src/decompress-shared.ts), local typecheck green, pushed fast-forward. PR is now up-to-date with master and conflict-free (mergeable_state behind -> blocked, i.e. awaiting CI); CI is running on 4741cdb.

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b) Merge-guard update-branch (round 2): master had advanced again (09a5b5b -> 44067a5); re-merged into this branch -> new head 8958c69 (clean merge, no conflicts; master still did not touch src/decompress-shared.ts), local typecheck green, pushed fast-forward. PR is up-to-date with master and conflict-free (mergeable_state behind -> blocked = awaiting CI); CI running on 8958c69.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) Merge-guard update-branch for #5038 is complete — no further action needed. Two rounds ran because master advanced twice (09a5b5b77 → 44067a5bc); each round merged origin/master into the PR branch cleanly (no conflicts — master never touched src/decompress-shared.ts). Final head 8958c698a, pushed fast-forward, local typecheck green every round. PR is up-to-date with master and conflict-free (mergeable_state behind → blocked = awaiting CI); remote CI owns the full-suite verdict on 8958c698a. No design-level conflicts arose, so no decision-request issue was opened.

…tores (#5013)

resolveDerivedDecompress was the only decompress route without the size gates its siblings carry (#5013, audited from #5029/#4992): an explicit toFile was silently ignored and an oversized parent block rode the wire unbounded into a near-full child window.

- extract autoSpillReceipt (shared spill leg; filenames byte-identical for the existing whole-block and range paths)
- wire the derived-parent path through toFilePointer + autoSpillReceipt like its siblings
- tests/issue5013-decompress-derived-gate.test.ts pins both gate directions plus the read-only ancestor invariant
@ranxianglei
ranxianglei force-pushed the 2026-10-28_decompress-derived-gate-5013 branch from e0defe2 to 0e4906e Compare November 13, 2026 11:06
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复 — 本条是 PR #5038 的指定冲突处理车道(auto-fix lane attempt 1/3),该 PR 无其他在途冲突/修复工作。

本次操作: 把 PR 分支 2026-10-28_decompress-derived-gate-5013 rebase 到最新 master(99c22d283f, 2026-11-13),解决 src/decompress-shared.ts 的 2 处冲突,force-push(任务指定的 conflict-rebase;push 前已 fetch 确认远端 head 仍为 e0defe2ae5,无并发写入)。分支原有 3 个纯 master-sync merge commit + 1 个 fix commit,rebase 后收敛为最新 master 之上的单一线性 commit 0e4906e0b1。

冲突解法(关键点): 两处冲突同一机制——本 PR 把三条 decompress 恢复路径的 spill 逻辑抽成共享 autoSpillReceipt(),而 master 的 #6191 修复(6b00739e2e, 2026-11-11)已把其中两条路径的 spill 文件名改为 randomUUID() + wx 独占创建(防同毫秒撞名互相覆盖)。两侧都不能原样取: 取 PR 侧会回退 #6191(同 tag 同毫秒的两次 spill 互相覆盖文件);取 master 侧会让 PR 目的落空(derived-parent 路径仍没有 toFile/spill 门)。解法 = 语义并集: 保留 PR 的共享 helper,把 master #6191 的唯一文件行为(randomUUID() + flag: "wx")吸收进 helper,doc 注释带上 #6191 理由。

验证: typecheck 通过;本地跑全部 7 个 decompress 相关测试文件(含本 PR 新增的 tests/issue5013-decompress-derived-gate.test.ts),46/46 通过。全量回归交给 CI: push 后镜像缓存确认新 head 0e4906e0b1 已触发,30 个 check 运行中,merge 状态 dirty → blocked(可合并,等 required checks)。

八问:

  1. 是什么问题: PR 分支落后 master 12 天,期间 master 改了同一片 decompress spill 代码(bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191),分支与 master 冲突、无法合并。
  2. 什么原因导致的: PR(10-28)抽共享 spill helper 与 master(11-11)改 spill 文件唯一性落在同一代码区域,git 无法自动合并。
  3. 影响范围与严重程度: 仅影响本 PR 的可合并性;分支未合入,无用户面影响。
  4. 怎么修复的: rebase 到最新 master,冲突按「语义并集」解——PR 的共享 helper 吸收 master bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191 的唯一文件行为,两侧行为都不丢。
  5. 是否有回归问题: 既有行为逐项核对——whole-block 与 range 两条路径的阈值(10000)、文件名模式(含 UUID 与 span)、0600/wx、reaper 跟踪、失败回执文案,与 master 逐字节一致,无漂移;derived-parent 路径新增 toFile + spill 门,是 PR 声明的目的本身。无回归。
  6. 是否破坏缓存: 不涉及(未触碰缓存/重试/游标/去重键;range 路径的 injection 去重逻辑原样)。
  7. 是否改了设计方向: 不涉及(PR 的共享 helper 方向不变,仅 helper 本体对齐 master bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191)。
  8. 是否引入了新的配置: 不涉及。

判定: 冲突已解决,分支为最新 master 之上的单一线性 commit,本地 typecheck + 46 个定向测试绿,CI 在新 head 上运行中;CI 转绿后 PR 即可合并(合并仍由人执行)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

重启后状态:工作已全部完成,无待办

强制重启未影响结果——重启前冲突处理已完成、八问总结已发帖(本帖上一条,11:28Z)。要点:

  1. PR 分支 rebase 到最新 master,src/decompress-shared.ts 2 处冲突按「语义并集」解(PR 的共享 helper autoSpillReceipt() 吸收 master bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191 的唯一文件行为 randomUUID() + wx),force-push 至单一线性 commit 0e4906e0b1;
  2. 本地 typecheck 干净 + 46/46 定向 decompress 测试绿。

最新 CI 状态(镜像缓存 11:30Z,新 head 0e4906e0b1): 30 个 check 全部完成 — 18 success / 12 skipped(e2e 车道对本 diff 不适用)/ 0 红。merge 状态 blocked = 可合并,等人工合并。

本车道无进一步动作;合并由 owner 执行: #5038

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

收工判定:冲突已解、CI 全绿,PR 可合(合并由 owner 执行)

本次 CI 工程师车道(auto-fix attempt 1/3)处理完毕,无待办:

做了什么

  1. 把 PR 分支 2026-10-28_decompress-derived-gate-5013 rebase 到最新 master(99c22d283f),解决 src/decompress-shared.ts 的 2 处冲突,force-push 收敛为单一线性 commit 0e4906e0b1(push 前 fetch 确认无并发写入)。
  2. 冲突按「语义并集」解:保留 PR 抽出的共享 helper autoSpillReceipt(),把 master bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191 的唯一文件行为(randomUUID() + flag: "wx")吸收进 helper——两侧行为都不丢(取 PR 侧会回退 bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191 的同毫秒撞名修复;取 master 侧会让 derived-parent 路径的 toFile/spill 门落空)。
  3. 本地验证:typecheck 干净 + 7 个 decompress 测试文件 46/46 绿(含本 PR 新增 tests/issue5013-decompress-derived-gate.test.ts)。

结果(镜像缓存 11:30Z,新 head 0e4906e0b1)

  • 30 个 check 全部完成:18 success / 12 skipped(e2e 车道对本 diff 不适用)/ 0 红。
  • 系统已确认:「CI fix verified green ✓」。
  • mergeable_state: blocked = 可合并,等人工合并。

八问

  1. 是什么问题: PR 分支落后 master 12 天,期间 master 改了同一片 decompress spill 代码(bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191),分支与 master 冲突、无法合并。
  2. 什么原因导致的: PR(10-28)抽共享 spill helper 与 master(11-11)改 spill 文件唯一性落在同一代码区域,git 无法自动合并。
  3. 影响范围与严重程度: 仅影响本 PR 的可合并性;分支未合入,无用户面影响。
  4. 怎么修复的: rebase 到最新 master,冲突按「语义并集」解——PR 的共享 helper 吸收 master bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191 的唯一文件行为,两侧行为都不丢。
  5. 是否有回归问题: 无。whole-block 与 range 两条路径的阈值(10000)、文件名模式(含 UUID 与 span)、0600/wx、reaper 跟踪、失败回执文案与 master 逐字节一致;derived-parent 路径新增 toFile + spill 门,是 PR 声明的目的本身。
  6. 是否破坏缓存: 不涉及(未触碰缓存/重试/游标/去重键;range 路径的 injection 去重逻辑原样)。
  7. 是否改了设计方向: 不涉及(PR 的共享 helper 方向不变,仅 helper 本体对齐 master bili goose: launcher discovers only config.toml + custom_providers/*.toml — Goose ships config.yaml + <id>.json, so the lane silently runs uncompressed #6191)。
  8. 是否引入了新的配置: 不涉及。

判定:可合。 合并动作按系统规则由 owner 执行: #5038

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

APPROVE — clean, well-scoped fix; the last ungated decompress route is now aligned with its siblings.

resolveDerivedDecompress (the read-only #1333 fallback serving parent blocks to derived/child sessions) was the only decompress route without the size gates its siblings carry. The PR extracts the shared spill leg (autoSpillReceipt + INLINE_RESTORE_CHAR_CAP) and wires the derived-parent path through toFilePointer + autoSpillReceipt.

Correctness — traced all three inline restore paths against the refactor:

  • Whole-block & range (pure refactor): behavior-identical. Filenames byte-identical (acp-decompress-<tag>-<uuid>.txt); control flow equivalent (≤10000 → inline, >10000 → spill, write-fail → exportFailureReceipt, toFile checked first). The two body.length > 10000 sites are now consolidated into autoSpillReceipt; no stray sites remain.
  • Derived-parent (the fix): explicit toFile now honored (was silently ignored); body >10000 spills to a tracked 0600 temp file (was unbounded inline); ≤10000 stays inline (unchanged). Receipt format matches the siblings exactly.
  • Read-only ancestor invariant holds: neither toFilePointer nor autoSpillReceipt touches ancestor session state (no restoredInline flag, no cache write, no markDirty) — they only write delivery files, the same as the sibling paths.

Tests — tests/issue5013-decompress-derived-gate.test.ts has teeth: over-cap → pointer receipt with the raw body absent from the wire text and the full body in the spill file; full: true serves the full view; explicit toFile honored on the derived path; under-cap stays inline (no written to: pointer); and the ancestor's block is never flagged restoredInline. Both gate directions + the invariant are pinned.

Regression (existing behaviors the diff touches): whole-block restore → preserved; range restore → preserved; derived-parent restore → intentional change (disclosed old→new in the PR body); read-only ancestor invariant → preserved (test-pinned). No fail-fast→swallow, no threshold/timing/output-format drift beyond the disclosed derived-path change, no cache/retry impact.

Conventions: no kernel/ change, no config-surface change, no new env var, no as any/@ts-ignore; the 10000 magic number is now a named constant (improvement); comments carry issue refs per house style.

CI green on head 0e4906e0b (all test shards + static-gates success via mirror cache).


八问

  1. 是什么问题:派生父会话的 decompress 回退路径(resolveDerivedDecompress)是三条恢复路径里唯一没有大小闸门的一条——显式 toFile 被静默忽略、超大父块(>10000 字符)无界地骑线进接近满的子窗口。
  2. 什么原因导致的:该路径在 #1333 实现时只做了"读父块 + 内联返回",没有像整块/区间路径那样接 toFilePointer 与自动溢出闸门;是覆盖缺口,不是机制错误。
  3. 影响范围与严重程度:仅影响派生/子会话(pi RLM child)对父块做 decompress 的场景;超大父块会无界内联进子窗口,是 #5029/#4992 审计指出的"decompress 上下文爆炸"症状族之一。属特定条件问题(派生会话 + 超大父块),非全量不可用。
  4. 怎么修复的:抽出共享溢出腿 autoSpillReceipt(三条路径共用,文件名逐字节一致),把派生路径接进 toFilePointer + autoSpillReceipt,与兄弟路径对齐;整块/区间路径为纯重构、行为不变。
  5. 是否有回归问题:无。整块/区间恢复行为逐项核对保持(文件名、控制流、失败回执均一致);派生路径为有意变更且已在 PR 披露旧值→新值;只读祖先不变量保持(测试钉死 restoredInline 永不置位);无 fail-fast 变吞错、无阈值/时序/输出格式漂移、无缓存/重试影响。
  6. 是否破坏缓存:否。派生路径仍不写祖先缓存、不 markDirty;溢出文件走既有 reaper 有界保留,不引入新的缓存失效。
  7. 是否改了设计方向:否。只是把一条路径补齐到既有设计(三条恢复路径统一闸门),未改架构/边界/数据流。
  8. 是否引入了新的配置:否。10000 字符上限由内联魔法数提为具名常量 INLINE_RESTORE_CHAR_CAP,非新配置;窗口相对阈值语义仍待 owner 决策(本 PR 只关无决策依赖的缺口,PR 正文已注明)。

判定:可合(APPROVE)。 单模块、纯 fix、回归测试到位、rebase 后 CI 绿、不触 kernel/配置/线协议。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Review lane done: PR #5038 (fixes #5013) reviewed end-to-end at head 0e4906e0b — APPROVE.

What I verified:

  • Premise confirmed: resolveDerivedDecompress was the only decompress route without the size gates — only whole-block (src/decompress-shared.ts:251) and range (:453) carried the >10000 check; derived-parent (:573) had none. All other 10000 usages in the repo are unrelated (retry intervals, bucketing).
  • Refactor behavior-identical for whole-block/range: byte-identical spill filenames (acp-decompress-<tag>-<uuid>.txt), equivalent control flow (≤10000 inline / >10000 spill / write-fail → exportFailureReceipt / toFile first); all >10000 sites consolidated into autoSpillReceipt + INLINE_RESTORE_CHAR_CAP.
  • The fix: derived path now honors toFile (was silently ignored), spills >10000 to a tracked 0600 temp file (was unbounded inline), inlines ≤10000 (unchanged). Read-only ancestor invariant holds — neither helper touches ancestor session state (no restoredInline / cache write / markDirty).
  • Tests have teeth: tests/issue5013-decompress-derived-gate.test.ts pins both gate directions (over-cap → pointer receipt with raw body off the wire + full body in the file; under-cap → inline) plus the restoredInline-never-flagged invariant, with real file-content and wire-text assertions.
  • No kernel/ change, no config change, no new env var; CI green on head (all test shards + static-gates via mirror cache).

No small findings to fix (clean). Verdict posted as a comment review on the PR (GitHub forbids self-approval from the PR's own account) — ready for human merge. One-line report posted to #4599.


八问

  1. 是什么问题:派生父会话的 decompress 回退路径(resolveDerivedDecompress)是三条恢复路径里唯一没有大小闸门的一条——显式 toFile 被静默忽略、超大父块(>10000 字符)无界骑线进接近满的子窗口。
  2. 什么原因导致的:[pi plugin] Prime RLM inline 派生子会话在代理模式下零继承:搜不到也解压不了父会话压缩块(billion-context-pi#531 同场景) #1333 实现时只做了"读父块 + 内联返回",没接 toFilePointer 与自动溢出闸门;是覆盖缺口,不是机制错误。
  3. 影响范围与严重程度:仅派生/子会话(pi RLM child)对父块 decompress 的场景;超大父块无界内联进子窗口,属 [Windows/DSH] Summary of Core Freeze and Hang Causes: Pipeline Backpressure Deadlock, Silent Failure on Digest Size Limi | [Windows/DSH] 核心卡死与挂起原因汇总:管道背压死锁、摘要超限静默失败、ACP伪造死循环及排查建议 #5029/Multiple large conversations frozen | 多个大对话卡死 #4992 审计的"decompress 上下文爆炸"症状族。特定条件问题,非全量不可用。
  4. 怎么修复的:抽出共享溢出腿 autoSpillReceipt(三路径共用,文件名逐字节一致),派生路径接进 toFilePointer + autoSpillReceipt;整块/区间为纯重构、行为不变。
  5. 是否有回归问题:无。整块/区间逐项核对保持(文件名/控制流/失败回执一致);派生路径为有意变更且已在 PR 披露旧值→新值;只读祖先不变量保持(测试钉死 restoredInline 永不置位);无 fail-fast 变吞错、无阈值/时序/输出格式漂移、无缓存/重试影响。
  6. 是否破坏缓存:否。派生路径仍不写祖先缓存、不 markDirty;溢出文件走既有 reaper 有界保留,不引入新缓存失效。
  7. 是否改了设计方向:否。只把一条路径补齐到既有设计(三条恢复路径统一闸门),未改架构/边界/数据流。
  8. 是否引入了新的配置:否。10000 上限由内联魔法数提为具名常量 INLINE_RESTORE_CHAR_CAP,非新配置;窗口相对阈值语义仍待 owner 决策(本 PR 只关无决策依赖的缺口,PR 正文已注明)。

判定:可合(APPROVE)。 单模块、纯 fix、回归测试到位、rebase 后 CI 绿、不触 kernel/配置/线协议。

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant