Repository navigation
ci: cut PR wall-clock time from ~29 to ~18 minutes and drop redundant jobs - #317
Merged
Merged
Conversation
- Split the macOS and Windows test jobs in two with nextest --partition. Their nextest steps took 26 and 22 minutes against 10.5 on Linux and set every PR's ~29 minute wall-clock time. - Run doctests on Linux only (4.5 minutes on Windows). - Remove the Check job: Clippy already type-checks the workspace. - Remove the MSRV job. rust-toolchain.toml overrides the toolchain dtolnay/rust-toolchain installs, so its "1.90" step ran 1.98.0 (the job log says so), and every crate now declares rust-version 1.98, so both steps repeated Clippy's check. - Conformance: use rust-cache saved from dev only, instead of actions/cache, which saved a full target/ from each PR that changed Cargo.lock into the shared 10 GB cache. - Provenance DSSE: add a cache (seeded by a dev push trigger), paths-ignore for Markdown, and cancel superseded PR runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
On the first run of the split, each macOS half took about as long as the whole suite (shard 2/2 ran 44 minutes), and the extra macOS job held one of the organization's few macOS runners: dev's macOS test job queued for 22 minutes behind it. Windows halves went from 28 to 17 minutes and stay split. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
Test, Documentation, Conformance vectors and the DSSE export job now need fmt and clippy, so a PR with a lint or formatting error stops after about a minute and a half instead of also running the macOS and Windows suites. Fold the Provenance DSSE interoperability workflow into ci.yml as the export-consumer job so it can wait on Clippy too. Its feature lint (clippy with --features dsse-export) moves into the Clippy job, so there is one place that runs Clippy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
test_fully_idle_turn_end_creates_attestation opened a Repository to check the first attestation and kept it open across the second turn. The open handle holds the database lock, so the orchestrator's opens in that turn (has_working_copy_changes, record_turn, persist_incomplete_refusal) each waited out the lock budget, and the turn ended on the incomplete-refusal path instead of the no-op path the test describes. The test took 41s on every platform; it now takes 0.6s and exercises the path it names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
The integration tests mostly wait on git and atomic subprocesses: on a 4-CPU machine, 86 git shim, adoption and anchor tests used 1.5 CPUs at one test per CPU (182s) and took 101s at two per CPU and 75s at four. The 3-CPU macOS runner, which sets every PR's wall-clock time, ran exactly 3 tests at a time (3,777s of test time in 1,261s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
Retry the split now that tests run two per CPU: macOS is the last job to finish (23 minutes in the latest run). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
vinceblock99
approved these changes
Nov 4, 2026
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.
Why
This repository is public and uses standard GitHub-hosted runners, so Actions minutes are not billed (the usage API reports 0 billable ms for every OS). The cost is waiting time and runner slots. In run #724 the slow jobs were:
On the latest commit the whole run took 17.5 min, including the Format/Clippy gate. Every test job finished between 13 and 15.6 min.
Changes
Test speed
git/atomicsubprocesses and the filesystem. Locally on 4 CPUs, 86 git shim/adoption/anchor tests used 1.5 CPUs at one test per CPU (182 s) and took 101 s at two per CPU. In CI: macOS 1,261 → 1,029 s, Linux 652 → 551 s, Windows halves 590 → 350 s.cargo nextest run --partition count:N/2. Latest run: macOS halves 13.4 and 15.6 min (5,389 + 5,360 tests), Windows halves 15 min. The first macOS split, before two-per-CPU, restored a stale cache in one half and gained nothing, so it was reverted and is now retried. Each PR takes two of the organization's concurrent macOS runner slots.test_fully_idle_turn_end_creates_attestation: 41 s → 0.6 s. The test kept aRepositoryopen across its second turn. That held the database lock, so the orchestrator's opens in that turn each waited out the lock budget, and the turn ended on the incomplete-refusal path instead of the no-op path the test describes. The handle is now closed before the second turn.Fewer and gated jobs
needs: [fmt, clippy]). A PR with a lint or formatting error stops after ~2 min instead of also running the macOS and Windows suites.export-consumerjob inci.yml. Its feature lint (--features dsse-export) moves into the Clippy job.Check. Clippy already type-checks the workspace.Minimum Supported Rust Version.rust-toolchain.tomloverrides the toolchaindtolnay/rust-toolchaininstalls. The job log saystoolchain '1.98.0' is currently in use (overridden by .../rust-toolchain.toml), so the "1.90" step never ran 1.90. Every crate declaresrust-version = 1.98, which is the pinned version.Caches
Swatinem/rust-cachesaved fromdevonly, instead ofactions/cache. The old cache saved a fulltarget/from each PR that changedCargo.lock, and it counted against the repository's 10 GB cache limit.paths-ignore, and cancellation of superseded PR runs, all throughci.yml.How the split covers every test
Each half runs
cargo nextest run --partition count:1/2orcount:2/2. The split is fixed, not timing-based:nextest does not balance the halves by test duration, but on this suite they came out even: 556 s and 561 s of test time on macOS.
The latest macOS run adds up:
5,389 + 5,360 = 10,749. Each half's "skipped" count is the other half's tests plus the 17 the suite always skips (5,377 = 5,360 + 17). The Windows halves add up the same way.
Nothing in CI checks the total. The split itself cannot drop a test, but a whole half can fail to run (cancelled, or never started). Each half is its own check on the PR, so a missing half shows as missing or failed. It only blocks merging if the
1/2and2/2checks are required.Before merging
Check names change:
Check,Minimum Supported Rust VersionandProvenance DSSE interoperability / export-consumerare gone (the job is nowCI / export-consumer).Test (macos-latest)andTest (windows-latest)are nowTest (<os> 1/2)andTest (<os> 2/2). If classic branch protection ondevrequires any of the old names, update it.https://claude.ai/code/session_01Q7Qtv34PZoUooFXFpB3zMU
Generated by Claude Code