Skip to content

test(xtask): judge the eval flows with a window that holds their view - #2260

Merged
eric8810 merged 1 commit into
mainfrom
dim/2256-eval-judge-window
Nov 27, 2026
Merged

eric8810 merged 1 commit into
mainfrom
dim/2256-eval-judge-window

Conversation

@eric8810

Copy link
Copy Markdown
Collaborator

Summary

Eight scenario_eval flows fail on every main push and on the daily sweep, in verify (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 longer std::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. main has 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:

  • The seven behavioural flows (a_contradicted_verdict_…, a_judge_answering_…, the two a_judge_call_that_fails_…, the two a_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_unjudged keeps a judge that cannot hold an overgrown view: a new narrow provider 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 TMPDIR set to a long path — before this change a_contradicted_verdict_passes_a_must_not_show_probe fails with the judge view needs about 23833 tokens; the judge's budget is 23800.

Design rule checklist

  • Scope: n/a — test fixtures in xtask; no new part, no state or lifecycle.
  • Commands and results: n/a — no state change.
  • Handover: n/a.
  • Timeline before callbacks: n/a.
  • Infrastructure (Timeline, Dispatcher, event envelope, assembly and lifecycle, Session and branch facades): unchanged.
  • Core mechanisms and consumers gain no plugin-specific handling: n/a — no product code.
  • Batch: n/a.
  • Context: n/a — no change to what reaches model context; the judge view is the evaluation harness's own.
  • No reading another plugin's internal state or deciding for it: n/a.
  • Cross-language faces: n/a — no service added or consumed differently.
  • Business configuration stays out of loader rows; contracts are language-neutral: n/a.
  • Missing mechanism capabilities: none raised. The general question — the judge view's constant part competing with run content for the judge's budget — is scenario_eval: the judge view's fixed size and byte-based estimate decide what can be judged #2257.
  • Timeline holds only facts later decisions use: n/a.

Documentation

  • No accepted ADR is modified or deleted.
  • No other module's design is changed.
  • Delivery status is not added to an ADR, index or roadmap.

Verification

  • cargo test -p xtask --features eval-tests --bins scenario_eval::tests — 177 passed, 6 ignored, with /tmp and with a 31-character TMPDIR (comparable to macOS's /var/folders/…).
  • The failing flow before the change, same command with the long 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=true
  • cargo clippy --workspace --all-targets --locked --features xtask/eval-tests -- -D warnings

Not covered here: with a 60-character TMPDIR, ten switch/timeout flows fail at path must be shorter than SUN_LEN because 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

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 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 yyhhyyyyyy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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), and verify (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,000 assertion 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 unfit records 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

@eric8810
eric8810 merged commit 1de96c7 into main Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verify (macos): the eval judge view misses its budget by 17 tokens, so eight scenario_eval tests fail on every main push

3 participants