Fix conflict resolutions stranding the PR when its base branch moved#59
Merged
Merged
Conversation
Re-vendors git-merge-onto 0.2.0 and passes --absorbed in the action's re-parent and in the posted resolution command, so the result descends from the merged branch's tip and the PR stays mergeable (and its resume event firing) until it is retargeted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PHUVU3Ek3U9j3LrdjPnyAy
This was referenced Jul 4, 2026
Merged
Phlogistique
commented
Jul 6, 2026
Phlogistique
commented
Jul 6, 2026
Phlogistique
commented
Jul 6, 2026
Phlogistique
commented
Jul 6, 2026
Phlogistique
added a commit
that referenced
this pull request
Jul 6, 2026
Stacked on #59. A rebase merge lands the branch's content as new commits without merging its history, same as a squash spread over several commits. The old refusal reasons were specific to the merge dance, which merged `SQUASH_COMMIT~` and so could conflict against intermediate copies; the single-merge re-parent (#56) only reads the landed tip's tree, and with `--absorbed` (#59) the recorded parent is the merged branch's tip in both cases. So the squash path handles rebase merges as-is. This deletes the squash-vs-rebase detection (`is_rebase_merge` and its commit-PR association polling, the flakiest part of the action: the association is computed asynchronously and had to be waited for). The only case left to detect is a merge-commit merge, where the children already contain their parent's history and the action only retargets. `tests/test_rebase_merge_skip.sh`, which asserted the old refusal, becomes `tests/test_rebase_merge.sh` and asserts the update. --- _Generated by [Claude Code](https://claude.ai/code/session_01PHUVU3Ek3U9j3LrdjPnyAy)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@github.com>
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.
In scortexio/gh-stack-mv#36 a conflict resolution followed the posted instructions but the action never resumed and the conflict label stayed stuck. The resume rides on a
synchronizeevent, and GitHub creates nopull_requestruns for a PR that conflicts with its base. The PR did conflict with its base (the merged branch, kept until the resume retargets it): autorestack itself had advanced that branch when a grandparent PR merged, so the head no longer descended from its tip, and the resolution rewrote the same lines the squash reshaped, so GitHub's textual mergeability check failed too. The old merge dance guaranteed the descent structurally; the switch to git-merge-onto (#56) dropped that guarantee.This re-vendors git-merge-onto 0.2.0 with its new
--absorbedflag (scortexio/git-merge-onto#3) and passes it both in the action's own re-parent and in the posted resolution command. The merged branch's tip is recorded as an extra parent of the merge (on a conflict it rides along inMERGE_HEAD, so the user's plaingit commitrecords it), so the pushed resolution descends from its base again and the resume event is guaranteed to fire.New unit test replays the incident: parent advanced after the child forked, squash-merged, conflicting re-parent, resolution via the posted command; asserts the resolution descends from the old base's tip. The e2e gets the same assertion on its real conflict scenario.
Do not merge before git-merge-onto 0.2.0 is on PyPI: the posted command, which the e2e replays verbatim, runs
uvx 'git-merge-onto>=0.2'.Generated by Claude Code