Repository navigation
[PR] fix: progress-stall fail-fast in preflight fold loop (#7775) - #7788
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.12127-pr.7788.d98dde8This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7788.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 检索了 open issue/PR(含 [PR] 行全量清单):针对 #7775 问题 2(preflight 马拉松不收敛)没有其他在途 issue/PR;相关的 preflight PR(#7177 折叠前 doomed-body 判定、#4928 doom-bar 后继续收敛走查、#6467 baseline 口径)机制均不同。本 PR 是该问题的唯一修复。 标签: bug + p2 + dsh + scope/kernel(已打到本镜像线程;PR 侧已有同组标签,按 PR 自身 diff 复核过:改的是 当前状态(实时核实):
接下来:rebase → 补正向测试 → 定向跑 preflight 套件 → 推回 PR 分支 → 按八问给完整 review 结论。 |
When the fold is not making meaningful progress (net saving per round < 3% of the window), the 32-round marathon that saves only ~13.7K/round against a 730K gap is doomed. This adds a progress-stall check that fails fast when the average net saving over the last 3 rounds cannot close the gap in the remaining rounds. The check is gated on the progress rate (< 3% of the limit per round) to avoid interfering with the existing round-budget exhaustion behavior for high-overshoot cases where each fold removes a meaningful chunk. Closes #7775 (problem 2: preflight stop ignored during preflight)
…#7788) After an authored bili-snapshot checkpoint lands, the ACP state is rebased onto it and the compression blocks are wiped to 0 by design (the client checkpoint replaced them; originals stay in CCR). The web panel's '压缩块 0' state could be misread as data loss. This change exposes the dshAuthoredCheckpointLanded session flag to the detail payload and renders a one-line note in the empty-blocks state explaining the rebase is expected and the originals are still in CCR. Closes #7788
…7775) The PR shipped the stall check with only negative-direction coverage (the existing round-budget and issue3918 suites sit above the 3% progress-rate threshold, so the gate must not fire there — and it does not). #3617 gate discipline requires both directions. This test is the positive direction: a 2.8x-over-window payload of many small messages where every fold lands but each removes only a ~4.7k-tok range (~2.4% of the 200k window, under the 3% gate) against a ~396k deficit. The projected saving over the remaining rounds is a small fraction of the gap, so the check must fire within the first couple of rounds instead of running the full 32-round budget. Verified as a genuine regression test: with the stall check removed the same fixture runs the full 32-round marathon and reports 'exhausted after 32 rounds'; with the check present it fails fast after 2 rounds with the 'progress stall' verdict (2 summary calls, payload not forwarded).
829d3e1 to
878ce1c
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Progress update — review work is done, CI is running: Rebased onto current master. The PR head was cut from Added the missing positive regression test ( Local verification (targeted only, per local-testing discipline): all 7 preflight suites pass (31 tests: round-budget, issue3918, issue1841 futility, emergency-fold, client-abort, issue2952 tier-recovery, + the new test). Typecheck clean, build succeeds. Pushed the rebased branch + test to the PR head ( |
…#7788) After an authored bili-snapshot checkpoint lands, the ACP state is rebased onto it and the compression blocks are wiped to 0 by design (the client checkpoint replaced them; originals stay in CCR). The web panel's '压缩块 0' state could be misread as data loss. This change exposes the dshAuthoredCheckpointLanded session flag to the detail payload and renders a one-line note in the empty-blocks state explaining the rebase is expected and the originals are still in CCR. Closes #7788
…param The panel fix (#7788) intentionally added the authoredCheckpointLanded parameter to buildTreePane so the empty-blocks card can explain the authored-checkpoint rebase. The #4608 bundle-shape gate still pinned the old one-arg signature, so it failed on every OS/shard that runs it (shard 1: ubuntu 22/24 + windows 22). Update the pin to the new two-arg signature.
Summary
When the preflight fold is not making meaningful progress (net saving per round < 3% of the window), the 32-round marathon that saves only ~13.7K/round against a 730K gap is doomed. This PR adds a progress-stall check that fails fast when the average net saving over the last 3 rounds cannot close the gap in the remaining rounds.
Problem
Issue #7775 reports that a session with 1,894,041 local-est tokens (2.4x over the post-headroom window 792,576) enters preflight and runs 32 rounds, saving only ~13.7K per round. The total saving (~438K) is far less than the deficit (~801K), so the fold cannot close the gap. The user waits for the full 32-round marathon before the turn is refused.
Root Cause
The existing futility gate checks if the TOTAL foldable mass * FUTILITY_SLACK < deficit. In this case, the total foldable mass is large (many messages), so the gate does not fire. But the NET saving per fold is small (the summary re-enters the payload), so the fold is effectively futile.
Fix
Add a progress-stall check that tracks the net saving per round and fails fast when the average net saving over the last 3 rounds cannot close the gap in the remaining rounds. The check is gated on the progress rate (< 3% of the limit per round) to avoid interfering with the existing round-budget exhaustion behavior for high-overshoot cases where each fold removes a meaningful chunk.
Behavior Change
This is a behavior change: the fail-fast message is different from the round-budget exhaustion message. The new message says "progress stall: the average net saving over the last N rounds (~X tok/round) cannot close the ~Y-tok gap in the remaining Z rounds — the fold is not converging."
Tests
Closes #7775 (problem 2: preflight stop ignored during preflight)