You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find what still makes the macOS test shards slow after #857 #894
After #857, the macOS shards still spend 65-70 minutes of test time per CI run. #857 removed 22% of process spawns in its benchmark test on Linux. The macOS saving on main has been smaller and within the ±15% run-to-run noise #857 itself measured:
In 39430050727, nextest flagged 93 tests over 30 s and 16 over 60 s. By module: spec_run 47, architect_run 9, security_review 7, security_run 5, pickup_run 5, merge_run 5, base_fix 3, bin 3, then run_notification, codex_sessions, ci (2 each), and stop, show_logs, issue_number (1 each). Linux runs the whole suite in about 8.5 minutes.
#857's analysis came from strace on x86_64 Linux. No one has yet attributed the macOS time itself: how much is process spawn, how much is the launch-side --git-common-dir rechecks #858 holds, and how much is something else, such as fixed sleeps, real-time polling or timeouts in the test harness.
Category: enhancement Summary: Attribute the remaining macOS test time and remove the causes that are not Worktree ownership rechecks
Current behavior:
After #857, the four macOS shards spend 3,900-4,250 seconds of test time per CI run, against about 8.5 minutes for the whole suite on Linux. 93 tests run over 30 seconds on macOS, 47 of them in spec_run. The only profile so far was taken on Linux, and it pointed at Worktree ownership inspection's git spawns.
Desired behavior:
Attribute. For the slowest macOS tests (at least the 16 over 60 seconds and a sample of the spec_run ones), measure where the wall time goes on macOS: spawned processes by program and caller, time spent in fixed sleeps, polling intervals or timeouts, and anything else that dominates. Use a macOS runner, a workflow_dispatch job, or a temporary diagnostic step in a PR. Record the method and numbers in docs/ci-performance.md under "Where macOS test time goes".
Fix what is in bounds. Remove or shorten causes that don't touch Worktree ownership checks. Examples: test-only waits that could be event-driven or configurable, test fakes that cost more than they need to, repeated setup a test could share, and production intervals that tests should be able to set shorter. Each change keeps what the test asserts.
The integration test harness: the fakes for gh, claude and codex built from the test fakes, and the helpers that start the binary against real git.
Any interval or timeout the factory waits on in tests, such as CI watch polling and the waiting line, and how a test sets it.
Directory::verify_repository and Worktree ownership inspection are read-only for this issue.
Acceptance criteria:
docs/ci-performance.md gives a macOS breakdown of the slowest tests' wall time by cause, with the runs or commands that produced it.
macOS test-step time summed over the four shards on this PR's final run, and on the first main run after it merges, is compared in the PR body against the three post-Inspect Worktree ownership with fewer git processes to shorten macOS CI #857main runs (3,920 / 4,020 / 4,252 s), with the ±15% run-to-run noise stated.
No test's assertions are weakened, no test is skipped on macOS, and no retries are added.
Activity
JacobStephens2 commentedon Oct 20, 2026
Agent Brief
Category: enhancement
Summary: Attribute the remaining macOS test time and remove the causes that are not Worktree ownership rechecks
Current behavior:
After #857, the four macOS shards spend 3,900-4,250 seconds of test time per CI run, against about 8.5 minutes for the whole suite on Linux. 93 tests run over 30 seconds on macOS, 47 of them in
spec_run. The only profile so far was taken on Linux, and it pointed at Worktree ownership inspection's git spawns.Desired behavior:
spec_runones), measure where the wall time goes on macOS: spawned processes by program and caller, time spent in fixed sleeps, polling intervals or timeouts, and anything else that dominates. Use a macOS runner, aworkflow_dispatchjob, or a temporary diagnostic step in a PR. Record the method and numbers indocs/ci-performance.mdunder "Where macOS test time goes".Key interfaces:
gh,claudeandcodexbuilt from the test fakes, and the helpers that start the binary against real git.Directory::verify_repositoryand Worktree ownership inspection are read-only for this issue.Acceptance criteria:
docs/ci-performance.mdgives a macOS breakdown of the slowest tests' wall time by cause, with the runs or commands that produced it.mainrun after it merges, is compared in the PR body against the three post-Inspect Worktree ownership with fewer git processes to shorten macOS CI #857mainruns (3,920 / 4,020 / 4,252 s), with the ±15% run-to-run noise stated.cargo nextest run,cargo test,cargo clippy --all-targets -- -D warningsandcargo fmt --checkpass.Out of scope: