Skip to content

ci: stop running the whole pipeline on markdown-only changes - #826

Merged
cryptskii merged 1 commit into
mainfrom
ci/skip-the-full-pipeline-for-markdown-only-changes
Sep 9, 2026
Merged

ci: stop running the whole pipeline on markdown-only changes#826
cryptskii merged 1 commit into
mainfrom
ci/skip-the-full-pipeline-for-markdown-only-changes

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

The waste, measured

A 17-line markdown diff (#824) burned 95 minutes of runner time:

job time
Coverage 52m20s
Rust 23m53s
Docker 6m02s
Storage Node (Postgres) 4m17s
Formal Validation 2m36s
the rest ~6m

Coverage was not anomalous at that length. Recent runs took 52, 45, 48 and 52 minutes. It is simply the longest job in the pipeline, and it ran to completion on a change it cannot be affected by.

Cause: every workflow triggers on pull_request with no path filter and no job-level condition, so every job runs on every PR regardless of what changed.

Verified before filtering, not assumed

  • No markdown is compiled in. Zero include_str!("*.md") anywhere in the tree.
  • Every gate that scans the tree already excludes markdown: --glob '!**/*.md' in no_clock_and_no_json.sh and bridge_contracts_gate.sh, --exclude='*.md' in check_forbidden_symbols.sh.
  • No status check is required to merge. The main-branch-protect ruleset requires deletion protection, non-fast-forward, a reviewed PR and signed commits — and no status checks at all.

That last point is the one that makes this safe. The usual trap with paths-ignore is a required check that never reports, leaving a PR permanently unmergeable. That cannot happen here.

Scope of the filter

Only '**/*.md'. docs/ also holds a JSON, a TeX source and two PDFs, and those still run the full pipeline — "it lives under docs/" is not evidence that nothing consumes it.

Mixed PRs are unaffected: paths-ignore only skips when every changed file matches, so a PR touching code and docs together still runs everything.

CodeQL's schedule and workflow_dispatch runs are deliberately not filtered and remain the full-tree scans. The PR filter is consistent with that file's own note that alerts are already restricted to the PR diff, so a markdown-only PR reports nothing by construction.

Verification

Both files were parsed after editing to confirm the triggers are still well-formed: ci.yml 11 jobs, codeql.yml 1 job, filters on push and pull_request only.

This PR changes YAML rather than markdown, so it exercises the full pipeline itself.

A 17-line markdown diff burned 95 minutes of runner time: Coverage 52m, Rust 24m,
CodeQL rust 13m, plus Docker, Storage Node and the rest. Coverage is not anomalous at
that length — recent runs took 52, 45, 48 and 52 minutes. It is simply the longest job
in the pipeline, and it ran to completion on a change it cannot possibly be affected by.

Every workflow triggers on pull_request with no path filter and no job-level condition,
so every job runs on every PR regardless of what changed.

Verified before adding the filter rather than assumed:

- No markdown is compiled in. Zero include_str! of a .md anywhere in the tree.
- Every gate that scans the tree excludes markdown explicitly: --glob '!**/*.md' in
  no_clock_and_no_json.sh and bridge_contracts_gate.sh, --exclude='*.md' in
  check_forbidden_symbols.sh.
- The main-branch-protect ruleset requires deletion protection, non-fast-forward, a
  reviewed pull request and signed commits. It requires NO status checks. That matters
  because the usual trap with paths-ignore is a required check that never reports,
  leaving a PR permanently unmergeable. That cannot happen here.

Only '**/*.md' is filtered. docs/ also holds a JSON, a TeX source and two PDFs, and
those still run the full pipeline: "it lives under docs/" is not evidence that nothing
consumes it.

Mixed PRs are unaffected — paths-ignore only skips when every changed file matches, so
a PR touching code and docs together still runs everything.

CodeQL's scheduled and workflow_dispatch runs are deliberately NOT filtered; they remain
the full-tree scans. The PR filter is consistent with that file's own note that alerts
are already restricted to the PR diff, so a markdown-only PR reports nothing by
construction.

Both files were parsed after editing to confirm the triggers are still well-formed:
ci.yml 11 jobs, codeql.yml 1 job, filters on push and pull_request only.

This PR changes YAML rather than markdown, so it exercises the full pipeline itself.
@cryptskii
cryptskii merged commit 38d2e32 into main Sep 9, 2026
19 checks passed
@cryptskii
cryptskii deleted the ci/skip-the-full-pipeline-for-markdown-only-changes branch September 9, 2026 22:44
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