From f4ce28d6463403e6bc431feb5df4157644193125 Mon Sep 17 00:00:00 2001 From: Hamza Tahir Date: Wed, 9 Sep 2026 09:45:49 +0200 Subject: [PATCH] Merge changelog entries with the union driver Every PR inserts its line directly under the same [Unreleased] heading, so any two PRs conflict on CHANGELOG.md even though both lines belong. The union merge driver keeps both sides on a local merge or rebase. GitHub's conflict check ignores merge drivers, so a PR can still show as conflicting until `git merge origin/develop` is run and pushed; the contributor guidance now says so and asks for a duplicate-line check, which union does not do. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01QAUAys8r9ZkczYYGnnJ5ae --- .gitattributes | 7 +++++++ CLAUDE.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 27ccc695f..0083cda1d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,10 @@ # pnpm-lock.yaml -> `pnpm install` (in the relevant subdir) uv.lock merge=binary docs/pnpm-lock.yaml merge=binary + +# Every PR inserts its changelog line directly under the same [Unreleased] +# heading, so two PRs conflict on that spot even though both lines belong. +# The union driver keeps both sides. It only applies to local merges and +# rebases; GitHub's conflict check ignores merge drivers, so a PR can still +# show as conflicting until `git merge origin/develop` is run and pushed. +CHANGELOG.md merge=union diff --git a/CLAUDE.md b/CLAUDE.md index 7d726a4a2..cd472343f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -119,7 +119,7 @@ For adapter, importer, specialized UI API, docs, CI, and release work, load the - **Single source of truth:** the `version` field in `pyproject.toml`. On `develop` it carries a `+dev` suffix. Only a release-preparation PR (see the `kitaru-release` skill) sets it to a release version, and the workflow's development-reset PR restores the `+dev` placeholder afterward. Do not change it in feature PRs. - **Never hardcode the version** in tests or application code. Use `importlib.metadata.version("kitaru")` to read it at runtime. -- **Update `CHANGELOG.md`** when making user-facing changes. Add entries under the `[Unreleased]` heading. The release-preparation PR converts `[Unreleased]` to a versioned heading (e.g. `[0.2.0] - 2026-04-01`), and the development-reset PR restores an empty `[Unreleased]` afterward. +- **Update `CHANGELOG.md`** when making user-facing changes. Add entries under the `[Unreleased]` heading. The release-preparation PR converts `[Unreleased]` to a versioned heading (e.g. `[0.2.0] - 2026-04-01`), and the development-reset PR restores an empty `[Unreleased]` afterward. `CHANGELOG.md` uses the `merge=union` driver (see `.gitattributes`), so a local `git merge origin/develop` keeps both sides when two PRs added lines under the same heading. GitHub's conflict check ignores merge drivers, so a PR that shows as conflicting only on the changelog is fixed by merging `develop` locally and pushing; after such a merge, check the `[Unreleased]` section for a duplicated line, which the union driver does not remove. - **Track deprecations in `DEPRECATIONS.md`** at the repository root, one entry per deprecated surface. ## Commits and PRs