Repository navigation
[PR] fix(#5596): stop refused dsh compaction replays from pinning the output budget at 4096 - #5603
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10889-pr.5603.92d0f88This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5603.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 是 #5596 的唯一在途修复;在途 Review 结论(八问)
测试有效性:门控双向齐全(#3617 纪律:该触发时触发——近墙实测输入仍 clamp;不该触发时不触发——事故形态直通);另有真 e2e(~320KB 信封 → 422 拒收 + 高水位落账 → 次回合 30K 预算原样上行)。断言钉的是精确 wire 值,回归时抓得住。四个旧 pin 文件(issue2490/3384/3071/3148)按新契约重新锚定,重锚理由写入各文件。本地定向验证 34/34 绿 + typecheck 干净。 CI 处置:静态门禁全绿(kernel-guard/config-surface-guard/static-gates 等);6 个红 test 分片 = 继承性 master 红(master d244fff,#4599 已列档:#5556 落 master 未重生成 golden → storage-render 漂移,今日 #5597/#5601 同签名)。我拉了一个红分片日志核实:该分片 4 条失败全部是 结论:代码面 ready;建议 d6db7fc 全矩阵转绿后合并。 |
(ai: vllm-qwen/qwen3.8-27b) 结论:APPROVE —— 修复打在根因上,既有行为逐项审过无意外回归,双向测试 + 真 e2e 钉死,行为变更已披露。CI 全绿(30 check,0 红,mergeable_state=blocked 仅待 review)。 按八问:
测试有效性:新增 diff 整洁度:核心修复(e809888)聚焦 budget.ts/handle.ts/acp-status.ts/session.ts/三个 prepare + 测试;storage-render golden 变更来自继承的 ci-fixes 合并(#5555/#5415 重生成),与本逻辑正交,走 AGENTS.md 认可的继承红收敛路径,非本 PR 噪音;无空行/重排淹没真实逻辑。 判定:可合(APPROVE)。无人工决策项(不碰 kernel/、无 kernel-change 声明、无 config surface 变更)。合并权在 owner。 |
(ai: vllm-qwen/qwen3.8-27b) Review 已完成,结论:建议 APPROVE(可合) —— 完整结构化八问审核见上一条评论,此处只给收口要点,不重复全文。
owner 可直接合并:#5603 |
d6db7fc to
eea49bf
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解,PR 恢复可合状态,新 head CI 全绿。 本次只做了冲突 rebase + 验证,未改任何代码逻辑。 本轮做了什么
八问
判定:冲突已清,CI 全绿(39 success / 15 skipped / 0 failed),mergeable=true,ready 待 owner 审阅合并——#5603 。注:force-push 后原有 review 审批可能失效,需重新 approve。 |
[ework] CI fix verified green ✓ |
eea49bf to
8d60668
Compare
(ai: vllm-qwen/qwen3.8-27b) 第二次冲突已解(上一轮 rebase 后 master 又前进了 ~30 个提交),新 head 本轮做了什么
八问
判定:冲突已清,CI 全绿,mergeable=true,ready 待 owner 审阅合并——#5603 。注:两次 force-push 后原 review 审批大概率失效,需重新 approve;若 master 继续高速前进可能再现同类漂移冲突,届时同法处置即可。 |
[ework] CI fix verified green ✓ |
(ai: vllm-qwen/qwen3.8-27b) 复审结论:APPROVE(可合) —— head 从我上次审过的 d6db7fc 前进到 8d60668(重新 squash 成单 commit 并 rebase 到最新 master 基线 dc041dd),核心修复与测试逐字节未变,只有基线漂移;我另顺手修了一处被本 PR 弄假的过时 changelog 表述(commit 本轮相对上次多审了什么(head 变化的核实):
八问:
测试有效性:新增 diff 整洁度:核心修复聚焦 budget/handle/acp-status/session/三 prepare + 测试;storage-render golden 等变更来自继承的 ci-fixes/master 合并,与本逻辑正交,走 AGENTS.md 认可的继承红收敛路径,非本 PR 噪音;无空行/重排淹没真实逻辑。 已顺手修:CHANGELOG.md 里 #3733 条目末句「…so the #2490 output-clamp regimes keep planning against the raw scale」是被本 PR 弄假的过时表述(现在时态声称拒绝字节仍喂给输出 clamp,现已不成立)→ 改为过去式并补注「该规划消费端已在 #5596 移除,现为诊断水印」。commit CI / 可合性:重排后代码 8d60668 = 30/30 全绿;我的 doc 修复 05ab965 零功能影响(CI 在新 head 重跑中)。 判定:APPROVE(可合)。无人工决策项(不触碰 kernel/)。合并权在 owner:#5603 |
[bot] (ai: vllm-qwen/qwen3.8-27b) 状态汇报(进程曾被强制重启,现已恢复;后续已改用带超时的本地镜像读取,避免网络挂起复发):本 PR 复审已完成,完整八问 review 见上方评论,此处只报最终态,不重复全文。 最终状态:head
|
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
…ut budget The #1729 guard records the byte size of every dsh native-compaction replay it refuses (session.metadata.dshCompactionRefusedBytes, sticky high-water) and the #2490 planning floor converted it into a lower bound for output-budget planning (gated since #3384 by 'request >= 25% of window or view at wall'). But refused bytes are never forwarded - they are not a future input. One transient ~867KB replay pinned a healthy 256K-window lane onto the 4096 capability floor for its whole life (wire max_tokens 4096; model cut off mid-sentence at exactly 4096 output tokens). The clamp now plans against the measured input of THIS request only; per-request defenses own overflow (preflight / egress fuse shows it on its own 'DSH COMPACTION REPLAYS REFUSED' line, explicitly non-planning. Behavior change (disclosed): lanes with refusal records get max_tokens back from floor-crushed values (4096 / 62797 in the field incident) to measured-input-honest values up to the requested budget. The #2490 monster-replay shape (floor ~900K vs 1M window) previously shrank the budget to 55K and now follows the measured value - true overflows are handled loudly by preflight/fuse instead of being silently clamped. Tests: new tests/issue5596-refusal-floor-no-planning.test.ts (both directions + e2e); re-anchored pins issue2490 / issue3384 / issue3071 / issue3148; recording paths untouched.
…nger feed the output clamp
05ab965 to
62e4369
Compare
(ai: vllm-qwen/qwen3.8-27b) 第三次冲突已解(上轮 rebase 后 master 又前进 ~637 文件),新 head 本轮做了什么
八问
判定:冲突已清,CI 全绿(39 success / 0 failed),mergeable=true,ready 待 owner 审阅合并——#5603 。注:三次 force-push 后原 review 审批已失效,需重新 approve;master 若继续高速前进,同类漂移冲突会再现,同法处置即可。 |
(ai: vllm-qwen/qwen3.8-27b) 复审结论:APPROVE(代码审查通过) —— head 又前进了:被 rebase 到更新的 master 基线(a446a3c),核心修复与我的 changelog 修复两个 commit 都重新提交(core= 本轮在新 head 62e4369 上复核了什么:
既有行为回归:无新回归。唯一语义漂移仍是上次已披露的那条(#2490 怪物形状不再静默预缩、改由 preflight/fuse 大声兜底),本轮回 base 未引入任何新的行为变更。 CI:新 head 62e4369 上运行中(0 红 / 13 pending)。该代码与我上次审过的 30/30 全绿版本逐字节一致,新增仅 #6752 正交重构 + 我的 docs-only changelog 修复,不预期功能回归;按规范不轮询等绿,若翻红会再次触发复审。 判定:APPROVE(可合,待 CI 终绿)。无人工决策项。合并权在 owner:#5603 |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
中文摘要:dsh 车道被拒压缩回放的字节数(#1729 守卫的粘性高水位记账)被 #2490 规划下限拿去规划输出预算,把健康会话整段踩死在 4096 max_tokens。修复:clamp 只按本请求实测输入规划;记账降级为诊断水印(acp_status 单列展示)。详见下方 Behavior change。
What this fixes
Closes #5596
The #1729 guard records the byte size of every dsh native-compaction replay it refuses (
session.metadata.dshCompactionRefusedBytes, sticky high-water) and the #2490 planning floor converted that into a lower bound for output-budget planning (gated since #3384 by "request >= 25% of window or view at wall"). But refused bytes are never forwarded upstream — they are not a future input. In the field incident (window 256000, requested 128384) one transient ~867KB replay set floor 216690 → cap floor(256000 − ceil(216690×1.12) − margin) = 1172 < 4096 → wiremax_tokens = 4096(#3071 capability floor), model cut off mid-sentence at exactly 4096 output tokens, lane stuck there until it ended.Fix
The clamp (
src/server/budget.ts) now plans against the measured input of THIS request only; per-request defenses own overflow (preflight / egress fuse #4079/#4185). The record stays as a diagnostic watermark:src/server/handle.tscode unchanged);acp_statusshows it on its ownDSH COMPACTION REPLAYS REFUSED — raw-ledger high-water N tok … diagnostic onlyline instead of the oldplanning floor N tok from the refused dsh compaction replay (#2490, sticky…)clause;clampOutgoingOutputctx dropsledgerFloorTokens; the three prepare call sites stop passing it;lastOutputClamptype drops the field.Behavior change (old → new)
max_tokensrises from floor-crushed values (field incident: 4096 on the sublane, 62797 on the main session) to measured-input-honest values up to the requested budget. This is the intended recovery.Measured-input clamping itself is byte-pinned unchanged: near-wall inputs still clamp (e.g. est 240K / window 256K → 4096 capability floor), sub-floor shapes still surrender to preflight.
Config surface
None. No new env vars, config keys, or defaults.
dshCompactionRefusedBytesstays internal session metadata (diagnostic only now).Tests
tests/issue5596-refusal-floor-no-planning.test.ts: both directions of the incident shapes (sublane est 184K → 39614 not 4096; main-session est 100K → full 128384; NEGATIVE direction: measured near-wall 240K → still clamps to 4096 via the [bug] 0.1.195 输出预算三路饿死仍复现:无 output 上限模型 restore 无下限(1→252、fork 原样转发 1)、#2490 planning floor 钳到 1479–2623 → 3 会话 9 次 finish=length 空轮不重试(#546/#1665/#1840/#2904/#2756 残留) #3071 capability bound; past-the-wall → surrender) + e2e (refused ~320KB envelope recorded → next turn's 30K budget rides out untouched).issue2490-ledger-floor-doomed-probe(recording test kept byte-for-byte; clamp rows driven by measured input),issue3384-ledger-floor-starvation(gate rows: no longer clamps at any request size — that is exactly what max tokens 4096 dsh 4096 — from the "emergency output budget clamp" of the billion-context proxy, not from the DSH clien | max token 4096 dsh 4096 来自 billion-context 代理的「紧急输出预算钳制」,不是 DSH 客户端,也不是模型 #5596 removes),issue3071-planning-floor-min-output(capability floor byte-pinned from measured input),issue3148-upstream-circuit(exact clamp-event hook,ledgerFloorfield gone).Coordination note
In-flight branch
2026-10-31_ledger-floor-authored-decay(#5289) changes what the AUTHORED path stamps (snapshot vs envelope bytes); this change removes the CLAMP-side consumption entirely. Orthogonal; possible comment-only overlap around the record site — rebase if needed.