Skip to content

🏗️🔧:read only the newest run of a check - #1851

Merged
openinf-commit-queue[bot] merged 1 commit into
livefrom
fix/superseded-check-runs
Aug 24, 2026
Merged

🏗️🔧:read only the newest run of a check#1851
openinf-commit-queue[bot] merged 1 commit into
livefrom
fix/superseded-check-runs

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

#1846 could not be landed. The label reported these did not pass: Title and description, while GitHub and the local verifier both reported that check
passing.

Both were right. There are three runs of it on that commit:

Title and description   cancelled   02:03:54
Title and description   success     02:03:58
Title and description   success     02:14:56

pull-request-policy.yml sets cancel-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. checksVerdict read every run, and
cancelled is not success, neutral or skipped, so a description edited
twice 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_at comes back from the same API call that already fetches the runs.

Checks

nps test passes, all 17. Two cases added to landing.test.mts, one for the
superseded 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 Land check, which it now excludes by run id
and name. The shape is the same: something attached to the commit that no
longer describes the state of anything.

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
@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit c9bea1f
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a8baac0b29bc80008cc0185
😎 Deploy Preview https://deploy-preview-1851--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@OpenINFbot OpenINFbot added the 🚀 Status: Commit Queue Land this pull request when its checks pass label Aug 24, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit 8a4b6e8 into live Aug 24, 2026
15 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the 🚀 Status: Commit Queue Land this pull request when its checks pass label Aug 24, 2026
@OpenINFbot
OpenINFbot deleted the fix/superseded-check-runs branch August 24, 2026 02:25
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.

2 participants