Skip to content

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

Done

Description

@eric8810

What happens

Every main push that fails, fails in verify (macos) → Run compiled workspace tests, with the xtask test target exiting 101. Eight scenario_eval tests fail together, all for one reason:

judgeOutcome: "unfit"
judgeError: the judge view needs about 23817 tokens; the judge's budget is 23800

The run's window is 24000 and the judge's budget is 23800, so the view is over by 17 tokens and the judge is never asked. Every assertion after that (judge calls, verdicts, re-ask counts, judged) fails.

Failing tests, identical in every sampled run:

a_contradicted_verdict_passes_a_must_not_show_probe, a_judge_answering_one_object_per_line_is_read_in_one_request, a_judge_call_that_fails_during_a_re_ask_leaves_the_run_failed, a_judge_call_that_fails_leaves_the_run_failed, a_relative_out_resolves_before_the_run_uses_it_as_its_cwd, a_reply_that_does_not_read_is_asked_again, a_reply_with_no_verdict_for_a_probe_is_asked_again, a_run_whose_view_does_not_fit_the_judge_is_unjudged.

Evidence

  • run 45929712579 (push main): xtask exit 101 after 310 s.
  • run 45925970018 (daily sweep): verify (linux) passed and ran the same xtask tests, verify (macos) failed on the same eight.
  • All 13 failing main pushes in the last 100 workflow runs fail at verify (macos) only.

Why it is macOS only

The estimate is serialized_bytes / BYTES_PER_TOKEN (BYTES_PER_TOKEN = 4, crates/dim-agent-capabilities/src/context_model.rs:23), and the judge view carries the run's paths. The harness builds its directory from std::env::temp_dir() (xtask/src/scenario_eval.rs:4926 and elsewhere). On macOS that is /var/folders/…/T/…; on Linux it is /tmp/…. The tens of extra bytes are enough to cross a budget the fixture sits on top of: the "does not fit" test only adds 20_000 bytes (~5 000 tokens) to cross it, and macOS crosses it by 17 tokens.

The eval_server_child panics in the same logs are the tests' intentional failure hooks (the failing-child test hook: …), not this failure.

Scope

  1. The eight tests pass on both platforms, and the margin is asserted instead of incidental: a fixture whose view lands within a few dozen tokens of the budget should fail as a fixture, not flip on the host's temp path.
  2. A run's judged/unjudged outcome does not depend on an absolute path in the environment.
  3. verify (macos) is green on main pushes and on the daily sweep.

Related: #1919 (main CI green), #2139, #635 (earlier judge-view size work).

Activity

  1. added
    bug
    on Nov 27, 2026
  2. eric8810 commented on Nov 27, 2026

    @eric8810
    CollaboratorAuthor

    Provenance

    The pieces came from different changes; none of them is wrong on its own.

    Piece Commit Author Date
    A view over budget leaves the run unjudged (xtask/src/scenario_eval.rs:9027) ace088c65 huihui 2026-10-30
    The eight tests and the window: 24000 fixture 50a9e3fbe, 24ff47117 huihui 2026-10-29/30
    count_tokens as serialized_bytes / 4 (context_model.rs:23) 278e257e7 eric8810 2026-10-16

    The regression that made main red:

    The fixture already carries the fix

    Fixture::with_window writes two providers (scenario_eval.rs:16333-16363): gateway/mock at the run model's window and judge/mock at 128 000, "the wide window a flow judges views that outgrow the run model's". Fixture::judge_options selects it. The eight behavioural tests use options(), which sets judge to the run model, so they measure the run model's window instead of what they assert.

    Proposed fix: the eight behavioural tests use judge_options(); the fit test keeps a deliberately narrow judge and gains an explicit margin assertion. That also removes the /tmp versus /var/folders dependency.

  3. eric8810 commented on Nov 27, 2026

    @eric8810
    CollaboratorAuthor

    Reproduced and fixed locally

    Reproduction (Linux, no macOS needed): the same test fails when std::env::temp_dir() is long. With TMPDIR=/tmp/tttttttttttttttttttttttttttttt (31 chars, macOS-like), a_contradicted_verdict_passes_a_must_not_show_probe fails with

    judgeOutcome: "unfit"
    judgeError: the judge view needs about 23833 tokens; the judge's budget is 23800
    

    and passes with the default /tmp. That confirms the path-length dependency and gives a local reproduction for the macOS run.

    Fix on branch dim/2256-eval-judge-window (xtask/src/scenario_eval.rs only):

    • The seven behavioural tests judge with the fixture's existing 128 000-token provider (judge_options()), so they no longer measure the run model's window.
    • a_relative_out_resolves_before_the_run_uses_it_as_its_cwd passes --judge judge/mock.
    • The fit test gains a dedicated narrow provider at 40 000 and grows its "over" message from 20 000 to 100 000 characters, so the view now sits ~16 000 tokens under the budget and ~9 000 over it, instead of on the line.

    Verified: the whole scenario_eval::tests module (177 tests) passes with /tmp and with the macOS-length TMPDIR. cargo fmt --all -- --check passes.

    Side finding: with a 60-character TMPDIR some switch/timeout tests fail at path must be shorter than SUN_LEN (socket paths), independent of the judge. Not fixed here; the fixture's temp path is used for App Server sockets.

  4. self-assigned this
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions