Repository navigation
[PR] fix(preflight): fold an over-window payload while epoch confirmation is pending (#6069) - #6807
Conversation
…is pending (ranxianglei#6069) The ranxianglei#3641 epoch-confirm latch pauses preflight folding and passes the request through verbatim. An over-window payload cannot pass through, so the paused preflight reported 0 compressible ranges and every turn was refused with preflight_compress_failed. The latch clears only after a turn is forwarded, so the session could not recover. Keep the pause while the verbatim payload fits the window, judged on the same calibrated scale as the fold loop, and fold as usual once it does not.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复. Searched open+closed issues/PRs for the epoch-pause over-window deadlock (#6069). #6807 is the only PR fixing this exact problem. Closest neighbor #5275 (open) is complementary, not duplicate: it improves the refusal message for the drift-pause state and fixes a separate empty- Recommended labels (suggestion only — not applied, per the no-source-issue-mutation rule): ReviewDirection (①): Correct. The deadlock is real and I reproduced it: on Fix quality (③): The gate moves from the top of Regression inventory (②): I walked the existing behaviors the touched path carries:
Tests (④): Real teeth. The new e2e (tests/issue6069-epoch-pause-over-window.test.ts) asserts both gate directions (#3617 discipline): fits → 0 summary calls / latch stays; over-window → ≥1 summary call / fold / latch clears. It fails on master, passes here. The doctrine test change is minimal (adds Diff cleanliness (⑤): 6 files, +280/−18, single-purpose, no unrelated changes, no whitespace churn. Docs updated in all 3 languages (en/zh-CN/ja) consistently. #5275 interaction: verified consistent — with this change the over-window state folds instead of refusing, so #5275's "Folding is currently paused…" message is reached only when the fold itself fails, exactly as the PR body states. No textual conflict (different regions of server.ts). 结构化八问
判定:可合 (mergeable),pending CI 全量测试车道(目前 0 失败,ubuntu/windows × node 22/24 分片仍在跑)。方向正确、修法打到根因、回归清点干净、测试有牙、diff 干净。以推送 head 的 CI |
|
One CI leg is red: It compares a wall-clock delta against an 80 ms retry step, so a stalled runner fails it. This change touches only Could a maintainer re-run that leg? I cannot re-run it from a fork. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — 该红是已知时序 flake 的一次新发生(档案:#3571 已关闭的追踪 issue + #4599 CI 总控),不是新问题;无在途修复 PR(已查 open PR 提及 3380 的 4 条,均无关),稳定化修复已开 PR #6821。 标签: bug / scope/kernel / p1 — 按 PR 本体定性(p1 可用性修复,preflight fold 门 = 内核域),与楼上 review 建议一致。 Done — re-ran the leg and it is green:
Since this is now the 5th+ cross-PR occurrence (the re-eval condition #4599 set for stabilization), I also opened PR #6821 (test-only, zero production change): it implements #3571's checklist item 1 — the mock records the throw time (which lands in the same event-loop turn as the production arm at Verdict: CI is now fully green on your head; the earlier review's "mergeable, pending CI" stands — ready for the owner's merge. 八问
|
(ai: vllm-qwen/qwen3.8-27b) Re-verified live this run: run 43698036798 attempt 2 is fully green — all 28 jobs 八问
收工判定:PR #6807 全部 check 绿,可合并(等 owner)。 |
[ework] CI fix verified green ✓ |
Problem
#6069: once the epoch-confirm latch (#3641) is set and the history grows past the model window, every turn is refused with
preflight_compress_failedand the session cannot recover.preflightCompressreturns early with 0 ranges and the request passes through verbatim.0 compressible range(s),retryable=false).compresscall from the model (needs a forwarded turn). Neither can happen, so the refusal repeats on every turn.Fix
The pause now holds only while the verbatim payload fits the window. The gate moves below the entry estimate in
preflightCompress, so it judges fit on the same calibrated scale as the fold loop (payloadEstimate + viewDeltaCorrection < limit). When the payload does not fit, preflight logs one warn line and folds as usual.Nothing else changes: fold-reconcile still sets and clears the latch, the snapshot is kept, and a fitting payload still passes through unfolded.
Evidence
Reproduction through the proxy (the new e2e test): fold a history, resend an unrelated history three times under the same session id, then grow it past the window.
master(e7a42babe)502 preflight_compress_failed, 0 summary calls200, 5 summary calls, 5 new active blocks502again200Tests
node --import ./tests/preload-storage-baseline.mjs --import tsx --test tests/issue6069-epoch-pause-over-window.test.ts→ 3 pass. Onmasterthe two over-window tests fail (0 summary calls;502).preflightCompress, the latch orpreflight_compress_failed→ 351 pass, 0 fail.tests/fold-anchor-doctrine.test.ts: the existing pause test now gives its fake session an emptystatsobject, because the gate runs after the calibration factor is read. Its assertions are unchanged.npm run typecheck,npm run check:unused-exports,npm run check:test-import-graph→ clean.node tools/gen-config-docs.mjs check-coverage,node tools/check-architecture-docs.mjs,node scripts/config-surface-guard.mjs,node scripts/lifecycle-ledger-guard.mjs→ clean.Not run: the full test suite and the Windows legs (left to CI).
Notes
docs/message-identity.mdand itszh-CN/jacopies get one sentence on the new limit of the pause.Refs #6069