Skip to content

next-reset wipes PRs merged into next during the post-release reset window #360

Description

@Shinrai

Problem

After a next → master release squash-merges, the next-reset step force-resets next to the new master commit. A PR that merges into next in the seconds between the release merge and that reset is wiped: its merge commit disappears from next, it isn't in the release that just shipped, and it isn't in any later one. The PR still shows as merged, so nobody notices.

Three cases found on 2026-10-04 while backfilling changelogs:

Related but different: #278 was the next-reset lane bug that reset next on every hotfix. This one is a race in the normal next → master path. It mostly hits Dependabot and bot auto-merges, which fire as soon as their checks pass and so often land right after a release.

Fix ideas

  • Before force-resetting, compare next with the release's squash source: only reset when next's tip is the commit the release PR was built from (no extra commits). If next has moved, merge master into next (or rebase the extra commits onto master) instead of resetting.
  • Or make the reset atomic against the expected tip: git push --force-with-lease=next:<release head sha>. The push is then rejected if anything landed meanwhile, and the step falls back to a merge.
  • Hold auto-merge into next while a release merge is in progress (a lock or concurrency group shared with the reset).
  • Whatever the fix, report any commits that would have been dropped (in the run summary, or as a comment on each affected PR) so a lost merge is never silent.

Also check other v4 consumers for the same loss: a merged PR into next whose merge commit isn't reachable from next or master.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highNeeds attention soon — not blocking, but don't let it sitstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: bugSomething is broken or not behaving as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions