fix(ci): run Self test on every pull request, not a filtered subset - #4
Merged
Conversation
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.
|
🎉 This PR is included in version 1.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'scaseblock. SoREADME.mdis 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. 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 positivepaths: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:
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 runtestwhere it previously ran nothing.Suite green locally: agent-gate 28/28, sticky-comment 10/10, all YAML parses, shellcheck clean.