From 612ad8f84d13a35028815403294ebc614b42d2b5 Mon Sep 17 00:00:00 2001 From: DoubleGate Date: Wed, 19 Aug 2026 16:17:51 -0400 Subject: [PATCH] fix(ci): the docs-only skip has never worked -- negations need `every` `dorny/paths-filter`'s `predicate-quantifier` defaults to `some`, which includes a file if it matches ANY pattern in the filter. The `code` filter is `'**'` followed by seven exclusions, so `'**'` matches everything and every `!` line under it has been dead since the filter was written. The action's README states it outright: under `some`, negation syntax is ineffective. Proven from a run, not from the docs. PR #416 changed exactly one file, `AGENTS.md`, and the filter job's log reads: [modified] AGENTS.md Filter code = true Matching files: AGENTS.md [modified] A markdown file matched a filter whose whole purpose is to exclude markdown. Every documentation PR in this repository's history has therefore run the full code matrix -- fmt/clippy/rustdoc, wasm32, no_std and all four ARM cross-compiles -- and today two docs-only PRs (#414, #416) were blocked by a flaky apt provision for jobs that should never have been scheduled at all. Fixed with TWO filter steps rather than one, because `predicate-quantifier` is a step-level input and the two filters need opposite settings. `code` is one positive pattern plus exclusions, so it needs `every`. `accuracy` must keep the default: its eight patterns are ALTERNATIVES -- a file lives in one of those trees, never in all eight -- so `every` would make it unsatisfiable and silently disable the accuracy battery at review time, which is the gate A5 exists to add. Putting both filters in one step is exactly how the bug got here, and one quantifier cannot serve both. Verification is asymmetric and worth stating plainly. That the bug exists is proven by the log above. That the fix works is NOT yet proven: this PR touches `.github/workflows/ci.yml`, so it is correctly a code change and cannot demonstrate a skip. The demonstration is rebasing a docs-only PR onto this and observing `code = false` -- #414 and #416 are both available and both currently show the opposite. --- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b9751d7..400457d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,8 +105,8 @@ jobs: contents: read pull-requests: read outputs: - code: ${{ steps.filter.outputs.code }} - accuracy: ${{ steps.filter.outputs.accuracy }} + code: ${{ steps.filter-code.outputs.code }} + accuracy: ${{ steps.filter-accuracy.outputs.accuracy }} steps: # Full history: on `push`, dorny/paths-filter diffs against the before-SHA # using local git, so the default shallow clone (fetch-depth: 1) can miss @@ -126,9 +126,26 @@ jobs: with: fetch-depth: 0 persist-credentials: false + # TWO filter steps, not one, because `predicate-quantifier` is a STEP-level + # input and the two filters need opposite settings. + # + # `code` is one positive pattern plus exclusions, so it needs `every`: + # under the default `some` a file is included if it matches ANY pattern, + # `'**'` matches everything, and every `!` line below it is dead. The + # action's README says so outright — "under some, negation syntax is + # ineffective". + # + # That is not theoretical. Until v2.3.9 both filters shared one step on the + # default, so the docs-only skip NEVER worked: PR #416 changed exactly one + # file, `AGENTS.md`, and the filter log reads + # `Filter code = true / Matching files: AGENTS.md`. Every documentation PR + # in this repo's history has run the full code matrix, including the ARM + # cross-compiles, and two docs PRs were blocked by a flaky apt provision + # for jobs that should never have been scheduled. - uses: dorny/paths-filter@v4 - id: filter + id: filter-code with: + predicate-quantifier: every filters: | code: - '**' @@ -139,6 +156,14 @@ jobs: - '!NOTICE' - '!.gitignore' - '!.codegraph/**' + # `accuracy` keeps the DEFAULT quantifier, and must. Its patterns are + # alternatives — a file lives in one of these trees, never in all eight — + # so `every` would make it unsatisfiable and silently disable the accuracy + # battery at review time, which is the gate A5 exists to add. + - uses: dorny/paths-filter@v4 + id: filter-accuracy + with: + filters: | # v2.3.9 A5 — paths that can move an accuracy or visual vector. # # `test-roms` used to be FULL-run only, so a regular feature PR never