Repository navigation
test(xtask): judge the eval flows with a window that holds their view - #2260
Conversation
The behavioural scenario flows judged with the run model, so each measured the run model's window instead of the behaviour it asserts. A run's fixed request already fills most of the fixture's 24 000-token window, and the eight flows flipped to `unjudged` on macOS, where `std::env::temp_dir()` is longer than `/tmp` and pushed the view past the 23 800-token budget (#2256). The seven behavioural flows judge with the fixture's existing 128 000-token provider, and the relative-out flow passes `--judge judge/mock`. The fit flow gains a `narrow` provider at 40 000 tokens and an overgrown view that clears the budget by more than 4 000 tokens, which the test now asserts, so the fixture no longer sits on the line.
zerob13
left a comment
There was a problem hiding this comment.
The seven behavior tests now size the judge independently of the run model, without weakening their verdict, retry, or failure assertions. The fit test still requires both regular runs to be judged and both oversized runs to be rejected before any judge call, with explicit headroom. The production fit rule is unchanged. All eight cases passed on exact-head Linux CI. The selected macOS native check passed but did not run these eight cases, so the full macOS result is not verified here. No blocking code findings.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
This fixes the macOS-only failure in #2256: the eight flows judged every run with the run model's 24,000-token window (budget 23,800), and the longer macOS temp path pushed the fixture view to 23,837-23,852 tokens, so every run was unfit and every later assertion failed.
No blocking findings. What I checked:
- All eight tests pass on a macOS host with a TMPDIR longer than
/tmp(the pinned toolchain,--features eval-tests), andverify (linux)passes at this head with the eval group on. - Arithmetic: the narrow judge's budget is 39,800 tokens. The case view is ~23,845 tokens, ~15,950 under. The overgrown message adds 100,000 bytes (~25,000 tokens), so the overgrown view clears the budget by at least ~9,000, and the new
> 4,000assertion holds with room for temp-path differences (tens of bytes) and ordinary description growth. The seven flows now have ~104,000 tokens of headroom under the 127,800-token judge. - The fit flow still fails if the fit check regresses: the over runs would be judged, breaking the two judge calls, the
unfitrecords and the unjudged-run row. If the estimate counted only the message (~25,000 tokens), the overgrown view would fit and the test would also fail. - The seven flows keep their assertions (verdicts, re-ask counts, call-failure paths, relative out). None depended on the judge being the run model; the wider judge only drops the same-family report row, which no flow asserts.
Optional, not blocking: the fit flow's narrow window is fixed at 40,000 tokens, so a growth of the fixed request above ~16,000 tokens would flip its case run to unfit again (xtask/src/scenario_eval.rs:16382, :17187). #2257 tracks the view's fixed size, and the stacked #2261 records the estimate and budget and asserts the judged-side margin, so I would leave this PR as is.
APPROVE
Summary
Eight
scenario_evalflows fail on everymainpush and on the daily sweep, inverify (macos)only. They judge with the run model, so they measure that model's window instead of the behaviour each asserts: a run's fixed request (system prompt and tool definitions) already fills most of the fixture's 24 000-token window, and macOS's longerstd::env::temp_dir()pushed the view from under the 23 800-token budget to 23 817, which leaves every run unjudged before any judge call.mainhas been red since #2214 grew the collaboration tool descriptions; the fixture had no margin left. Details and provenance: #2256.The rule itself (model-prompts §8.1) is unchanged: a view that does not fit the declared window is still unjudged before any call. What changes is which window the test fixtures judge with:
a_contradicted_verdict_…,a_judge_answering_…, the twoa_judge_call_that_fails_…, the twoa_reply_…, and the relative-out flow) judge with the fixture's existing 128 000-token provider. They no longer borrow the run model's window.a_run_whose_view_does_not_fit_the_judge_is_unjudgedkeeps a judge that cannot hold an overgrown view: a newnarrowprovider at 40 000 tokens, with the "over" scenario's message grown from 20 000 to 100 000 characters. The case view now sits about 16 000 tokens under the budget and the overgrown view about 9 000 over it, and the test asserts that clearance instead of relying on it.No product code changes. Local reproduction without macOS: run the flows with
TMPDIRset to a long path — before this changea_contradicted_verdict_passes_a_must_not_show_probefails withthe judge view needs about 23833 tokens; the judge's budget is 23800.Design rule checklist
xtask; no new part, no state or lifecycle.beforecallbacks: n/a.Documentation
Verification
cargo test -p xtask --features eval-tests --bins scenario_eval::tests— 177 passed, 6 ignored, with/tmpand with a 31-characterTMPDIR(comparable to macOS's/var/folders/…).TMPDIR:judgeOutcome: "unfit",the judge view needs about 23833 tokens; the judge's budget is 23800.cargo fmt --all -- --check --config error_on_line_overflow=truecargo clippy --workspace --all-targets --locked --features xtask/eval-tests -- -D warningsNot covered here: with a 60-character
TMPDIR, ten switch/timeout flows fail atpath must be shorter than SUN_LENbecause the fixture's temp path holds App Server sockets. It does not happen at macOS's path length and is unrelated to the judge budget.Fixes #2256