Skip to content

T2 distillation repeatedly fails turn integrity, including singleton blocks #5283

Open

Description

@TimBriseby

Problem

With pi and billion-context 0.1.209 (e3a3cbd), T2 distillation repeatedly rejects every tested range with turn-integrity errors, including a single existing T1 block. No compression is applied, while automatic emergency nudges repeatedly recommend the same failing operation. Ordinary fresh raw-message folding still works when it does not overlap a T1 block.

Reproduction observed

  • Session contains 67 active T1 blocks (~30K summary tokens), plus substantial raw tool history.
  • Nudge recommends compress({content: "b1–b137 ..."}).
  • Broad block distillation fails. Smaller b86–b91, singleton b85 and singleton b2 also fail. Header-string and JSON-encoded startId/endId forms give the same result.
  • Representative error: Merging b2 cannot satisfy turn integrity without unfolding already-folded message(s) owned by those blocks (...) — doing so would drop their existing coverage. Align the range to whole turns (do not cut through a reasoning/tool-call/result group) or merge fewer blocks.
  • Status still lists the blocks as active distillation targets. Its raw-range advice changes, but those successful raw folds do not resolve T2 eligibility.
  • Circuit breaker says stop retrying; subsequent emergency nudges again demand T2 distillation.

Expected

A supported way to replace an existing block's summary without losing its original coverage, or actionable eligibility advice that can succeed. At minimum, do not repeatedly recommend unavailable T2 ranges after deterministic turn-integrity rejection. No private conversation or project details are included here.

Activity

  1. TimBriseby commented on Oct 31, 2026

    @TimBriseby
    ContributorAuthor

    Recovery update: a chronological boundary range b123–b137 successfully distilled all 68 active blocks (including b138, whose source was chronologically earlier). b1–b138 was NOT the full chronological interval: IDs were creation-order rather than current source order. acp_status now confirms one T2 block, ~2.3K summary tokens, and an idle nudge. The remaining defect appears to be misleading numeric-range guidance plus insufficient diagnostics for locating the true earliest/latest anchors, rather than an unconditional T2 failure. No integrity guard was bypassed.

  2. ranxianglei commented on Oct 31, 2026

    @ranxianglei
    Owner

    🤖 Powered by ework · qwen3.8-27b

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

    查重: 不重复。相关条目:#5294(另一 agent 会话从本 issue 派生的决策请求,同一问题家族,已互链)。

    标签: bug pi scope/kernel p1 — 受影响的会话里分层蒸馏能力整体停摆、上下文只增不减(p1 第②类:失控增长)。

    已验证:最小复现成立(仅用内核公开 API)

    用 createCore/applyCompression 构造最小场景(推理+工具调用回合在结果尚未上链时折叠成块,结果随后才到达),得到与你完全一致的报错文本。机制链分四层:

    1. 陈旧块的产生(数据侧,属正常 churn):工具调用在结果未到链上时被折进块(pi 异步/subagent 工具结果迟到是典型来源;跨模型改写重编码是另一来源)。块覆盖从此与当前消息数组的回合结构不一致(调用已折、结果可见)。你观察到"不重叠 T1 块的新原始折叠仍成功"与此吻合——新折叠创建时整组齐全,不会带病。
    2. 合并门禁的全局耦合(缺陷本体):projectUnit 合并分支对全局折叠集(本块覆盖 ∪ 所有其他活跃块覆盖)做回合完整性扫描(kernel/src/unit-projection.ts:365)。只要任何一个活跃块带陈旧分裂,任何消费任意块的合并都会要求展开那些"已被消费块拥有的 id"——而纯块范围没有可展开的直接 id → 确定性致命错误,永远失败。一个陈旧块毒化全部 67 个合并,不是 67 个独立故障。我的复现里,只覆盖两条纯文本消息(全程无工具/无推理)的无辜块 b2,单块合并也报同样错误、且报错点名 b2 自己。
    3. 误导性诊断(缺陷):报错里的 (r1, c1) 样例列的是被合并块自己的覆盖(unit-projection.ts:419,sample = consumedCoverage.slice(0,5)),不是真正违约的 ref;建议语"Align the range to whole turns"在此场景不可执行——违约组在范围之外,任何对齐都修不了它。
    4. Nudge 死循环(缺陷):pendingByTier(kernel/src/compress.ts:1754)对全部活跃 T1 块求和(~你的 30K),不做可行性筛查,紧急 T2 需求持续存在;压缩断路器触发后经过静默窗口衰减解除,需求再次出现——正对应你看到的"breaker 说停,后续紧急 nudge 又要求 T2"。

    方案评估与建议

    #5294 的 A/B/C 选项修的是建议层(创建顺序 vs 源序跨度的分叉、建议前预筛),保留严格门禁。但我的复现表明这不够:即使建议选得完美,无辜单块也会被拒(b2 案例),所以 A/B/C 单独无法交付你期望的"在不丢失原覆盖的前提下替换已有块摘要"。

    我建议 D = A + 门禁放宽(存量违约豁免):合并门禁只对本次合并新引入的违约要求展开——与合并前的全局扫描结果对比,存量违约(线上本来就在发送的状态,纯块跨度对它字节级保持不变,可证:carve 只触碰直接 id,消费覆盖原样透传,折叠集成员不变)放行;新违约仍诚实拒绝,保留 #4484 的保护(永不展开消费块拥有的 id);同时把报错改成点名真正未解决的 ref。

    行为变更披露(D 若采纳):今天硬失败的合并将成功,并逐字保持既有分裂状态(kernel 测试 issue4484 用例 3 从"必须失败"翻转为"成功且保持既有分裂")。

    状态:内核改动按边界规则需你拍板(A/B/C/D),实现等决策。证据与 D 的建议已同步评论到 #5294。

  3. ranxianglei commented on Oct 31, 2026

    @ranxianglei
    Owner

    🤖 Powered by ework · qwen3.8-27b

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

    补一行分账信息:主题类别 B(折叠预算与资格判定)——缺陷核心在合并资格判定(回合完整性门禁的全局耦合)+ 陈旧覆盖的产生路径;若按"压缩引擎行为"口径也可归 C,以讨论帖定义为准。最小复现脚本已留在本会话工作区(.tmp/repro5290.mts,仅用内核公开 API),owner 拍板后可直接转成 kernel/tests/issue5290-* 回归钉。

  4. applifaction commented on Nov 2, 2026

    @applifaction
    Contributor

    Still reproduces on billion-context 0.1.211 (e226544), Pi: 80 active T1 blocks (~19K summary tokens; 103% surface). Attempted broad b30–b327 after ending the preceding assistant turn and folding available raw ranges; rejected before folding: "cannot satisfy turn integrity without unfolding already-folded message(s) owned by those blocks (h_c1411834cd288b47, h_67749e1e0ba29f77, h_9afd31041063ac02, h_106efbeaf94d2fe4, h_ccdda38cb1902814_2)". Smaller recent range b319–b325 also failed in the same session; new raw ranges still fold. Repeated emergency nudges recommend b30–b327 after rejection. The prior workaround of chronological boundaries is not discoverable from the public acp_status overview (blocks sorted by size, no source range listing), so diagnostics/eligibility remain blocked. No private project/session contents included.

  5. ranxianglei commented on Nov 2, 2026

    @ranxianglei
    Owner

    🤖 Powered by ework · qwen3.8-27b

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

    谢谢补充——0.1.211 的数据点很有用。已对照当前 master(0.1.211 之后)重新验证:

    1. 当前 master 上仍然复现。 用最小复现(仅内核公开 API,场景:工具结果在其调用已被折进块之后才到达)在今天 master 头上重跑:报错文本与行为完全一致——此后所有块合并失败,包括对无关块的单块合并。也就是说你构建之后合入的任何变更都没有改变这个结果,单纯升级救不回你这个会话的状态。
    2. 版本注记:master 在你的 0.1.211 构建之后合入了 Context compression leak — rose to 350k | 上下文压缩泄露 涨到 35w #5531——同一完整性机制的姊妹缺陷(反向分裂:调用+结果在块内、推理可见 → 被永久撤出可压缩集)。它修的是那个变体的撤回/建议路径,不是本 issue 被拒背后的合并门禁耦合;含 Context compression leak — rose to 350k | 上下文压缩泄露 涨到 35w #5531 的 master 上我的复现依然失败。
    3. 你对 acp_status 的观察经代码确认:压缩块列表默认按大小排序,每行只给 id/层级/token/消息数/age/generation/主题(kernel/src/report.ts 的 renderCompressedDrilldown),没有每块的源范围或时间位置;连按块 recap 里的 "range" 字段也只是消息条数。所以"按时间边界选范围"这个绕行确实无法从公开面发现,而试探式选范围每次失败还会喂断路器预算。这个诊断缺口正是决策请求 [PR] fix(storage): a live second writer no longer blocks startup — sharing a local-disk index.db is a supported topology (rev | fix(storage): 活着的第二写者不再阻止启动——共享一个本地盘 index.db 是受支持拓扑(撤回 #5213 的拒绝策略) #5294 选项 A③ 的内容。

    状态不变:修复集等 owner 在 #5294 拍板(A/B/C/D;D = 建议层修正 + 合并门禁对存量违约豁免 + 报错点名实际违约 ref + acp_status 暴露块源位置)。你的确认已记录到 #5294。

  6. ranxianglei commented on Nov 5, 2026

    @ranxianglei
    Owner

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

    新实例(dsh 车道,v0.1.212)—— #5746「折叠卡住」,按同症状一单原则并入本 issue。

    owner 在该线程的原话诊断与我们一致:「原因不是大小……坏的是它那道『折叠边界』的检查」——换了几种切法全被门禁挡回。

    新日志证据(会话 e2211607…,dsh,v0.1.209→0.1.212):

    • 38 次块范围合并被同一错误签名拒绝;试了 16 种切法,含最小 2 块(b116–b117、b136–b137)与 3 块(b122–b124、b109–b111)范围——全部致命;
    • 断路器当天 arm 10 次(arm → 10 分钟静默解除 → nudge 再要求 → 再失败),即第 4 层 nudge 死循环的又一现场;
    • T1 原始消息折叠不受影响;对照:11-02 同一会话 b1–b102 一次合并 102 块成功过(省 ~255K tokens)——毒块出现前门禁是过得去的;
    • 请求 b139–b141 实际展开消费 b117–b141+b158(创建序块号 + span 展开)——「哪种切法可行」在客户端侧不可发现;
    • 某批量请求 5 个范围中 4 个通过校验、仅 b139..b141 失败 → 毒块是局部化的而非全局均匀,对 D 的豁免设计有意义(按违约点豁免即可放行干净多数)。

    本 issue 清单项现状:pi 实例(#5283 原始)、dsh 实例(#5746)。仍等 A/B/C/D 拍板。

    实现协调提醒:在途 kernel PR #5700(T1 harvest stall escalation,fixes #5698/#5671)压着 kernel/src/compress.ts;在途 kernel PR #5668(nested compression state integrity,closes #5667)压着 projection 面——将来落地 D 时这两个都是热文件。

  7. ranxianglei commented on Nov 5, 2026

    @ranxianglei
    Owner

    🤖 Powered by ework · qwen3.8-27b

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

    收到 dsh 实例并入信息。核对后三点确认 + 一个编号更正:

    1. 编号更正(防止后续串错线程):该评论里的「#5746」是上游 GitHub 编号 —— 我们的镜像里 #5746 是另一张单(ingest O(history) 存储问题,与本机制无关)。本单自身的 GitHub 编号也是 #5283(镜像号 ≠ GitHub 号)。后续引用请统一写「GitHub #N」。

    2. 关键证据核对:

    3. 实现协调已核实:点名的两个在途 PR 都真实存在 —— #5700(T1 harvest stall,分支 2026-10-09_nudge-tier-slot-rotation,压 compress.ts)与 #5667 相关(分支 2026-11-04_nested-fold-ledger-fix,压 projection 面 + acp_status 展示面);另全量扫描远端分支还有约 20 个在途分支触碰这批热文件(compress/unit-projection/turn-integrity/recommend/boundaries)。无论拍板哪个选项,落地时都要对最新 master rebase 并与这些分支协调顺序。

    清单项现状:pi 实例(原始帖,GitHub #5283)+ dsh 实例(GitHub #5746),两实例机制一致,在本单内以子缺陷清单归并管理。仍等 owner 对 A/B/C/D 拍板(决策请求 #5294);上述新证据已同步到该线程。

  8. ranxianglei commented on Nov 6, 2026

    @ranxianglei
    Owner

    🤖 Powered by ework · qwen3.8-27b

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

    第三个生产实例(hermes 车道)补入本清单: 镜像 #5778(GitHub #5776)。

    • 环境:hermes 会话,bili v0.1.212(commit 84fa9af);保留日志至 2026-11-06 10:22 共 28 次 compress 失败,其中 27 次被 turn-integrity 门禁拒绝;
    • 时间线:10:21:14 注入 T2 distillation nudge,10:21:35 提议批次 b102..b165 失败("cannot preserve existing coverage and turn integrity");09:53–09:56 亦有重复的 T2 nudge + 失败合并;fresh message folds 正常;
    • 版本优先核对:git diff 84fa9af5 origin/master 六个 kernel 文件(compress/nudge-text/unit-projection/boundaries/recommend/report)零差异——本实例与前两实例(v0.1.209 pi / v0.1.211 dsh)及 master 同代码路径,机制结论直接适用;
    • 新增观察点:熔断恢复回执只给 acp_status 的 raw mNNNNN 区间(src/stream.ts:94,261),从不给校验过的块区间——与机制分析中建议面/恢复面缺陷一致。

    注意:决策请求线程 GitHub #5332(镜像 #5294)已于 11-02 关闭且无 owner 决策记录;按「决策不开新 issue」规则,决策请求已在镜像 #5778 重发(选项 A/B/C/D,推荐 D,附八问与行为变更披露)。本实例不改变机制判断与选项对比,只提高紧迫度。

  9. ranxianglei commented on Nov 8, 2026

    @ranxianglei
    Owner

    🤖 Powered by ework · qwen3.8-27b

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

    清单更新——第 4 个生产数据点(pi 车道,2026-11-08,报于镜像 #5778 / GH#5776): 失败批次的恢复回执本身把刚被拒的同一组范围原样再列为"唯一合格选项"。该批次 3 个范围(m01107–m01141 / m01146–m01150 / m01167–m01250)整体被拒:两个死于 merge gate(消费 b68,b69 与 b71-b73),中间那个是纯 raw fold、通过校验但被原子性陪跑;拒绝后状态不变,host 恢复提示重算后逐字再推荐同一列表("use these refs exactly as listed")。循环形状已在 master 代码级钉死:kernel/src/compress.ts:840(批量拒绝回执 "Fix or drop the offending range(s)")与 src/stream.ts:1381→compressionRecovery(:103-138)(重算+再推荐)指令自相矛盾;且 recommend 侧的 projectUnit 预筛(recommend.ts:659-732,#3236)放行了这两个范围 → 筛查与执行之间存在残留判决差,泄漏子机制需会话账本钉死。

    按报告者要求已并入 #5778 决策请求为 facet ④(恢复回执排除刚被拒 span、保留原子性陪跑的合格 span+关闭筛查/执行判决差+offer 陈旧守卫)。选项 A/B/C/D 结构不变,推荐仍为 D,待 owner 拍板。

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions