ci(diet): path-filter the non-required heavy gates on PRs (tier A) - #310
Merged
Conversation
The agents generate more CI than the fleet absorbs: with no path-filtering, every PR — including docs- and artifact-only ones — detonates the full matrix. This economizes the NON-REQUIRED heavy workflows so a PR only runs the ones its changes can actually affect. Deadlock-safe by construction: these five checks (Coverage, Rocq+Gappa, Lean, Spar, Bazel/cascade) are NOT in branch protection's required set (verified against the API: only Clippy/Format/Verification-gate/Test×3/Kani-gate are required), so a path-skipped run never leaves a required check pending. Filters are applied to the `pull_request` trigger ONLY — every `push: main` stays UNFILTERED, so main-branch evidence/gates always run in full (the backstop, and where a too-narrow glob would still be caught). Globs err generous (a miss on a non-required check = green-PR-then-red-main, not a silent hole): bazel includes wasm/** + embedded/** (the cascade composes wasm/cm/flight); rocq includes crates/relay-math/** (drift catch — the proofs hardcode the kernel coefficients). Tier B (the real prize — Kani ×24, Test ×3, Verification-gate) touches REQUIRED checks and needs the job-level `if` + skip-safe aggregate pattern; it follows as its own carefully-validated PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
avrabe
enabled auto-merge (squash)
July 23, 2026 06:02
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
Multiple agents generate more CI than the self-hosted fleet can absorb. With no path-filtering, every PR — even docs- or artifact-only — detonates the full matrix (Kani ×24, 90-min Verification gate, Test ×3, Coverage, Spar, Bazel, Rocq, Lean). This is the "agents clog the runners" problem.
What (Tier A — the safe tier)
Path-filter the non-required heavy workflows so a PR only runs the ones its changes can affect:
crates/**,wasm/**,embedded/**,Cargo.*proofs/rocq/**,proofs/gappa/**,crates/relay-math/**(drift catch)proofs/lean/**spar/**,wit/**crates/**,wasm/**,embedded/**,proofs/**,wit/**, all Bazel filesWhy this is deadlock-safe
Filtering a required check at the workflow level is dangerous: a skipped required check sits "pending" forever and blocks every merge. These five are NOT required — verified against the branch-protection API (only
Clippy/Format/Verification gate/Test ×3/Kani gateare required). A skipped non-required check never blocks a merge.Safety choices
push: mainstays UNFILTERED on all five — every main commit still produces full coverage/proof/cascade evidence (the DO-178C/EN-50128 record), and it's the backstop where a too-narrow glob is still caught.wasm/**on bazel (the cascade composeswasm/cm/flight) andcrates/relay-math/**on rocq (the proofs hardcode the kernel coefficients).Validation plan (watched)
After merge, bidirectionally: a docs-only PR must skip all five; a
proofs/**orcrates/relay-math/**PR must still fire Rocq. One-directional (skip works) would miss the glob-miss failures.Follow-up: Tier B (the real prize)
Kani ×24, Test ×3, and the Verification gate are the actual monsters — but they're required, so they need the job-level
if+ skip-safe aggregate pattern (kani-gateis already anif: always()shim, but currently fails on askippedmatrix — that gets fixed there). Separate, carefully-validated PR.🤖 Generated with Claude Code