You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause confirmed as analyzed: the host-side #453emergencyNudge override (≥70% usage) treated "compressibleRanges list non-empty" as "worth advertising", while decideNudge deliberately keeps the raw recommendedRanges list on the record even while suppressing injection (all leftovers below minCompressRange / benefit floor). The fix gates the override on submit-gate feasibility — at least one offered range must actually pass (chars ?? tokens*4) >= minCompressRange, the same #847 expression postCompressTail / handleAcpStatus / pendingByTier already apply — so the injected nudge can no longer advertise ranges compress atomically rejects.
No kernel changes; the kernel's raw-list-for-diagnostics behavior and its exclusion logic (verified correct — the block-b5/PROTECTED listing was time-skew, not a bug) are untouched.
Activity
carton-2026 commentedon Oct 4, 2026
bili-issue-2104-supplement.md
ranxianglei commentedon Oct 4, 2026
[bot] 🏷 收到,报告非常完整(含补充件)。已确认现象:nudge 列出的 3 个区间里,
m00057–m00069与已生成的 block b5 重叠、m00071–m00072/m00074–m00075处于 PROTECTED 近期区,而同一会话的acp_status/compress判定为「无可压区间」——三个来源口径不一致。正在按「审核先于实现」流程查证:定位 nudge 区间列表的生成点与
compress/acp_status可行性判断的差异,用最小复现钉住根因后再动手。有结论会第一时间回帖(结构化七问)。ranxianglei commentedon Oct 4, 2026
已完成审核与修复,PR: #2112 (
fix: gate emergency nudge override on submit-gate feasibility,Closes #2104)。按结构化七问汇报:1. 是什么问题
高使用率下(≥70%)注入的 nudge 列出「可压缩范围」,但其中全部/部分范围被
compress与acp_status拒绝("No compressible ranges remain"),且受保护段(compress 调用对)也出现在该列表下;模型据此反复发起小压缩——9 步内 4 次、烧掉 52,845 tokens,每次压缩击穿 KV cache 重新 prefill(15–21K),上下文不降反升,最终 finish_reason=length 截断。2. 什么原因导致的(两层)
emergencyNudge(plugin mode: no hard backstop when the agent ignores the compress nudge — context grows past the window and upstream 400s #453 的 70% 兜底)用「列表非空」判断「有值得提供的内容」。但内核有两类刻意抑制——「max compressible < threshold 50000」「低于收益地板」——抑制时compressibleRanges列表仍非空(只是内容低于 minCompressRange 最小粒度)。bili 的判空守卫因此把「无有效可压缩内容」误判为「有货」,覆盖了内核的抑制,注入了广告次阈值残局的 nudge。残局 < minCompressRange(默认 5000 字符)时,compress会拒绝、acp_status报无范围——正是你看到的自相矛盾。已用真实 acp-kernel 0.0.101 复现确认:该场景下 shouldInject=false 且 raw 列表非空、旧逻辑 override 触发。3. 怎么修复的
给
emergencyNudge增加第三参minCompressRange(默认 0 = 旧语义),override 仅在**至少一个范围能通过提交门(chars ≥ minCompressRange)**时放行——与postCompressTail/handleAcpStatus既有的 #847 过滤完全同式:「绝不广告内核会拒绝的范围」。四个协议注入位统一传入loopConfig.compress.minCompressRange。修的是决策点的判定,不是过滤载荷。4. 是否有回归问题
逐项审过:正常节奏路径(shouldInject=true)未触碰;postCompressTail/acp_status/preflight 的过滤未触碰;内核渲染未触碰;≥70% 且存在可执行残局时的 override(#453 设计意图)原样保留(有正向对照测试钉住);不传新参的直接调用方保持旧语义(默认 0)。本地定向测试 20/20 绿(含 2 个走真实代理的集成测试)+ typecheck 干净;全局回归由 CI 把关。
5. 是否破坏缓存
不破坏,反而受益:wire 形状零变化,只是减少了假 nudge 注入 → 少做无谓小压缩 → prefix cache / KV 复用严格变好。
6. 是否改了设计方向
没有。growth-driven 节奏(flat 50K)不变,#453 兜底对可执行内容的设计意图不变。以下三项有意不改,留给你拍板:① 0.7 使用率门槛本身——98K 窗口下每几步折 4–9K、使用率很快回到 ≥70%,会持续振荡;想更懒可用既有逃生阀
compress.nudgeGrowthTokens调大(无需新配置);② pi-side 回执措辞 "use these refs exactly as listed" 是跨 host verbatim 契约,改动需与 pi 侧协同;③ 内核把保护段渲染进 compressible 标题下,属 acp-kernel 面,建议另行立项,不在本 PR 扩scope。7. 是否引入新配置
没有。无新增 env/config/CLI 字段。
行为变更披露(old→new):当使用率 ≥70% 且内核处于节奏静默、且剩余可压缩内容全部低于 minCompressRange(默认 5000 字符)时:旧行为 = 注入 nudge(列出不可执行的范围);新行为 = 保持静默。其余所有场景行为不变。
结论:修复完成,PR #2112 待 CI 通过后请你合并。你当前运行的 0.1.182 会在下次自动更新后生效。
ranxianglei commentedon Oct 4, 2026
补充:PR #2112 的 CI 已全部通过——test(ubuntu/windows × node 22/24)、release、build-artifact、codex overlay e2e 均 success(version-guard 按非 release 分支规则跳过)。可以合并了:#2112
ranxianglei commentedon Oct 7, 2026
修复 PR:#2365
Root cause confirmed as analyzed: the host-side #453
emergencyNudgeoverride (≥70% usage) treated "compressibleRanges list non-empty" as "worth advertising", whiledecideNudgedeliberately keeps the rawrecommendedRangeslist on the record even while suppressing injection (all leftovers belowminCompressRange/ benefit floor). The fix gates the override on submit-gate feasibility — at least one offered range must actually pass(chars ?? tokens*4) >= minCompressRange, the same #847 expressionpostCompressTail/handleAcpStatus/pendingByTieralready apply — so the injected nudge can no longer advertise ranges compress atomically rejects.No kernel changes; the kernel's raw-list-for-diagnostics behavior and its exclusion logic (verified correct — the block-b5/PROTECTED listing was time-skew, not a bug) are untouched.
ranxianglei commentedon Oct 7, 2026
收到,以 #2365 为准。已核对:PR diff 与确认的根因修复完全一致——
emergencyNudge增加minCompressRange门(src/server/budget.ts,默认 0 保留旧语义;override 仅在至少一个范围通过(chars ?? tokens*4) >= minCompressRange提交门时放行,#847 同式)、四个协议注入位统一传参(src/server.ts)、回归测试落在tests/issue453-backstop.test.ts;内核零改动,与你的结论一致。CI 已全绿:27/27 check-runs success(含 kernel-guard、version-guard、全 e2e lane、test ubuntu/windows × node 22/24)。可以合并:#2365
(备注:我此前在
2026-10-04_fix-nudge-stale-ranges上的原始提交已被 #2365 rebase 到当前 master 取代,远程旧分支不存在了,无遗留冲突。)fix: gate emergency nudge override on submit-gate feasibility (ranxia…