Skip to content

ci: cache Rust build + Verus, cancel superseded PR runs, fail-fast ordering - #5

Merged
maxine-at-forecast merged 1 commit into
mainfrom
feature/ci-cache-concurrency
Jun 13, 2026
Merged

ci: cache Rust build + Verus, cancel superseded PR runs, fail-fast ordering#5
maxine-at-forecast merged 1 commit into
mainfrom
feature/ci-cache-concurrency

Conversation

@maxine-at-forecast

Copy link
Copy Markdown
Collaborator

What

CI wall-clock optimization for .github/workflows/ci.yml. No change to what is gated — the full gauntlet (build, test, clippy, fmt, skill-budget, doc-drift) still runs and still hard-fails on any non-zero exit (R-DEFER-6).

Why now

Every --verify ci kickoff agent (the spike agents, and the many stage-1/stage-2 implementation agents to come) blocks on this CI and polls it with a bounded timeout. The repo had no caching of anything — each run cold-compiled all 7 workspace crates + deps + Verus-using test targets, and re-downloaded the pinned Verus zip. Shrinking that latency compounds across every agent iteration.

Changes

  • Swatinem/rust-cache@v2 — caches the cargo registry + git deps + workspace target/ (keyed on Cargo.lock + toolchain). Cold full-workspace compile → warm incremental.
  • actions/cache@v4 for Verus — the pinned verus-0.2026.05.24.ecee80a distribution is downloaded+unzipped once and cached by version; the install step is a no-op on a cache hit and falls back to download on a miss.
  • concurrency + cancel-in-progress — superseded PR runs are cancelled when a new commit is pushed; main pushes are never cancelled (those runs are the verification record of record).
  • Fail-fast orderingcargo fmt --check and the two python doc-drift gates now run before the Rust build cache restore and the heavy build/test/clippy, so a formatting slip or a stale design-doc pin fails in seconds instead of after a multi-minute compile.

Out of scope

A Lean CI job (umbrella REQ-2a) is the real coverage gap — ci.yml has no lake build/#print axioms step, so Lean proofs aren't checked in CI. That's a separate, slower PR (needs lake/Mathlib caching) and is deliberately not bundled with these zero/low-risk changes.

🤖 Generated with Claude Code

…dering

Reduces CI wall-clock — which the --verify ci kickoff-agent loop blocks on
for every iteration. No change to what is gated (R-DEFER-6 hard gate intact):

- Swatinem/rust-cache@v2: caches cargo registry + git deps + workspace target
  dir (keyed on Cargo.lock + toolchain); turns the cold full-workspace compile
  into a warm incremental one.
- actions/cache@v4 for the pinned Verus distribution (verus-0.2026.05.24...),
  downloaded+unzipped once instead of every run; install step is a no-op on a
  cache hit, falls back to download on a miss.
- concurrency block with cancel-in-progress for pull_request events only (main
  pushes stay the verification record of record and are never cancelled).
- fail-fast ordering: cargo fmt + the python doc-drift gates run before the
  Rust build cache restore and the heavy build/test/clippy, so a fmt slip or a
  stale design-doc pin fails in seconds, not after a multi-minute compile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@maxine-at-forecast
maxine-at-forecast force-pushed the feature/ci-cache-concurrency branch from a7370fe to 545d80c Compare June 12, 2026 23:52
@maxine-at-forecast
maxine-at-forecast merged commit 018a378 into main Jun 13, 2026
1 check passed
@maxine-at-forecast
maxine-at-forecast deleted the feature/ci-cache-concurrency branch June 13, 2026 00:15
@maxine-at-forecast maxine-at-forecast added the ops GitHub CI / CD operations, etc. label Jun 13, 2026
@maxine-at-forecast maxine-at-forecast self-assigned this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ops GitHub CI / CD operations, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant