Repository navigation
A delivery no longer polls forever when GitHub never refreshes the PR after a push - #2444
Merged
Merged
Conversation
The merge gate deferred forever when GitHub's PR view never picked up the runner's push: the incident (orbi-cloud#3953) polled `mergeable=UNKNOWN` with a stale `head.sha` for 8.5 hours, with no stop and no comment. The gate now compares the PR's recorded head with `origin/<branch>` at its UNKNOWN-mergeability deferral and, when the head lags, asks GitHub to update the pull request branch itself (`PUT /pulls/<n>/update-branch` with the branch tip as `expected_head_sha` — the documented value, and the one the manual attempt got wrong with a 422). GitHub re-reads the branch and the delivery continues on the refreshed head. The attempt is bounded to three ticks (`PR_HEAD_REFRESH_TICKS`), counted in the delivery's run state; past the bound the run stops `ai-blocked` with a comment naming the cause (GitHub did not refresh the PR) and the repair (a new commit on the branch, or the PR's "Update branch" button). A PR whose head IS the branch tip with a briefly UNKNOWN mergeability is waited on exactly as before, and an unreadable tip or an absent run state never starts an uncounted refresh loop. Fixes #2440
…2440) The update-branch request is a network mutation: it now carries the same bounded timeout every other gh call in the runner has (Issue #95), and a request that outlasts it spends its tick exactly like a rejected one. An unreadable branch tip used to clear the counted scene, so each flaky read reset the three-tick bound and a stale PR could poll past it. A failed probe is not a verdict about the PR: it now leaves the count (and the bound it carries) untouched.
Contributor
Author
|
✅ Orbi 已交付 · 查看交付证明 → |
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.
Fixes #2440
A delivery no longer polls forever when GitHub never refreshes the PR after a push (run_id=9ddfb214)
Built by Orbi from Issue #2440