Skip to content

release-doc-sync inserts new CHANGELOG entries above [Unreleased] and misdetects existing versions #108

Closed

Description

@TMHSDigital

Why it matters

release-doc-sync is a composite action that the whole fleet uses, and every tool repo's CHANGELOG goes through it. Ordering bugs therefore spread to every repo.

Evidence

  • scripts/release_doc_sync/sync.py:89: _CHANGELOG_FIRST_RELEASE_RE = r"^##\s*\[" also matches ## [Unreleased], so in a Keep a Changelog file the release stub is inserted above [Unreleased]. Reproduced with a 1.0.1 stub.
  • sync.py:131: the idempotency check is a plain substring test, f"[{plugin_version}]" in text. Prose such as "Upgrading to [2.0.0] soon." or a footer link ref [2.0.0]: https://... makes the action report idempotent and skip the stub.
  • _CHANGELOG_VERSION_RE (sync.py:88) is defined but never used.
  • tests/test_release_doc_sync.py has no test with an [Unreleased] section.

Suggested approach

  • Insert before the first ^## \[\d heading, after any [Unreleased] block.
  • Use _CHANGELOG_VERSION_RE to collect existing release headings, and compare against those exactly.
  • Add tests for the [Unreleased] position, version mentions in prose, and footer link refs.

Done when

  • The stub always lands directly below [Unreleased], or at the top when there is no [Unreleased] section.
  • Version detection only considers headings.

Activity

  1. added
    bug
    priority: medium
    on Oct 8, 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

    bugpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions