Repository navigation
fix(github): Give no merge ask after the merge queue's checks fail - #4783
Merged
Merged
Conversation
GitHub's merge state checks only the head commit, so a pull request that the merge queue removed for failed checks still reads clean, and the dequeued sync gave the requester a new merge ask. The next-action read now also reads the last merge queue removal. When its reason is failed_checks and nothing was pushed since, the pull request gets no merge ask. The next-action read moves to pull-request-merge-state.ts, because installation-requests.ts went over the file length limit. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Contributor
|
Found 1 test failure on Blacksmith runners: Failure
|
A force push can move the head to a commit that is older than the merge queue removal, so the head commit time alone kept the merge ask away. The same timeline read now also returns the last force push.
BYK
approved these changes
Nov 30, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
Not in this PR: after a failed queue run, Junior does not fix its own PR. The merge group's check suites run on gh-readonly-queue/*, not on the PR head, so pull_request.checks.failed does not fire. A follow-up handles it.
It is imperative that we fix this as otherwise these conflicting PRs will fall into limbo, not showing up anywhere.
This branch was successfully deployed
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.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-v2-3x.png)
#4589 closes the merge ask while a PR is in the merge queue and syncs it again on
dequeued. When the queue removes a PR because the merge group's checks failed, that sync gave the requester a new "Ready to merge" item. GitHub'smergeStateStatuschecks only the PR's head commit, so it still saysCLEAN.#4703 and #4698 show this. Each one was enqueued, the merge group's
lint / workspacefailed (two leaf Drizzle snapshots against the newmain), GitHub removed it with reasonfailed_checks, and a new merge item came about 3 seconds later. Merging again would fail the same way. The branch needs a push first.PullRequestNextActionquery also reads the last merge queue removal or force push (an aliasedtimelineItems(last: 1)in the same request). When it is a removal with reasonfailed_checksand the head commit is older than the removal,mergeQueueFailedis set andnextActiongives no merge ask.main, or a force push clears it, so the merge ask comes back once the checks pass. Other removals, such as a person taking the PR out, still let the merge ask come back.design/github.mdstates the rule in its own commit.installation-requests.tstopull-request-merge-state.ts, because the old file went over the 1,000-line limit. Its comment-length baseline entry moves with it.Not in this PR: after a failed queue run, Junior does not fix its own PR. The merge group's check suites run on
gh-readonly-queue/*, not on the PR head, sopull_request.checks.faileddoes not fire. A follow-up handles it.via @BYK.
--
View Session [Sentry]