Repository navigation
[PR] fix: name permanent resident-eviction compress refusals and keep progressing preflight exhaustion retryable (#3918) - #3943
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4894-pr.3943.09d8befThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3943.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 是 #3918 线程里「无决策依赖部分先修」的交付(见该票 floor 3/4 的处置计划),检索 open+closed 无其他同机制条目(失败签名:resident-eviction 拒收回执文案 + preflight progress retryable,均无在途重复)。与 #3859/#3863(空视图守卫绕过)、#3137(空视图标 DEAD)、#3461(413 终局路径)相邻但机制不同:本 PR 只改判决的措辞与可重试性,不动守卫/驱逐行为本身。 标签: pr, bug, dsh, scope/kernel, p1(沿用 #3918 定级——核心承诺失灵的部分修复,严重度随母票)。 开工状态:正在按 PR review 规范独立审这个分支(diff 逐段读 + 既有行为清点 + CI 核对)。当前 head |
(ai: vllm-qwen/qwen3.8-27b) Review 结论(独立审核,非复读 #3918): 两个修复都打到了机制层,回归清点干净,可以合并。审核过程中我推了一个小修 commit(见下),CI 状态见文末。 结构化八问
行为变更披露(旧 → 新 + 原因)
另:首个 head 测试证据
判定:可合并(等 |
(ai: vllm-qwen/qwen3.8-27b) CI 收尾确认: 最终 head 上一条八问结论不变:可合并,等人工合并。PR 分支最终三个 commit:两个修复 + 我补的措辞小修( |
(ai: vllm-qwen/qwen3.8-27b) CI 结论:当前 head 全绿,无需再推。 转发的失败是旧 head 门失败根因与修法:PR 在 结构化八问:
备注:分支相对 master 为 |
…3918) The empty-view compress refusal (#3126) promised the view self-heals on the next model request. That promise holds only when the reloaded session survives between requests: releaseInFlight's discharge evicts any session whose live weight plus the other residents exceeds the byte budget, so a large image session ping-pongs out after every cycle and the identical refusal repeats forever - the incident's 444 MiB session under the 512 MiB default against an 87.5 MiB peer. Stamp each eviction with the session's live weight (measurable only at that moment; a disk reload under-measures by exactly the transient mass) and export residentPressure(). When weight + other residents > budget, the receipt and the operator log name the permanent case and give the exits (close the peer / raise sessions.residentMaxBytes) instead of advising an impossible retry. The transient case keeps the exact original wording. The map is advisory-only, capped at 256 entries.
…#3918) A preflight walk that exhausts its summarization budget AFTER committing real folds was reported 502 retryable=false - 'doomed' - although the folds persist in the session and the next attempt starts from a smaller baseline and continues the fold (the incident ran 64 effective folds, every round declared terminal). Non-deterministic exhaustion with compressedRanges > 0 now reports retryable=true and appends a progress note (ranges folded, tokens short of the window). Zero-progress exhaustion keeps today's terminal verdict and dead-end cooldown; deterministic exhaustion keeps its 413 path byte-identical.
The interface is only consumed as the inferred return type of residentPressure() across modules; no importer names it. Dropping the export satisfies the unused-exports CI gate without a waiver.
…t wall, not the window (#3918) Review fix-up for the new ffDetail sentence: limit can be window minus completion reservation (#3450), so naming the gap "short of the window" would repeat the #3663 confusion class in a brand-new string. Uses the subsystem's own term ("gap to the target", src/preflight.ts).
0c76267 to
cafb493
Compare
…able preflight exhaustion (ranxianglei#3918, ranxianglei#3846)
…estimate demotion cannot reopen oversized forwards (ranxianglei#3846) Conflict resolution: kept both the ranxianglei#3918 progressContinues verdict (from ranxianglei#3943) and the ranxianglei#3846 noteLocalRefusal persistence on status===413 — complementary: status 413 fires only for deterministic exhaustion (!progressContinues).
# Conflicts: # src/server.ts
(ai: vllm-qwen/qwen3.8-27b) Rebased head 八问
结论: 分支已更新到 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.710-master.2c8983c # this exact build
npm install -g billion-context@master # always the newest merged build
|
(ai: vllm-qwen/qwen3.8-27b)
Addresses part of #3918 — the two lying verdicts in the incident chain where a healthy 93%-compressed image session became permanently uncompressible. The remaining expected behaviors (eviction policy, snapshot-based compression) need an owner decision and are tracked in the issue thread; Phase 2 (attribution loss) is #2975's mechanism.
What was broken
1.
compressrefused forever, with advice to retry. When a session's live footprint cannot fit the resident pool alongside other open sessions,releaseInFlight's discharge evicts it after EVERY model request, so the empty-view refusal (#3126) repeats identically forever — yet its receipt promised "the view self-heals on the next model request" and told the user "after the next turn you can compress the same ranges again". Incident: a ~444 MiB image session ping-ponging against an ~87.5 MiB peer under the 512 MiB default budget; every retry failed exactly as predicted, with no exit named anywhere.2. Preflight exhaustion reported terminal while making progress. A preflight walk that exhausts its summarization budget AFTER committing real folds was reported 502
retryable=false("doomed") although the folds persist in the session and the next attempt starts from a smaller baseline and continues folding. Incident: 64 effective folds (2,012,855 → 914,731 tokens), every round declared terminal.Fix
src/session.ts: stamp each eviction with the session's LIVE weight (measurable only at that moment — a disk reload under-measures by exactly the transient mass that made the eviction necessary); new exportresidentPressure(id)reporting whether weight + other residents exceed the byte budget. Advisory-only, bounded to 256 entries.src/stream.ts: when that condition holds, the refusal receipt AND the operator log name the PERMANENT case and give the exits (close another open session, or raisesessions.residentMaxBytesabove the measured sum); otherwise the original transient wording stands byte-for-byte.src/server.ts: non-deterministic budget exhaustion withcompressedRanges > 0→retryable=trueplus a progress note (ranges folded, tokens short of the window). Zero-progress and deterministic paths unchanged.Behavior changes (old → new)
PERMANENTmarker with measured numbersretryable=falseretryable=true+ progress note ONLY whencompressedRanges > 0Config surface: none added.
sessions.residentMaxBytes/BILI_SESSION_RESIDENT_MAX_BYTESare PRE-EXISTING knobs (CONFIGURATION.md en+zh), now merely named in user-facing text.Tests
New:
tests/issue3918-resident-eviction-refusal.test.ts(pressure mechanics + positive/negative receipt directions) andtests/issue3918-preflight-progress-verdict.test.ts(progress → retryable + note; zero progress → terminal, negative direction). Targeted local runs green: both new files plusissue3126-no-visible-context,bounded-storage,preflight-multi-range,issue3461-overlimit-exits,preflight-fail-fast,issue1841-preflight-futility,preflight-empty-summary,issue2847-doomed-nonretryable-status,preflight-stream-summary-config— 60 tests. Full-suite verdict = CI on this head.Out of scope (tracked elsewhere)