Repository navigation
[PR] fix(preflight): fold probes blocked by the local egress fuse - #7009
WHUrubbish wants to merge 7 commits into
Conversation
…ns {3,5,11,14}
The probe anchor PROXY_TOOL_AT=6 was calibrated on 2026-10-31 for ranxianglei#4521
(schedule {4,6,8,9}). The nudge scheduling has shifted again — nudge now
lands at {3,5,11,14}. Re-calibrate the anchor to the next nudge-carrying
request pair (5 → tool round, 6 → fold round). The fold/proxy-tool-round
mechanics under test are unchanged.
Closes: master-red on test (windows-latest, 22, 3) and (ubuntu-latest, 22, 1).
…ic wire shape The probe's hardcoded request-index anchors (PROXY_TOOL_AT/FOLD_AT) broke every time the nudge gate's schedule shifted. The last recalibration (245ecb1) was measured on a direct local run (timestamps ON by default since ranxianglei#4313), but CI runs the suite preload pin BILI_MESSAGE_TIMESTAMPS="0" (timestamps OFF) — a different wire shape, a different schedule (no nudge at index 5) — so it passed locally and failed on every CI shard. Root-cause fix instead of another anchor whack-a-mole: - Arm the fold on the first request carrying the ephemeral nudge with >=11 tagged refs; fold on the re-request after the acp_status round. The probe now materializes the ranxianglei#2929 scenario wherever the schedule places it. - Pin compress.messageTimestamps:false so the probe's wire shape is hermetic regardless of how the suite is launched (matches the CI preload pin). Supersedes the 245ecb1 recalibration. Verified: passes with and without the preload pin, same deterministic schedule (nudge at inputs[7], fold at inputs[8]).
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 同家族但机制不同 — 与 #6844/#6845(measured-body fuse 误计 model-hidden 的
无并行 PR 针对同一线程(已查 open [PR] 列表)。开始正式 review:拉取分支、通读 diff、定向验证。 |
… unreachable from the side lane The preflight egress-fuse probe block keys on !prepared.sidePassthrough, but side requests never reach preflight — handle.ts forwards them with a minimal prepared before the preflight call, and bodies over the effective window are already rejected locally by the side payload guard (ranxianglei#554, 413 side_request_payload_too_large). Pin that exact shape (stuck estimate meter + body above the fuse's 1M floor) so a future change that routes side traffic through preflight, or makes the new block apply to side, fails here. Lane-suite discipline per ranxianglei#2170: the lane-symbol line in src/server.ts (ranxianglei#7009) lands with the dedicated side-lane suite.
(ai: vllm-qwen/qwen3.8-27b) Review verdict: technically sound and well-tested. Two CI reds fixed on the spot as additive commits to the PR branch. Remaining merge gates: (a) CI green on the new head, (b) owner confirmation of the #5976 probe-policy direction. 查重(首条回复已给): 与 #6844/#6845/#6877 同属 egress-fuse-413 家族,但机制不同——本 PR 修的是预压缩取证探针与本地熔断的衔接,不是熔断计量口径。 What I verified
Policy context (the human gate). This PR lands one direction of the open design issue #5976 (forensic probe that will inevitably exceed the window: 413-for-evidence contract vs metering gate): the probe now respects the already-enforced local egress decision and falls through to normal folding instead of dying in a local 413. That is the availability-first resolution (the turn is recovered, not killed), and it preserves every below-bar probe including the dense-payload controls. The PR explicitly asks for human review of the evidence-probe policy and requests no auto-merge — the direction call belongs to the owner. CI fixes added on the spot (additive commits to the PR branch, per the external-PR fix rule):
CI state (verified live): both prior runs on 8问
判定:代码与测试达标,两处 CI 红已当场修掉(继承红 merge ci-fixes + lane-guard 补 side-lane pin)。合并前置条件:① 新 head |
… unreachable from the side lane The preflight egress-fuse probe block keys on !prepared.sidePassthrough, but side requests never reach preflight — handle.ts forwards them with a minimal prepared before the preflight call, and bodies over the effective window are already rejected locally by the side payload guard (ranxianglei#554, 413 side_request_payload_too_large). Pin that exact shape (stuck estimate meter + body above the fuse's 1M floor) so a future change that routes side traffic through preflight, or makes the new block apply to side, fails here. Lane-suite discipline per ranxianglei#2170: the lane-symbol line in src/server.ts (ranxianglei#7009) lands with the dedicated side-lane suite. (cherry picked from commit 27d0349)
Problem
中文摘要:修复“预压缩决定先发探针获取证据,但最终出站保护又在本地返回 413”的恢复死结;复用已有计量与阈值,让本地已无法发出的探针进入正常压缩。涉及取证策略衔接,请维护者人工审阅。
An estimate-only session can get stuck between two existing decisions:
preflightCompressIfNeeded()chooses the billion-context 卡死问题 —— 上报材料 usage获取不到导致上下文估计失误 #2313 evidence probe and returns the prepared request without folding.413 egress_window_fuse.The probe never reaches the upstream, so it cannot obtain the usage/overflow evidence that was supposed to restore the recovery path. A long resumed conversation reproduced this with approximately 1.30M locally measured tokens against a 1M window, below the existing core-byte doom bar. These are local meter readings, not upstream billed token counts.
Change
Before returning an estimate-only probe, reuse
measuredOutbound()and the final egress fuse's existing declared-window validation andMIN_ASSUMED_WINDOW_TOKENSfloor. If that existing fuse would reject the probe, fall through to the normal preflight compression path instead.This runs through the common preflight path for proxy and plugin modes.
Regression and validation
Two hermetic fake-upstream cases cover proxy and plugin modes. Each seeds a non-current-route estimate baseline, then submits a CJK body below the byte-doom bar but above the final measured-body fuse.
301e1a5459a77d5578206927c8062a58381af642, both cases fail with the original local HTTP 413.localRefusalsrecord.tsc --noEmit --project tsconfig.jsonandnpm run buildpassed. Full-suite verdict belongs to upstream CI.Field validation on the original released 0.1.215 deployment with DSH 0.2.2-rc.3 restored the affected conversation without changing its Session ID. Long preflight still triggered two 600s DSH idle retries before eventual completion; this PR does not claim to fix stream-watchdog activity accounting or every upstream reset.
Related work and review boundary
probeForEvidencedoom-bar returns 413 directly before any fold: 28.1 MiB session successfully | [Bug][preflight/0.1.213]probeForEvidencedoom-bar 在任何 fold 之前直接返回 413:同一进程内 28.1 MiB 会话成功转发、9.9 MB core 会话却被拒(A/B 对照 + 根因定位;非 #6… #6459 or the model-hidden metadata classification in [Bug][dsh] measured-body egress fuse meters a model-hidden DSH field: 88% of a refused body was dsh_session_log inside the other bucket #6844.AI-assisted contribution prepared with Codex; public changes are limited to the source fix and synthetic tests.