Skip to content

fix(ci): run Self test on every pull request, not a filtered subset - #4

Merged
azlekov merged 1 commit into
mainfrom
fix/self-test-every-pr
Aug 25, 2026
Merged

fix(ci): run Self test on every pull request, not a filtered subset#4
azlekov merged 1 commit into
mainfrom
fix/self-test-every-pr

Conversation

@azlekov

@azlekov azlekov commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The paths: filter listed the directories the checks live in, not the files the checks read. Two of them read more than that.

The hole

The preset check compares the README runner table against pick-runner.yml's case block. So README.md is an input to a check that the filter never triggered on:

paths:
  - 'actions/**'
  - '.github/workflows/**'
  - 'default.json5'
  # ... no README.md

A pull request editing only that table could put the two out of agreement with nothing running to notice. That is precisely the drift the check was added to catch.

It also blocks ever requiring this check

A filtered-out pull request produces no check run at all, and a required check that never reports blocks the merge forever. The same trap is already documented in react-doctor.yml, where the caller's positive paths: filter is the stated reason that workflow must never be made required.

No branch protection is being changed here. This just removes the reason it could not be added later.

The fix

The filter is gone, and the reason is written above the trigger so nobody adds it back as a saving:

# No `paths:` filter on purpose. The run takes about 15 seconds, and two of the
# checks read files a filter would have to list: the preset check compares the
# README runner table against the picker, so a README-only change can break it.
# A filter also makes this unusable as a required check, since a filtered-out
# pull request produces no check run at all and could never merge.
on:
  pull_request:

Fifteen seconds on a hosted runner is not worth optimising against correctness.

Verification

This pull request is its own test: it changes only .github/workflows/, which the old filter already covered, so a green run here proves nothing new. The behaviour change is visible in the trigger itself, and the next README-only pull request will run test where it previously ran nothing.

Suite green locally: agent-gate 28/28, sticky-comment 10/10, all YAML parses, shellcheck clean.

The `paths:` filter listed the directories the checks live in, not the files the
checks read. Two of them read more than that.

The preset check compares the README runner table against the picker's case
block, so the README is an input to a check that the filter never triggered on.
A pull request editing only that table could put the two out of agreement with
nothing running to notice, which is the exact drift the check exists to catch.

A filter is also incompatible with ever making this a required check. A
filtered-out pull request produces no check run at all, and a required check
that never reports blocks the merge forever. The same trap is already written
into react-doctor.yml, where the caller's positive `paths:` filter is the reason
that workflow must never be required.

So the filter is gone. The run takes about fifteen seconds on a hosted runner,
which is not worth optimising against correctness, and the reason is written
above the trigger so nobody adds it back as a saving.
@azlekov
azlekov merged commit df317d5 into main Aug 25, 2026
1 check passed
@azlekov
azlekov deleted the fix/self-test-every-pr branch August 25, 2026 19:35
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant