Skip to content

next-reset: hotfix merge of master into next always conflicts on the package.json version #334

Closed

Description

@Shinrai

Problem

After a hotfix release, workflow-next-reset.yml merges master into next through merge-master-into-branch, using the GitHub Merges API. Whenever next has queued work, this merge conflicts:

  • next-release has already bumped next's package.json / package-lock.json version (e.g. 0.4.0).
  • The hotfix release bumped master to the patch version (e.g. 0.3.3).

Both sides changed the same "version" lines from the common base, so the Merges API returns 409. merge-master-into-branch treats that as a failure ("manual resolution required"). next is then left without master's release commit, and the persistent next → master release PR shows merge conflicts until someone merges by hand.

This happens on every hotfix released while a next release is pending, i.e. it is the normal case the hotfix-merge path exists for.

Real occurrence

CLDMV/gh-broker, 2026-09-28: hotfix v0.3.3 (#72) landed on master while next carried v0.4.0. The release PR #59 went dirty. A trial merge showed the only conflicts were the three "version" lines (package.json + both in package-lock.json). I resolved it by hand: merged master into next and kept next's 0.4.0 (b04edfd).

Expected

The hotfix merge should succeed on its own when the only conflicts are the version fields. next's version should win, because next-release recomputes the pending release version from master anyway. Any other conflict should still fail loudly, as today.

Suggested fix

In merge-master-into-branch (or a step after it), when the API returns 409, fall back to a local git merge. If every conflicted hunk is a "version" line in package.json / package-lock.json (the root version and packages[""].version), resolve those with next's side, then commit and push the merge commit bot-signed. Otherwise abort and fail as today. Cover it with tests using the real conflict shape above.

Activity

  1. added
    type: bug
    priority: high
    status: confirmed
    type: ci
    on Sep 28, 2026
  2. cldmv-bot commented on Sep 28, 2026

    @cldmv-bot
    Contributor

    Closed in v4.29.4 — resolved by #335.

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: highstatus: confirmedtype: bugtype: ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions