Repository navigation
[PR] fix: name the oversized range in the manual compress lane's refusal (#6945) - #6951
ranxianglei wants to merge 7 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10496-pr.6951.2faa7c9This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6951.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) Verification + review of PR #6951 (#6945 proposal 3 — the no-decision diagnostics part). I fetched the branch ( Code — verified correct:
Model-facing text (highest priority): the appended New test: a real regression test (asserts the diagnostic fires; would fail pre-fix). Determinism margin is comfortable — the fixture range is ~2013 tokens vs the 1664 budget (~21% headroom). Minor: no explicit negative assertion (a non-oversized range should not get the diagnostic); the existing test covers that case implicitly but doesn't assert the absence. Status (live, mirror cache 13:45Z):
Verdict: the code is correct, well-scoped, and regression-safe. It is not yet mergeable — it needs (1) a rebase to current master and (2) CI green on the rebased head. Per the [PR] verification workflow I have not rebased proactively (no CI failure, no explicit request). Say the word and I'll rebase + push; I'll also pick it up if CI comes back red. 结构化八问(中文,供人工 reviewer):
收工判定:代码正确、范围干净、回归安全;但分支落后 master 53 个提交且 CI 仍在跑,暂不可合并——需 rebase 到最新 master + rebase 后 CI 绿。按 [PR] 核验流程我未主动 rebase(无 CI 失败、无明确要求);owner 发话或 CI 因 rebase 相关原因变红,我再 rebase + push。 |
…6945)⚠️ MODEL-FACING TEXT CHANGE: the all-candidates-failed refusal now appends an [oversized: ...] diagnostic naming the offending range, its measured input tokens, and a suggested split count. The existing refusal text is unchanged; the diagnostic is additive. The manual compress lane had no size sharding and no legacy fallback — one oversized range exhausted every external-summary target and the refusal was a generic 'exhausted' with no hint of which range to split. This adds the minimum-viable diagnostics (proposal 3 of #6945): - Extract the summary system prompt + JSON payload + input-token estimate into shared helpers (external-summary.ts) so the manual lane's pre-validation matches the HTTP guard's byte-for-byte. - Add ConfiguredSummaryPlan.tightestInputBudget — the smallest (contextWindow - outputTokens - 256) across the chain. - On an all-candidates-failed refusal, pre-validate each nominated range against the tightest budget and name the oversized ones with a suggested split count. The HTTP guard's behavior is unchanged (byte-identical strings, same budget formula) — only the refusal gains the diagnostic. Proposals 1 (sharding) and 2 (legacy fallback) of #6945 need owner decision and are tracked separately.
The probe anchor PROXY_TOOL_AT=6 was calibrated on 2026-10-31 for #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).
98ea2e1 to
2e46b09
Compare
(ai: vllm-qwen/qwen3.8-27b) Update — CI came back red; I investigated the logs and rebased the branch. The red was not this PR's code. I pulled the failure logs:
So all 5 failures were stale-base (the PR was 53 commits behind master), not regressions from this change. I then rebased the branch to current master (
CI is re-running on the rebased head. The code review in my previous comment stands — the change itself is correct and regression-safe. I'll confirm once the new run is green. |
[bot] 🏷 CI failure is a master-level issue, not caused by this PR. Investigated the failing required test shards on the rebased head (2e46b09). The failing test is Evidence this is a master-level issue:
The architecture-docs failure (missing Conclusion: This PR's code is clean and the CI failure is inherited from master. The PR is ready to merge once the master-level nudge/fold test issue is resolved. No further changes needed on this PR's branch. |
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 #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 #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]).
…s map) into PR head
(ai: vllm-qwen/qwen3.8-27b) CI reds fixed — all 4 were inherited master failures, none from this PR's diff. Live re-verification first (mirror cache, run 43890454281 on head Job-log forensics:
Action (per CI-failure coordination policy): 结构化八问
判定:修复完成,最终 head |
The integration test asserted retryAt sat in a tight 30..95ms wall-clock window after the 3rd failure, but a loaded CI runner can stall the event loop between the arming and the read (2026-11-17: ~260ms, delta=-180ms), and the 20ms recovery timer can advance the streak past 3 and re-arm retryAt before the read. Assert the stall-proof invariant instead: the failure that set failStreak=S armed retryAt = T_S + backoff(S) with T_S <= now, so the arm is at most one full ladder step ahead of now, and it is armed at all. The exact ladder values are pinned by the unit test.
(ai: vllm-qwen/qwen3.8-27b) CI fix run — #3380 timing flake fixed, pushed as final head. Re-verified the live check state first (mirror cache was stale, so one single GitHub API fetch of check-runs for head The failure: Root cause (flake, not a PR regression): the test asserted Fix (test-only, no source change): replaced the tight window with the stall-proof invariant — the failure that set Local verify: 5× clean, plus 3× under simulated CPU load (loadavg 3.09 on 7 cores) — all pass. Pushed 八问
判定:本 PR 唯一残留红已修复并推送( |
[oversized: ...]diagnostic naming the offending range, its measured input tokens, and a suggested split count. The existing refusal text is unchanged; the diagnostic is additive.What this fixes (#6945, proposal 3)
The manual compress lane had no size sharding and no legacy fallback — one oversized range exhausted every external-summary target and the refusal was a generic
exhaustedwith no hint of which range to split. This adds the minimum-viable diagnostics:external-summary.ts) so the manual lane's pre-validation matches the HTTP guard's byte-for-byte.ConfiguredSummaryPlan.tightestInputBudget— the smallest(contextWindow - outputTokens - 256)across the chain.What is NOT in this PR
Proposals 1 (size sharding / half-span retry) and 2 (legacy fallback opt-in config flag) of #6945 need owner decision and are tracked in the issue thread. This PR is the no-decision diagnostics part only.
Regression safety
inputTokens > contextWindow - outputTokens - 256).tests/external-summary-runtime.test.ts—oversized range names the offending range and suggested split in the refusal (#6945).