Skip to content

ci: skip rust jobs on doc-only PRs and accept skips in alls-green - #479

Merged
thiras merged 3 commits into
mainfrom
ci/478-allow-skips-and-gate-rust-jobs
May 8, 2026
Merged

thiras merged 3 commits into
mainfrom
ci/478-allow-skips-and-gate-rust-jobs

Conversation

@thiras

@thiras thiras commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add needs: changes + if: needs.changes.outputs.rust == 'true' || github.event_name == 'push' to fmt, clippy, deny, doc, msrv so they skip on doc-only PRs (matching the existing pattern on test).
  • Set allowed-skips: fmt, clippy, test, deny, doc, msrv on re-actors/alls-green so the CI success aggregator accepts the legitimate skips instead of failing the meta-check.
  • Correct the misleading comment on test that claimed alls-green treats skipped jobs as success by default.

changes and markdownlint are intentionally not in allowed-skips — they always run, so a skip from either should fail the gate.

Closes #478.

Test plan

  • This PR itself is doc-only-adjacent (only .github/workflows/ci.yml changes); ci.yml is in the rust paths-filter, so all Rust jobs should run on this PR and CI success should be green.
  • After merge, open a follow-up doc-only PR (e.g., touching only adr/**.md) and confirm: fmt, clippy, deny, doc, msrv, test are all Skipped; markdownlint, changes, coverage tooling tests, Semantic PR title run and pass; CI success is green and mergeable without admin override.
  • Open a Rust-only PR (touch a .rs) and confirm all Rust jobs run.

🤖 Generated with Claude Code

Doc-only PRs (e.g. #477) had `CI success` failing because
re-actors/alls-green treats `skipped` as failure unless explicitly
listed in `allowed-skips`. The `test` job was already gated by the
`changes` paths-filter but the aggregator wasn't told to accept the
skip; the workflow comment claimed otherwise, which was misleading.

Apply the same gate to the other Rust-only jobs (fmt, clippy, deny,
doc, msrv) so doc-only PRs no longer burn CI minutes on no-op runs,
add `allowed-skips` for the gated set, and correct the comment.

`changes` and `markdownlint` always run, so they're intentionally
omitted from `allowed-skips` — a skip from either still fails the gate.

Closes #478

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 8, 2026 10:58
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@github-actions

github-actions Bot commented May 8, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 85.88% (was 85.88%, ● 0.00%) — 9152/10657 lines

No Rust files changed in this PR.

History
Commit Total Δ vs base
f795aa7 85.88% ● 0.00%
97970a1 85.87% ▼ 0.01%
15137cf (HEAD) 85.88% ● 0.00%

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the main CI workflow to skip Rust-heavy jobs on doc-only pull requests (based on the existing changes paths filter) and configures the CI success meta-check to accept those legitimate skips.

Changes:

  • Gate fmt, clippy, deny, doc, and msrv behind needs: changes + a rust-change if condition (matching the existing test pattern).
  • Configure re-actors/alls-green with allowed-skips so the CI success aggregator doesn’t fail when gated jobs are skipped.
  • Fix/update the test job comment to reflect that allowed-skips is what makes skips acceptable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
thiras and others added 2 commits May 8, 2026 14:04
Replace `github.event_name == 'push'` with `github.event_name !=
'pull_request'` on every Rust-job gate (fmt, clippy, deny, doc, msrv,
test). The workflow also triggers on `workflow_dispatch`, where
`dorny/paths-filter` can't reliably compute a diff and reports
`rust: false`; the prior `push`-only escape hatch silently skipped Rust
jobs on manual runs, making "Run workflow" green without actually
validating Rust. The new gate forces full Rust validation on any
non-PR event.

Also brings the pre-existing `test` gate (introduced in #476) onto the
same condition for consistency — its workflow_dispatch hole was
inherited rather than introduced by this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The `rust` filter is the gate for every Rust-only job (fmt, clippy,
deny, doc, msrv, test) and `allowed-skips` accepts those skips on the
ci-success aggregator. With `rustfmt.toml`, `deny.toml`, and
`.cargo/config.toml` outside the filter, a PR editing only one of
those files would skip the very job that consumes it (most acutely:
a `deny.toml` advisory-ignore change merging without `cargo deny`
running). Add them all so the gate matches the toolchain's actual
input set. `.cargo/**` is intentionally a glob so future per-target
overrides under that dir are caught automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@thiras

thiras commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

Multi-agent review pass on this branch surfaced one real silent-failure path that I've fixed in 15137cf, and a few suggestions I'm declining with reasoning.

Acted on

rust paths-filter was missing deny.toml, rustfmt.toml, and .cargo/** (flagged independently by code-reviewer and silent-failure-hunter). The most concrete risk: a PR adding an advisory-ignore to deny.toml would skip the cargo deny job (since deny.toml doesn't match any filter pattern), allowed-skips would accept the skip, and the policy change would merge unvalidated. Same shape for a rustfmt.toml line-width tweak or a .cargo/config.toml change that grows beyond RUST_BACKTRACE/color. Fixed by extending the filter; .cargo/** is a glob so future per-target overrides land inside the gate automatically.

Declined

  • Inverting the gate polarity to needs.changes.outputs.rust != 'false' (silent-failure-hunter) — defensive against a hypothetical drift in dorny/paths-filter's output contract. The action's documented contract is 'true' | 'false'; making the gate accept anything-but-'false' makes the condition harder to read for a scenario that requires the action itself to break in a specific way. The current == 'true' matches the explicit positive signal and is the more legible default.
  • Pre-emptively adding clippy.toml to the filter (silent-failure-hunter) — file doesn't exist in the repo. YAGNI; if/when it's introduced, the filter audit will surface naturally.
  • Expanding the comments at lines 130-132 and 375-379 (comment-analyzer suggested optional refinements; silent-failure-hunter suggested noting alls-green's skip-reason behavior) — comment-analyzer rated both comments accurate as-is. Adding more text invites rot when triggers/jobs change later. Keeping them lean.

@thiras
thiras merged commit 79de8f1 into main May 8, 2026
10 checks passed
@thiras
thiras deleted the ci/478-allow-skips-and-gate-rust-jobs branch May 8, 2026 11:21
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.

ci: re-actors/alls-green meta-check fails on doc-only PRs (test job correctly skipped)

2 participants