Skip to content

chore: union-merge CHANGELOG.md to stop parallel PRs conflicting - #319

Merged
kkozik-amplify merged 1 commit into
mainfrom
chore/changelog-union-merge
Aug 25, 2026
Merged

chore: union-merge CHANGELOG.md to stop parallel PRs conflicting#319
kkozik-amplify merged 1 commit into
mainfrom
chore/changelog-union-merge

Conversation

@kkozik-amplify

Copy link
Copy Markdown
Collaborator

Why

Every change adds a bullet to the same Unreleased / Fixed list, so any two open PRs conflict on CHANGELOG.md even when they touch nothing else in common.

Across the five open fix PRs (#311, #312, #313, #317, #318) that accounted for four of the seven conflict resolutions needed to land them — more than the two real source conflicts combined. It is pure busywork: no two of those PRs ever edited the same CHANGELOG line.

What

One line, plus a comment explaining it:

CHANGELOG.md merge=union

union is a built-in git merge driver, so no merge.<driver>.driver config is needed on anyone's machine.

Scope — please read before expecting too much

Git honours this for local merges and rebases. GitHub's web UI does not read .gitattributes merge drivers, so:

  • the merge button still will not auto-resolve a CHANGELOG conflict
  • the "this branch has conflicts" banner is unchanged

The benefit lands when a branch is updated locally and pushed, which is how the open PRs are being brought up to date. This limitation is noted in the file itself so the next reader is not misled.

Trade-off

If two branches genuinely edit the same CHANGELOG line — say both reword an existing entry — union keeps both versions rather than flagging a conflict. For an append-only list of release notes that is a good trade, but it is a real behaviour change worth knowing about.

Test plan

Verified against a real open PR rather than a synthetic case. With this commit as the base, merging #313 drops its conflicts:

base conflicts when merging #313
main CHANGELOG.md, test/unit/test_api.py
main + this change test/unit/test_api.py

Also exercised earlier across all five open PRs merged in sequence: all four CHANGELOG conflicts disappeared, and the resulting Unreleased section contained every entry in merge order with no duplication and no leftover markers.

No code paths touched; the full suite is unaffected.

Every change adds a bullet to the same "Unreleased / Fixed" list, so any
two open PRs conflict on CHANGELOG.md even when they touch nothing else
in common. Across the five currently open fix PRs that accounted for four
of the seven conflict resolutions needed to land them.

The built-in union driver keeps both sides. Verified against the open
PRs: merging #313 onto main with this in place drops its conflicts from
{CHANGELOG.md, test_api.py} to {test_api.py}.

Scope: git honours this for local merges and rebases. GitHub's web UI
does not read .gitattributes merge drivers, so the merge button and the
conflict banner are unchanged; the benefit is when resolving locally,
which is how these PRs are being updated. Noted in the file so the next
reader does not expect otherwise.

Trade-off: if two branches genuinely edit the same CHANGELOG line, union
keeps both versions instead of flagging it. For an append-only list that
is a good trade.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kkozik-amplify
kkozik-amplify requested a review from a team as a code owner August 24, 2026 16:58
@kkozik-amplify
kkozik-amplify merged commit f7531ef into main Aug 25, 2026
8 checks passed
@kkozik-amplify
kkozik-amplify deleted the chore/changelog-union-merge branch August 25, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants