Repository navigation
[PR] fix: compression merge deadlock — auto-consolidate or explicitly notify when turns are split across multiple blocks (fix | fix: 压缩合并死锁——回合被拆散在多个块里时自动收拢或明确告知(修复 #5919) - #5929
Conversation
…ners or no-op with exact guidance (#5919) v0.1.213 regression (issue #5919, session-ad47cd30): when a turn group is shredded across blocks — reasoning covered by a surviving higher-tier block, call covered by the block being merged, result still visible (or protected / BLOCKED) — the #5789 exclusion ladder had no rung left: * fatal path: the error promised the partners would "age into coverage", which never happens for a covered call's result (INV2: a lone result can never fold) — every retry of the advertised merge re-failed identically. * silent path: the exclusion retry "succeeded" by folding nothing (the span's geometry trims the call whose result sits outside), so the merge no-oped forever with the conflict still live. Fix (unit-projection.ts, merge stuck-branch): 1. Doomed check — if any stranded visible partner can NEVER fold (BLOCKED, recent-zone, protected tool, unrecoverable media), the merge is an idempotent no-op success (every block stays active — the #4484 never-drop-coverage invariant holds) with guidance that says exactly what is protected and that retrying will not help. 2. Rung 2 — when rung 1 (the exclusion ladder) cannot complete the merge (retry fatal, or retry folded nothing) and every stranded partner is foldable, the fold extends itself to those partners (bounded: <=16, fixed-point integrity re-judge must come back clean): the new block's coverage closes the turn, the conflict clears, and the merge proceeds. This is the exact manual unblock the old error text directed, now done automatically. 3. actionableSplitError keeps the "cannot satisfy turn integrity" phrase but names the exact unblock range (plain compress over mNNNNN..mMMMMM, then retry) and drops the false "age into coverage" promise. compress.ts: the filteredIds=0/consumed=0 no-op now propagates the projection's warning (the skip guidance reaches the model) instead of replacing it. Pinned: kernel/tests/issue5919-shredded-merge.test.ts (4 shapes: extend, BLOCKED no-op, protected-tool no-op, in-span control). Two #5789/#4484 pins amended — they pinned the pre-fix dead-end itself (b4..b4 self-range no-op, b2..b2 "impossible merge" refusal); both now pin the recovery, and the breaker-safety property (a retry never errors) is asserted explicitly. Full kernel suite: 1619/1619.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.8597-pr.5929.da7df9fThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5929.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) CI fix run 1/3 — lock-sync repaired. Verified live first: on head 结构化八问
收工判定:本次唤醒报告的失败项(lock-sync)已修复并实测转绿,无遗留红项,无需决策项。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复(镜像 open [PR] 行中仅本 PR 针对 #5919) 独立审核结论(head de1c71c,CI 全绿)方向核验:#5919 的两种死锁形态都被覆盖——报错版(不可执行的"等老化进覆盖"承诺)现在要么自动收拢、要么转成带精确解锁区间的明确空操作;静默版("成功"但一条没折)被 机制重读(kernel/src/unit-projection.ts):合并卡住 else 分支的三步新增——①判死:任何散落可见伙伴永远折不动(BLOCKED/最近保护区/受保护工具/不可恢复媒体)→ 幂等空操作,所有块保持 active,#4484 零覆盖丢失不变量不破;②二级自动收拢:伙伴全部可折且一级未完成时,把本次折叠扩展到散落伙伴(≤16 条,定点完整性重判干净才提交),新块盖住整个回合、冲突清除;③报错保留 "cannot satisfy turn integrity" 短语(宿主依赖),虚假老化承诺换成精确 mX..mY 解锁区间。收拢路径的模拟宇宙(extended∪survivingCoverage)与提交后状态一致,fall-through 与既有 withdrawal 处理衔接正确。compress.ts 仅加一行 既有行为清点:#5789 中性继承保留(警告措辞调整,已披露);#4484 零覆盖丢失 pin 保留;#5789 自区间空操作改为自动收拢(已披露,熔断属性仍显式断言);fresh 压缩/carrier/zone/livelock 守卫路径未动。本地定向:PR 触碰的 3 套件 12/12、相邻 8 套件 52/52;kernel typecheck 干净;CI(head de1c71c)test 全分片 + static-gates 绿。第三个新提交 de1c71c 同步根 package-lock.json 的 kernel 版本 0.0.187→0.0.188——补上前两提交遗留的 lock-sync 缺口(KDD#5 要求),应当带上。
触发条件窄、有绕行(用避开毒块的更窄区间)、无数据丢失、不触发熔断——单独不构成合并阻断,但它在该角落部分回退了 #5789 的继承目标。注意不能简单换序成「总先跑一级」:旗舰恢复场景里一级什么也折不掉(span 全覆盖),只有收拢能救,换序会弄丢主修复。支配性修法:把判死移到一级「是否真折到内容」判定之后——旗舰案例、事故案例、探针案例三者全覆盖。 🔶 需要决策(可随合并一起拍板)
八问
判定:可合(CI 绿、机制正确、测试有牙、行为变更披露完整);唯一待决项是上述顺序角落——推荐选项 A(合入前换序+回归钉),否则默认 B(现状合入、记为已知边界)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1094-master.82e2d53 # this exact build
npm install -g billion-context@master # always the newest merged build
|
…ry (kernel 0.0.188) Upstream delta f1a4af4..82e2d53 (8 files, 4 commits): - 4cb3e06 kernel: close shredded-merge dead-ends — auto-extend to stranded partners or no-op with exact guidance (ranxianglei#5919); src/unit-projection.ts +182 - ae5c9a5 kernel: version 0.0.188 - de1c71c chore: sync root package-lock.json with the kernel bump - 82e2d53 Merge pull request ranxianglei#5929 No file overlap with the lane (comm -12 on the two file lists is empty), so the merge is a pure adoption: eight upstream files, staged count 8, no conflict. kernel moved 0.187 to 0.188 and was rebuilt before measuring. Lane anchors intact: src/server/relay.ts:2097 still calls `pipePluginJson(toClient, res, undefined, prepared.protocol, ...)`, src/storage/mysql.ts:77 still exports MYSQL_SCHEMA_VERSION, symbols unchanged (stripDriftResidue 6, isDraftDump 6, containsRenderTagText 21, mayStartDegenerateRenderTag 6, DRIFT_BARE_MISMATCH 3, DRAFT_CLOSE_TAG is absent, DRAFT_CLOSE_TAIL 3). Gates: tsc 0, unused-exports 0, config-surface 0, lifecycle-ledger 0, test-import-graph 0, gen-config-docs fixed point. Tests: issue5175 58/0, tag-echo 79/0, issue2190-degen-close 32/0, golden-storage-render 5/0, storage-engine-proofs 12/0, native-compact-terminal 1/0, issue4666 2/0; plus the three kernel suites this delta touches: issue5919-shredded-merge 4/0, issue4484-merge-coverage 5/0, issue5789-tier2-merge-ladder 3/0.
kernel-change: 修复 v0.1.213 回归 #5919——一个回合的推理/调用/结果被拆在不同压缩块里时,合并压缩永久死锁(报错建议不可执行、或静默空转)。owner 已在 #5919 讨论中确认修复方向(2026-11-08)。
现象
长会话里一个回合被"撕裂"在多个块中(推理被旧的 tier-2 块覆盖、调用被待合并的块覆盖、结果还可见或受保护)时,合并压缩永远失败:
根因
kernel/src/unit-projection.ts的 #5789 合并恢复阶梯只有一级:把"切穿回合组"的块排除后重试。重试只有两种结局——真折到内容(成功)或报错。而撕裂形状下:actionableSplitError给出的解法("先普通压缩散落的可见伙伴消息")对被块覆盖的调用来说不可执行——它的结果单独压会被完整性门撤掉;修复(都在合并卡住的 else 分支)
compress.ts:空操作路径现在透传投影层的跳过警告(指导语能到达模型)。行为变化(两个既有 pin 被修正)
这两个 pin 锁定的正是 #5919 的死锁行为本身,按 #5919 的修复方向修正。
验证
kernel/tests/issue5919-shredded-merge.test.ts(4 形状:可压伙伴自动收拢 / BLOCKED 空操作 / 受保护工具空操作 / 区间内伙伴不受影响);说明
问题1(968 条不可见消息)是独立问题,已在 #5919 向报告者索要诊断数据,另行处理。