Skip to content

ci(diet): path-filter the non-required heavy gates on PRs (tier A) - #310

Merged
avrabe merged 2 commits into
mainfrom
ci/diet-tier-a-path-filter-nonrequired
Jul 23, 2026
Merged

ci(diet): path-filter the non-required heavy gates on PRs (tier A)#310
avrabe merged 2 commits into
mainfrom
ci/diet-tier-a-path-filter-nonrequired

Conversation

@avrabe

@avrabe avrabe commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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:

Workflow Runs a PR only when it touches
Coverage crates/**, wasm/**, embedded/**, Cargo.*
Rocq + Gappa proofs/rocq/**, proofs/gappa/**, crates/relay-math/** (drift catch)
Lean proofs/lean/**
Spar spar/**, wit/**
Bazel (+ Component Model cascade) crates/**, wasm/**, embedded/**, proofs/**, wit/**, all Bazel files

Why 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 gate are required). A skipped non-required check never blocks a merge.

Safety choices

  • push: main stays 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.
  • Globs err generous — a miss on a non-required check surfaces as green-PR-then-red-main (loud), not a silent hole. Hence wasm/** on bazel (the cascade composes wasm/cm/flight) and crates/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/** or crates/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-gate is already an if: always() shim, but currently fails on a skipped matrix — that gets fixed there). Separate, carefully-validated PR.

🤖 Generated with Claude Code

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
avrabe enabled auto-merge (squash) July 23, 2026 06:02
@avrabe
avrabe merged commit 8e10474 into main Jul 23, 2026
59 checks passed
@avrabe
avrabe deleted the ci/diet-tier-a-path-filter-nonrequired branch July 23, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant