Repository navigation
[PR] fix: stop naming sub-gate residue as foldable work in compress receipts (#5872) - #5888
ranxianglei wants to merge 3 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9449-pr.5888.c874b80This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5888.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
(ai: vllm-qwen/qwen3.8-27b) Release-cut note (from issue #5872 reporter, verified against npm today): |
(ai: vllm-qwen/qwen3.8-27b) 审核结论:可合并(已推 1 个标注修复 commit,CI 新 head 运行中)1. 是什么问题:压缩成功后,若所有未覆盖残留片段都低于 5000 字符折叠门槛,回执仍把它们的 ref 编号、"context is not at its minimum" 断言和 acp_status 指针一起端给模型——等于在模型刚成功的时刻递上一张它必然做不完的工单(kernel 对每个被点名的 range 都会拒)。现场后果:187 次单消息 compress 重试、83% 打在模型自己的待回复笔记上、breaker 触发 13 次被无视。第二处:too-small 拒绝回执只报两个数字不报缺口,模型读不出算术,逐 ref 往前滑。 2. 什么原因导致的:回执措辞层与 kernel 的折叠资格判定不同源——kernel 门槛(kernel/src/compress.ts:531-550)对一次调用的全部 range 求和 raw 3. 影响范围与严重程度:所有车道上「成功压缩 + 残留全低于门槛」的会话(p2):功能不坏,但直接驱动重试风暴与 token 浪费;无该形态的会话零影响。 4. 怎么修复的:给审计 run 加 5. 是否有回归问题:逐项过——①有可折叠 run 的路径:P2 钉死字节稳定(m00154–m00252 具名 span + claim + pointer 全保留);②drained/sub-floor:N1/N2 逐字串不变;③breaker armed:gapNote 让位(P3 r3 断言 "short of the" 消失);④noViableAnywhere/beyond/clamp/repeatGuard 等既有 hint 拼接顺序未动,gapNote 仅追加在末尾且仅 disarm+too-small+无终局判定三条件同时满足时出现;⑤无 kernel 改动、无 wire 改动、无 config/env 面新增;⑥ 6. 是否破坏缓存:不涉及——回执是 tool result 里的模型可见文本,不进前缀缓存字节,不影响重试/增量游标/去重键。 7. 是否改了设计方向:不涉及。纯回执措辞层修复;audit/offer/floor/breaker 机制原样。 8. 是否引入新配置:无。 审核中直接推上的修复 commit(eed71d3a40,独立标注,已在分支上)新措辞有两处相对 kernel 门槛真实语义过度承诺:
TECHNICAL-NOTES.md 同步到同等精度。行为变更披露:all-sub-gate success-tail 句 old→new 即上述两处,其余路径逐字节不变;P1 测试 pin(marker + stop phrase + 三个 absence)无需改动仍成立。本地 16/16(issue5872+issue4331)+ typecheck clean。 跨 PR 发现(属 #5311,未在此修)#5311 通过 状态(写稿时 live 核验)
判定:可合并——待新 head CI 绿确认;红了我定向排查。 |
(ai: vllm-qwen/qwen3.8-27b) 收工状态(本线程工作已全部完成,上方楼层为完整记录):
合并权在你:CI 绿后可合 #5888 。 |
eed71d3 to
0572da5
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决并 force-push 完成(rebase 到当前 master 本次是 CI 冲突修复车道(1/3),只做了 rebase + 解冲突 + 验证,没有改任何 PR 逻辑。 八问
后续:我继续持有这个 PR 的红项处理权。当前 5 个 test-matrix shard 仍在跑(runner 池排队拥塞,非失败);若其中任何一个转红,我会先查 #4599(CI 总控)判断是否继承性红,再按纪律处置。目前 0 failed,无需介入。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI 已全部跑完、全绿(接上一条八问的状态更新):新 head GitHub live 核验: 结论:本车道的两项交付——①合并冲突(rebase 到 master |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 本轮为验证性空跑——live 三源复核后确认无冲突、无需任何改动,未做 rebase/push。 本轮收到"merge state: dirty、需 rebase"的转发,但按状态新鲜度纪律先核 live,结果与前提不符:
八问(本轮)
结论:PR #5888 当前 head |
|
该PR已按根因归类纳入 [session-resolve] 根因汇总 #6298,由汇总单统一跟踪处理;本单不再单独跟进,故关闭。如认为归类有误或问题仍未解决,请直接回复,会重新打开。 |
|
状态更正(自动化脚本误操作): 本单此前被「纳入根因聚合」流程误关闭, 现重新打开。机器人工作已停, 本单由根因聚合线程统一跟踪, 根因修复落地后请手动关闭或在本单回复「close」。 |
|
重新打开:此前被归类聚合脚本误关。按 owner 口径,纳入根因聚合的 issue 只停机器人、不关闭,由根因聚合线程统一跟踪,根因修复落地后统一关闭。 |
|
(更正)此前按"清理"口径误关闭;按 owner 口径纠正:被根因聚合纳入的 issue 只停机器人、不关闭。本 issue 重新打开,机器人工作已停。 |
(ai: vllm-qwen/qwen3.8-27b) 状态确认(live 三源核验:GitHub API + 镜像 CI 缓存 + 本线程楼层)——本轮无新工作,不推任何改动。
结论:PR 本身已处于「CI 绿、可合」状态(11-10 全绿记录见 floor 17/20),当前仅在 behind 状态等聚合线程 #6298 的根因修复落地后统一处置。无需 owner 决策,无待办。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收到,确认按 owner 口径(2026-11-12)执行:
后续根因修复落地后,由根因聚合线程统一关闭本单即可;在此之前我不做任何改动。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 已确认(与上一条一致,不重复展开):本单我保持不关闭;机器人工作已停,我 stand down,不做 rebase / 红项处理;根因修复落地后由聚合线程统一关闭。无新增待办——后续除非被明确重新触发,我不动本单。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 确认(本条为收尾,不再重复):本单已重新打开,按 owner 口径(2026-11-12)——纳入根因聚合的 issue 只停机器人、不关闭。我(CI 工程师)已 stand down:不关闭本单、不 rebase PR、不做红项处理;根因修复落地后由聚合线程统一关闭。此后除非有新的明确指令,我不再对本单重复回帖。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #5888 最终状态快照(本轮 live 三源核验):
风险 / 剩余:无阻塞项。唯一的"落后"是 master 前进所致;既已停机器人,留待聚合线程统一处理,不影响本 PR 正确性(CI 绿、无冲突)。 同一条 owner 更正已被 upstream-sync 重复投递多次,本条为完整状态收尾。此后对相同的重复投递我不再逐条回帖,除非出现新的明确指令。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 进度汇报 + 一个需要 ops 处理的阻塞: PR #5888 状态(本轮 live 核验):open、无冲突( 处置不变:本单已重开、机器人工作已停;我不关闭、不 rebase、不处理红项,根因修复落地后由聚合线程统一关闭。owner 的更正(被聚合脚本误关 → 重开、只停机器人不关单)我已多次确认。 问题:同一条 owner 更正被 upstream-sync 反复重复投递(现在一次带 3 份),我已逐条回帖 5 次。我这边没有工具能停掉同步层的重复投递,结果是我的进程因长时间无新输出被强制重启(32 分钟)。请求 owner/ops 对这条 owner 评论做去重(同一 upstream-sync 内容只投递一次),避免重复唤醒 CI 工程师。 在同步层去重之前,我对相同的重复内容不会再逐条回帖;若出现新的明确指令或新信息,我立即处理。 |
…ts (#5872) After a successful fold whose offer is exhausted, postCompressTail named sub-gate runs (below compress.minCompressRange by construction) with copyable refs, claimed 'the context is not at its minimum', and pointed at acp_status — a work order the kernel refuses on every attempt. Field data: 187 single-message compress retries after such receipts, 18/19 failure streaks starting within seconds of one. Two host-side fixes, both receipt-wording only (no kernel, no config, no wire change): 1. postCompressTail: each audit run now carries chars (Σ msg.text.length, mirroring the kernel gate sum exactly). When EVERY reported run sits below minCompressRange the receipt keeps the honest mass report but drops the refs, the minimum claim, and the inspection pointer, ending on the contract stop phrase. Any foldable run present -> legacy wording byte-stable (#4331's honesty pin stands); below-floor / drained sessions unchanged (#1387/pi#521 verbatim string). 2. Too-small refusal: while the circuit breaker is unarmed and no conclusive noViableAnywhere verdict applies, the receipt now states the gap ('You picked N char(s) — K short of the M-char gate') plus widen-the-range advice for single-span picks. Once armed, the hard-stop paragraph owns the receipt (#2360 §2, one instruction per receipt). Tests: tests/issue5872-subgate-receipt.test.ts (positive gates P1/P1b/P2/P3 + negative gates N1/N2); tests/issue4331-uncovered-history.test.ts gains the new required chars field on its formatter fixture.
…rces (#5872) Review follow-up to the sub-gate success-tail wording: two clauses over-promised relative to the kernel's actual gate semantics. - "so there is no range you can fold right now" — the minCompressRange gate sums chars across ALL ranges of one call (kernel/src/compress.ts), so a multi-range batch of sub-gate runs can clear it. Say what is true: no single run can be folded right now. - "these runs become foldable on their own as more history accumulates" — false for interior holes between covered blocks, which never grow and never fold (the permanent-hole class of #4331 / #847). Drop the clause; the contract stop phrase carries the instruction. TECHNICAL-NOTES.md synced to the same precision. P1 test pins (marker + stop phrase + absences) hold unchanged.
Conflict-resolution follow-up for the rebase onto current master. Master moved the root TECHNICAL-NOTES.md to docs/technical-notes.md (redirect stub left behind), so the two #5872 wording lines this PR added to the old root file have no home there anymore. Port them verbatim (final precision from the review-fix commit) into docs/technical-notes.md; the root stub stays untouched. No behavior change — documentation only.
0572da5 to
041c305
Compare
Closes #5872
What
After a successful fold whose whole offer got exhausted,
postCompressTailtold the model: "Uncovered history remains — … m00XXX–m00YYY … The context is not at its minimum … inspect with acp_status(scope:"uncompressed")" — even when every listed run sat belowcompress.minCompressRangeby construction, i.e. the kernel would refuse every one of those ranges on submission. Field data from the issue: 187 single-message compress retries after such receipts (83% targeting the model's own pending-reply notes), 18/19 failure streaks starting within seconds of a footer-carrying success, breaker advisories fired 13x and ignored.How (two host-side fixes, receipt wording only)
1. Success tail (
src/stream.tspostCompressTail +src/uncovered.ts). Each audit run now carrieschars= Σmsg.text.lengthover its kept entries — the exact quantity the kernel's too-small gate sums againstminCompressRange. When EVERY reported run is below the gate, the receipt keeps the honest mass report but drops the refs, the "not at its minimum" claim, and the acp_status pointer, ending on the contract stop phrase:Any foldable run present → legacy wording byte-for-byte (#4331's honesty pin stands). Below-floor / drained sessions → verbatim #1387/pi#521 string, byte-stable.
2. Too-small refusal (failure path). While the circuit breaker is unarmed and no conclusive
noViableAnywhereverdict applies, the receipt now surfaces the gap the kernel states but never computes: "You picked 2735 char(s) — 2265 short of the 5000-char gate; a single message almost never clears it, widen the range to cover more messages." Once armed, the hard-stop paragraph owns the receipt (#2360 §2 — one instruction per receipt).Behavior changes (disclosed)
No kernel change, no config/env surface added, no wire change (receipts are model-visible text only).
Coexistence
Open PR #5311 (from #5186) adds a
[not foldable]prefix to described runs viadescribeUncoveredRuns; this change keeps that signature untouched (additivecharsfield only) and the two merge cleanly in either order.Tests
New
tests/issue5872-subgate-receipt.test.ts: P1 all-sub-gate wording (no refs/claim/pointer in tail), P1b auditcharsmirrors Σ msg.text.length exactly, P2 super-gate hole keeps legacy wording byte-stable, N1/N2 drained + sub-floor keep the verbatim contract string, P3 too-small gap note appears while unarmed and yields to the breaker paragraph at failure 3.tests/issue4331-uncovered-history.test.tsgains the new requiredcharsfield on its formatter fixture (compile fix). Targeted local runs green: both files 16/16 + collateral sweep (fix-1124-compress-receipt, issue2146-compress-loop-breaker, issue2360-compress-receipt, issue2432-breaker-awareness, issue4812-armed-breaker-short-receipt, issue5220-failed-compress-receipt, loop-compress) 51/51; typecheck clean. Full suite: CI.