Repository navigation
Stacked pull requests reach main after their base merges - #964
Merged
Merged
Conversation
When a pull request merges, the open pull requests based on its branch move to its base, the base is merged into each, and each is reviewed there. CoderHelm's merged branch is deleted once nothing is based on it. The merge gate never merges into a base that is the branch of an already merged pull request: it moves the pull request first and waits for the review. The pull request watch sweep moves what is still based on such a branch, and opens one "Land #N on main" pull request for a change CoderHelm merged into one in the last 30 days, unless main already holds it.
coderhelm
Bot
dismissed
their stale review
December 4, 2026 03:48
Superseded by CoderHelm's latest review
coderhelm
Bot
dismissed
their stale review
December 4, 2026 04:49
Superseded by CoderHelm's latest review
A branch whose pull request merged is still read while an open pull request comes from it, while it is protected, or once it was the head of more than one merged pull request (a develop released again and again). The merge gate, the merge handler and the watch sweep treat such a branch as live: nothing based on it is moved and no merge into it is lost. The merge gate follows the same rule as the sweep for a person's merged pull request: with retarget_stacked off it neither merges into the dead base nor moves the pull request, and holds it for a person to move. A landing's claim goes back when picking the change or opening its pull request fails, a landing branch left without a pull request is deleted, and one failure no longer stops the rest of the repository's sweep.
coderhelm
Bot
dismissed
their stale review
December 4, 2026 05:45
Superseded by CoderHelm's latest review
Contributor
|
💚 Post-merge health check passed: the deploy of
|
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.
Summary
A pull request stacked on another one could be merged into a branch nothing reads any more. When the first pull request merged and its branch stayed, GitHub left the stacked pull request on that branch, and the merge gate merged it there. The stacked pull request then showed as merged, but its change never reached the default branch.
Wider than the ticket: services/worker/src/passes/dead_base.rs: the defect is in how every stacked pull request's base is handled (on merge, at the gate and on the sweep), not in a lookup for a few named records, so the fix lives on those three paths.
Changes
stack_mergedworker message moves the open pull requests based on its branch to its base. This always happens for CoderHelm's own pull requests, and for a person's when the repository's newretarget_stackedsetting is on. The base is then merged into each moved pull request with GitHub's merge, which makes a signed commit; a conflict goes to the merge gate's own conflict path. Each one is reviewed again on its new base. CoderHelm's merged branch is deleted once nothing is based on it.retarget_stackedis off, it holds the pull request for a person to move instead of moving it.developreleased intomain). A merge from such a branch moves nothing based on it, and merges into it are never lost.xn_stacked_merge_reaches_main, with its page.Verification
develop, adevelopan open pull request comes from, and adevelopreleased twice all stay live: the gate merges into them, the sweep moves and lands nothing, and a release from them moves nothing based on them.cargo fmt --all --check,rustfmt --checkon the incident files, clippy with-D warnings, andcargo test -p common -p worker -p gatewayall pass.brand_spelling.pyanddomain_examples.pypass.