Repository navigation
[PR] test: pin preflight escape-hatch × local-refusal edges + calibration boundary (#3977) - #4009
ranxianglei wants to merge 2 commits into
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 独立检索 open+closed issue/PR(preflight / local-refusal / escape-hatch pin / calibration boundary 主题),无同主题在途条目;相邻既有钉(issue3846 probe×拒签、issue3918 verdict 分类、issue2660 死段/三路退避)钉的是不同边,与本 PR 的 P-DIV/P-FRESH/P-IMG/P-LEARN 四边无重叠。与 PR 正文自带的查重声明一致。 标签: pr(既有)+ bug、scope/kernel、p1(缺陷族根治的打桩步骤;preflight 折叠判定属上下文管理核心域;所属 #3977 吞并族含 #3900 会话不可用场景,按 2026-10-19 修订判 p1)。 本 [PR] 是 agent 已完成的工作(#3977 步骤 0,纯测试零生产代码),按规范不重做——现在做的是独立审核:拉分支核对代码、核 CI、过回归面。审核中发现一个状态变化,先报:
|
The #3146 forward-once and #3846 refusal-closure log lines gained a /#4185 suffix when #4185 extended the fresh-session escape to identified zero-evidence sessions (merged to master after this pin's base b9f439e). Behavior of the pinned anonymous-zero-baseline path is unchanged — every other assertion in both tests passed; only the two exact-substring pins were stale. Also align the P-FRESH negative test title with its 502 assertion (the title said 413).
b7a116f to
439bb39
Compare
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.5183-pr.4009.81acd13This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4009.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 进度汇报(进程曾被强制重启,恢复后继续): 审查已完成,发现并修复了一处桩漂移,已推送。
另注:后续迁移步骤 1 的堆叠 PR #4012 里含旧的 pin commit,轮到它时需要 rebase 到本 PR 的新 head(会带上这次的重钉)。 |
|
(ai: zhipuai-lb/glm-5.3) 收尾清理:issue #3977 的修复已随合并 PR 落地。关单;误判请 reopen。 |
(ai: vllm-qwen/qwen3.8-27b)
Step 0 of #3977 (先打桩 — pin before migrating): regression pins for the four preflight edges #3977's checklist names as uncovered. Tests only — zero production code changes.
What is pinned (
tests/issue3977-preflight-escape-pins.test.ts, new file)Each gate is pinned in BOTH directions per gate discipline (#3617): fires without a covering local-refusal record, closes with one.
src/server.ts:3658) × local refusal. Unit-level direct call to the exportedpreflightCompressIfNeeded: the real walk folds the large message so its relaxed view fits under the window, while the rebuild stand-in measures the original payload over-window ⇒ exactly the divergence region. No refusal → forward-once log line; covering refusal → NO forward, fail-fast verdict per the existing contract (generic 502 here because the walk succeeded).src/server.ts:3712-3730) × local refusal. Anonymous + zero baseline (theunknownBaselineregime), oversized SYSTEM-head mass. The fixture deliberately answers summary draws with an 11-char summary (kernelminSummaryLengthis 50) because the system head IS foldable in the preflight walk — a usable summary would fold it away via the fits-forward path and never reach the gate. No refusal → forward-once log; covering refusal → no forward (logNOT re-forwarding for size arbitration (#3846)) + refusal-record idempotency (one record survives the fall-through re-note).src/server.ts:3360) × local refusal. Bytes-billed image reserve (22K) alone clears the window (20K) on estimate; all text belowminCompressRange⇒ zero viable ranges. No refusal → immediate forward, zero folds; covering refusal → deterministic exhaustion ⇒ 413, zero folds.src/server.ts:3691) × local refusal, through the real prepare/nudge state: a refused session (seeded with a genuine 413 from the same origin/model at the same window) gets the deterministic futility verdict (foldable mass × 1.2 slack < image-driven deficit ⇒ nothing to spend draws on) and stays 413 with zero extra forwards; a clean session forwards once for upstream arbitration. The route entry must carryimageBilling: "bytes"— under the default pixels pricing the synthetic PNG costs ~0 tokens and silently switches off the whole regime (learned the hard way while writing this pin).overflow-armsource,overflowArmTokens= stated window) but does NOT move k̂ today —calibratedEstimate{Origin,Model}+calibrationRing+lastUsageGradeTokensare deep-equal before/after. WhenlearnFromOutcome(overflow-400)lands in migration step 4, this pin is the deliberate flip target.Why the base is the integration branch
The local-refusal store (#3867:
localRefusalsmetadata +noteLocalRefusal/localRefusalCovers) exists ONLY on2026-10-20_batch-b-fold-budget(PR #3971); on master these gates have no refusal dimension to pin. Per #3977's plan this work stacks on the integration branch and retargets master after #3971 merges (expected conflict-free: one new test file).Acceptance (per #3977 step 0)
node --import tsx --test tests/issue3977-preflight-escape-pins.test.ts); typecheck clean.查重: 不重复 — fills exactly the coverage gaps named in #3977's checklist (P-IMG / P-DIV / P-FRESH / P-LEARN); adjacent existing pins:
tests/issue3846-local-refusal-evidence.test.ts(probe × refusal),tests/issue3918-preflight-progress-verdict.test.ts(verdict classification), issue2660 dead-ranges/three-way backoff suites.Fixes #3977
(孤儿认领:标题本已指向 #3977,补上关闭关键字 —— 第三批清理)