Repository navigation
[PR] test: realign five stale suites to #3900 always-reserve-headroom window math - #4208
ranxianglei wants to merge 1 commit into
Conversation
#4194) 4d50f9c (#4184/#3900) dropped the Anthropic output-headroom exemption, so every wire's effective window now carries min(max_tokens, cap x window): - codex-window-align: every asserted effective limit is now base - max_tokens (272000/400000/200000/828400/95000/800000/100000); named fixture constant. - side-request-isolation: pure guard-math rows run without an output-budget field; added the explicit anthropic reservation boundary pair (both directions, #3617 gate discipline). - external-summary-autofold: proxy-direct fixtures miss the route table, so their windows resolved as fallback and #282's floor re-inflated the post-reservation window back to 100K, keeping the pressure band cold; give the fixture model an authoritative registry window instead. - fork-nudge-deadzone: pin the log selector to the diagNudge "[<id>] nudge" prefix — the new [headroom] line also contains "nudge" and logs first. - plugin-fork: status contextLimit is metadata.effectiveContextLimit, which carries the reservation by design -> 400000 - 1024. No source changes. Local targeted runs: 101/101 across the five suites.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g [email protected]This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4208.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
Closing as superseded: while this PR was in flight, #4198 merged (2026-10-21T16:37Z) reverting #4184/ Per #4198's stated plan, #3900 stays open for a redo with different semantics (record the un-reserved value in
No source changes were involved; the branch |
Closes #4194
What
4d50f9c2(#4184, implementing #3900 "reserve output headroom on every wire") dropped the Anthropic exemption, so every wire's effective window now carriesmin(max_tokens, cap × window). It realignedanthropic-beta-window/context-overflow/preflight-max-output-tokensbut left five other suites asserting the pre-#3900 numbers. This PR realigns those suites — no source changes.Per-suite mechanism (verified by local repro on fe5ba59, then fixed)
tests/codex-window-align.test.ts<base> − FIXTURE_MAX_TOKENS(new named constant).tests/side-request-isolation.test.tsblocked=falseunder tolerancemax_tokens, so anthropic now reserves and the boundary flips. Pure guard-math rows now run without an output-budget field; added an explicit anthropic reservation boundary pair mirroring the OpenAI case (both directions, #3617 gate discipline).tests/external-summary-autofold.test.tshandle.ts:nativeFromFallback && reserved < 100_000) re-inflates the post-reservation window (48976 → 100000) → usage judged at 42% instead of 85.8% → pressure band cold. Fix: give the fixture model an authoritative registry window (setRegistryForTest) so the window is non-fallback and no floor applies.tests/fork-nudge-deadzone.test.ts[headroom] … nudge/preflight judge …log line contains the word "nudge" and logs before the diagNudge decision line, so the selector picked it up first. Selector now pins the[<id>] nudgeprefix. (Probe dump confirmed the decision line itself readsnudge idle: usage=32%— same as pre-#3900.)tests/plugin-fork.test.ts398976 !== 400000contextLimitissession.metadata.effectiveContextLimit(src/plugin.ts:1611) — the window nudge/preflight judge against — which carries the reservation by design. Assertion now400000 − 1024.Behavior-change disclosure (from #3900 itself, surfaced here for the record)
On the Anthropic wire, small fallback-sourced windows (< 100K after reservation) are now effectively floored to 100K by the pre-existing #282 rule — e.g. a 50K guessed window judges usage against 100K instead of 48976. This is a consequence of #3900 × #282, ships with master already, and is out of scope for this test-only PR — flagged per the behavior-drift rule. If the owner wants that interaction changed, it belongs in a follow-up against #3900.
Verification
codex-window-align8,side-request-isolation33,external-summary-autofold8,fork-nudge-deadzone3,plugin-fork49).npm run typecheckclean.testlanes on this head.