Skip to content

build(release): one changelog file per PR, assembled at release, so PRs stop conflicting on CHANGELOG.md #2113

Closed

Description

@nc9

Every user-visible PR adds a bullet to the same block of CHANGELOG.md (## [Unreleased]), so each merge puts every other open PR that has a bullet into conflict. On 2026-11-18, 43 open PRs touch that file. Each conflict costs a rebase and a full CI run, and PRs lose the race repeatedly: one approved PR was rebased for a CHANGELOG-only conflict twice in a day and still had not merged.

The change: a PR records its entry as its own small file, and the release tooling assembles those files into CHANGELOG.md. Two PRs then never edit the same lines.

Suggested shape (the implementer may refine it, the criteria below are what counts): a changelog.d/ folder, one Markdown file per change, with the section in the file name, for example changelog.d/3093-wcag-level.added.md, holding the bullet text exactly as it would have gone under ### Added.

Acceptance Criteria

  • A PR records a user-visible change by adding one file under changelog.d/ and does not edit CHANGELOG.md. Two PRs that each add a file merge in either order with no conflict.
  • The release tooling assembles every file into the new version's section of CHANGELOG.md, grouped under Added, Changed, Fixed, Security and Docs in a stable order, and removes the files in the same release change. Tests cover two entries in one section, an empty section, and a file with an unknown section name (which fails).
  • The changelog check in CI passes when a PR adds a file (or is contributor-only, as today) and fails when a PR edits CHANGELOG.md directly outside a release.
  • Every bullet under [Unreleased] on main at the switch is carried into the new scheme: none lost, none duplicated, and the PR states the count before and after.
  • Everything that reads [Unreleased] today keeps working or is updated, and the PR lists each consumer it found (at least scripts/check-released-changelog.sh, scripts/extract-changelog.awk, their tests and the release workflow).
  • One documented command prints the assembled unreleased section locally.
  • A script moves an open PR's existing CHANGELOG.md bullet into a file with the same text, so open PRs can be converted when they are next rebased.
  • AGENTS.md describes the new step in the new-rule checklist and in the PR rules, and the paragraph about CHANGELOG rebase conflicts is removed.

Approved by the maintainer on 2026-11-18, including the AGENTS.md change.

Activity

  1. added
    enhancement
    size: M
    on Nov 17, 2026
  2. added theissue type on Nov 19, 2026
  3. nc9 commented on Nov 21, 2026

    @nc9
    ContributorAuthor

    Acceptance check on public main 53ea191. All 8 criteria PASS. Shipped in #2119.

    1. One file per PR, no CHANGELOG.md edit: PASS. changelog.d/README.md, AGENTS.md:152 and :236. bun scripts/changelog.ts check -> "changelog.d/ OK (3 entries)".
    2. Assembly, stable order, files removed, tests for two entries, empty section, unknown section: PASS. scripts/changelog.ts, scripts/changelog.test.ts; bun test scripts/changelog.test.ts scripts/release-version.test.ts -> 36 pass, 0 fail. Release f50d1ad removed 20 entry files.
    3. Guard passes for an added file or contributor-only change, fails for a direct edit: PASS. scripts/check-changelog-entries.sh via check-released-changelog.sh; bash scripts/test-changelog-entries.sh -> OK.
    4. [Unreleased] bullets carried over: PASS. build(release): one changelog file per PR in changelog.d/, assembled at release #2113 #2119 body states 22 bullets before, 22 files after, empty diff.
    5. Consumers updated and listed: PASS. build(release): one changelog file per PR in changelog.d/, assembled at release #2113 #2119 lists check-released-changelog.sh, extract-changelog.awk, release.yml, release.ts, ci-classify.sh and tests; bash scripts/test-changelog-extraction.sh -> OK.
    6. Preview command: PASS. bun run changelog prints the assembled ## [Unreleased] section.
    7. Conversion script: PASS. bun run changelog:convert, covered in changelog.test.ts.
    8. AGENTS.md updated, rebase-conflict paragraph removed: PASS. Lines 152 and 236; grep for changelog rebase text finds nothing.

    The optional ci.yml step is moot: GitHub Actions workflows are disabled, and the CI controller's quality part already runs the changelog guard (step changelog-guard).

    nik

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

    cienhancementsize: M

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions