Skip to content

fix(release): changelog fragments so concurrent pull requests never conflict on CHANGELOG.md or docs/ROADMAP.md #933

Closed

Description

@dan-petty

Problem

Every pull request into a release branch adds its entries at the top of ## [Unreleased] in CHANGELOG.md, and most also tick their entry in docs/ROADMAP.md. Two open PRs therefore always edit the same lines. Each merge makes every other open PR conflict, and each one has to be rebased, pass the pre-push gate again and run GitHub CI again. The release ruleset has no "up to date with base" rule, so these shared files are the only reason PRs into release/* need a rerun after a merge.

In v0.2.25 this happened three times in one hour:

Each conflict was CHANGELOG.md, plus a task file one PR edited and another deleted.

Proposal

  • Fragments. A PR into release/* adds its changelog entry as changelog.d/<issue>.md, a new file with a unique name that never conflicts. The fragment holds the house-style entries under ### Added, ### Changed, ### Deprecated, ### Removed, ### Fixed or ### Security.
  • Collection at the cut. The cut (the code path that writes the version's section today, _update_changelog_header in commands/release.py) gathers every fragment. It merges entries per category, in Keep a Changelog order and in issue-number order within each category, into ## [X.Y.Z] - <date>, then deletes the fragments in the same change. ## [Unreleased] stays as an empty heading.
  • Migration. This PR moves the entries now under ## [Unreleased] into fragments, one file per issue.
  • Enforcement. One more entry in the readiness grounding table (feat(github): pr readiness requires an issue-linked, completed task file #704) blocks a PR into a release/* branch that changes CHANGELOG.md or docs/ROADMAP.md. Bootstrap and cut PRs are exempt. docs/ROADMAP.md has been generated by devops roadmap render at the cut since feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate, render) #739, so ticking it in a PR only causes conflicts.
  • Rules. AGENTS.md, docs/agent/tasks/README.md, the PR template and docs/RELEASE_CYCLE.md say "add changelog.d/<issue>.md; do not edit CHANGELOG.md or docs/ROADMAP.md".

Acceptance criteria

  • tests/ has offline tests for collection:
    • Three fragments with overlapping categories become one version section, with categories in order and entries in issue order.
    • The fragments are deleted.
    • A fragment with an unknown ### category, or with text outside a category, stops the cut before any write and names the file.
    • Running with no fragments leaves the section as the current code builds it.
  • The readiness check blocks a PR into release/v0.2.25 whose changed files include CHANGELOG.md or docs/ROADMAP.md, naming the file. It passes the same PR without them, and passes the cut and bootstrap PRs (tests stub run_gh, as feat(github): pr readiness requires an issue-linked, completed task file #704's do).
  • CHANGELOG.md on the branch has an empty ## [Unreleased], and changelog.d/ holds one fragment per issue that had entries there.
  • uv run devops ci passes.

Key questions

  • A tool (towncrier, scriv) or the existing release code? The existing code (proposed). devops release already writes CHANGELOG.md at the cut, so collection is one function there. towncrier splits one item's entry into a file per category and needs its own template to keep the house style.
  • How does the cut and bootstrap exemption work? The same way feat(github): pr readiness requires an issue-linked, completed task file #704 exempts the release PR: the head branch is release/vX.Y.Z into the default branch. A bootstrap PR's head is chore/open-vX.Y.Z (proposed), matched by a constant pattern.
  • Generated docs (README.md matrix, docs/CLI_REFERENCE.md, docs/commands/*.md)? Out of scope. They conflict only when two PRs change the same command group, and the fix is to regenerate.

Activity

  1. added this to the v0.2.25 milestone on Oct 2, 2026
  2. added
    type/bug
    scope/cli
    priority/p0-critical
    on Oct 2, 2026
  3. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Closed by #937, merged into release/v0.2.25.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Oct 3, 2026
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/p0-criticalscope/clitype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions