🏗️🔧:read only the newest run of a check - #1851
Merged
Merged
Conversation
A pull request whose description is edited twice leaves two runs of the policy workflow on the same commit: the one that was cancelled for being superseded, and the one that replaced it. Both carry the same name, and the queue counted the cancelled one, so a passing check read as a failed one and the label could not land the branch. It now keeps the newest run of each name, which is the run GitHub itself reports beside the pull request. Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is> Assisted-by: Claude-Code:claude-opus-5
✅ Deploy Preview for gh-pages-openinf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
OpenINFbot
approved these changes
Aug 24, 2026
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.
#1846 could not be landed. The label reported
these did not pass: Title and description, while GitHub and the local verifier both reported that checkpassing.
Both were right. There are three runs of it on that commit:
pull-request-policy.ymlsetscancel-in-progress: true, which is correct —"a title is often fixed two or three times in a row. Only the last attempt is
worth reporting on." But a cancelled run stays on the commit next to the run
that replaced it, carrying the same name.
checksVerdictread every run, andcancelledis notsuccess,neutralorskipped, so a description editedtwice made the branch unlandable until somebody pushed a commit.
The fix
Keep the newest run of each name, which is the one GitHub reports beside the
pull request. Nothing else changes: a check whose newest run failed is still a
refusal, and anything still running still counts against it.
started_atcomes back from the same API call that already fetches the runs.Checks
nps testpasses, all 17. Two cases added tolanding.test.mts, one for thesuperseded run and one making sure a genuine failure in the newest run is
still caught. 24 tests pass.
Note
This is the second time a stale check run on a commit has blocked the queue.
The first was the queue's own
Landcheck, which it now excludes by run idand name. The shape is the same: something attached to the commit that no
longer describes the state of anything.