Repository navigation
Warm copied Experiment builds before timed Trials on macOS - #1457
Merged
Merged
Conversation
macOS scans a freshly copied binary on its first exec, for about 0.85s, and serializes those scans. Each Trial's first exec of the copied build paid that inside its one-second deadline, so the fake agent never emitted its partial usage before the timeout.
This was referenced Oct 27, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Main is red on
test-macos-shard (1):timed_out_trials_keep_partial_usage_and_exportable_session_ancestrysawinput_tokens: Null. The Experiment fixture copies the test binary intoevals/builds/<commit>/. macOS scans each fresh copy on its first exec, which takes about 0.85s, and runs those scans one at a time. Each Trial paid that cost inside its--timeout 1deadline, so the fake agent often hadn't printed its partial usage when the timeout fired.Fixture::with_session for commit in [baseline, candidate] copy thirdshift → evals/builds/<commit>/thirdshift + run it once with --version # pay macOS's first-exec scan outside the Trial deadlineTest-only; no change to production code.
Closes #1455
Evidence
target/debug/thirdshifttook 0.82s, 0.93s and 0.91s; the second exec of each took 0.01s. With the fake agent recording its start times, the two Arms' agents started 0.85s apart, and 1.8s after the test began. Linux has no such scan, which is why the earlier triage in CI red on main: test-macos-shard (1), test-macos #1455 couldn't reproduce this.left: Null, right: 11attests/experiments.rs:400) and failed 12 of 12 times run concurrently.After: the test passes alone, and passes 12 of 12 when run 4 at a time over three rounds. The two agents now start 0.01s apart.
cargo test --test experiments -- --test-threads=3(about a macOS runner's core count): 84 passed, 0 failed.cargo fmt --checkandcargo clippy --test experiments -- -D warningsare clean.Merge Danger
Door: two-way
Blast Radius: tests
Adds roughly 1s of setup per
experimentsFixture on macOS (about 10ms on Linux).