Repository navigation
Description
This was generated by AI during triage.
What happens
Three experiments tests give their Trials --timeout 1. They pass in CI and when run alone. Under heavy local load on macOS, the Trial's 1-second deadline can run out before the work the test is checking happens, and they fail:
timed_out_trials_keep_partial_usage_and_exportable_session_ancestry(tests/experiments.rs)code_graders::check_timeout_cleans_descendants_before_packet_and_remains_failed(tests/experiments/code_graders.rs:129)model_graders::model_grader_timeout_keeps_trace_and_resume_reuses_trials(tests/experiments/model_graders.rs:96)
Reproduction (macOS 26, 18 cores, after #1457)
cargo test --test experiments, which uses 18 threads by default: 81 passed, 3 failed. These three tests are the ones that failed.- Twelve concurrent copies of
timed_out_trials_keep_partial_usage_and_exportable_session_ancestry: 4 of 12 failed, withinput_tokensNullinstead of11. cargo test --test experiments -- --test-threads=3, about a macOS CI runner's core count: 84 passed. Four concurrent copies of that test, over three rounds: 12 of 12 passed.
Context
#1455 / #1457 removed the large fixed cost: on macOS, the first exec of each freshly copied evals/builds/<commit>/thirdshift took about 0.85s, and macOS ran those first execs one at a time. What remains is the ordinary cost of preparing a Trial before the Harness starts, which happens inside the same deadline (src/evals/experiment/execution.rs, output_until(..., Instant::now() + self.timeout, ...)). Under contention, that preparation alone can use up 1s. Before #1457, 7 of 12 concurrent copies failed even with --timeout 10, which shows how contention-sensitive the setup is.
Open question for triage
CI isn't affected, so this is about how reliably a full local cargo test passes. Options:
- Leave it alone. Local full runs should use nextest or a lower
--test-threads, and the docs could say so. - Raise these tests' timeouts to a few seconds. Each test then takes longer, because the fake agents sleep past the deadline.
- Have these tests wait for evidence that the Trial or grader really started, for example a marker file written by the fake agent, rather than relying on a short wall-clock budget. That needs the timeout to start from something the test controls.
Activity
JacobStephens2 commentedon Oct 27, 2026
Decision: option 1. #1473 documents running with fewer test threads in
docs/testing.md. Tests and code are unchanged.