Skip to content

fix(release): release prepare folds [Unreleased] into an existing version section instead of leaving it behind #863

Closed as not planned

Description

@dan-petty

Context & Rationale

devops release prepare <version> writes the changelog through _update_changelog_header (src/devops_cli/commands/release.py:405-449). When ## [<version>] already exists (:416-422), it rebuilds only that section and returns. It never touches ## [Unreleased], so every entry written since the last release stays under "Unreleased" after the cut.

This will happen on the next cut. abe6bb5 (#683, for #682) added ## [0.2.24] - 2026-09-28 (CHANGELOG.md:67) while v0.2.24 was still in progress. Every v0.2.24 PR since then has written to [Unreleased] (CHANGELOG.md:8-66). release prepare 0.2.24 would put only #682's entries in the 0.2.24 section and leave the rest of the release under "Unreleased".

Scope & Deliverables

Strategic Alignment

Activity

  1. added
    type/bug
    priority/p1-high
    scope/release
    on Oct 1, 2026
  2. added
    priority/p2-medium
    and removed
    priority/p1-high
    on Oct 2, 2026
  3. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Grooming (2026-10-02): Priority p1-high → p2-medium. Today nothing triggers the bug. CHANGELOG.md has no early [0.2.25] header, and the current process avoids opening one, so the v0.2.25 manual cut is safe. After #743 lands, the defect only affects the manual fallback. The failure is silently misplaced release notes, with no data loss. If the owner wants the guard before the v0.2.25 cut, it is Low effort but would displace a v0.2.25 item.

    Checked against the code at the release/v0.2.25 tip.

  4. added a commit that references this issue on Oct 3, 2026
  5. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Closing as not planned: the premise no longer holds. Since #933, an item pull request adds a changelog.d/ fragment and readiness blocks CHANGELOG.md edits, so ## [Unreleased] stays empty (CHANGELOG.md:8 at release/v0.2.29). The branch this item describes (commands/release.py:687-693) runs only when there are no fragments (:776), so nothing is left behind, and fragments merge into an open version section (release/changelog_fragments.py:244-246). Reopen with a case if a repository still keeps a hand-written [Unreleased].

    Found by the 2026-10-08 backlog review.

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/p2-mediumscope/releasetype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions