Verify the changelog in the same mode that generates it

Merged
UN
4mo ago
+27-4

What this fixes

The daily release generated CHANGELOG.md with --mode prepend --since-previous-tag --until-release-tag, while the CI gate verified it. The two renderings legitimately disagree, so the gate was structurally unsatisfiable rather than merely failing — no regeneration could ever close the diff.

They differ in two ways:

  • Ordering — replace mode with --all-release-tags assigns items carrying an explicit release: field to that release window and hoists them; prepend mode orders purely by completion timestamp.
  • Selection — replace mode emits an ## Unreleased section for closed-but-unreleased work, which prepend mode with --until-release-tag structurally cannot produce.

This surfaced as a hard CI failure in pm-changelog (identical entries, reordered). A fleet sweep found the same latent mismatch in five repositories; this is pm-github's share.

Changes

  • changelog:check now delegates to npm run changelog:full -- --check, so the gate verifies the exact rendering that produces the artifact and the two cannot drift apart.
  • .github/workflows/release.yml generates and checks CHANGELOG.md with --mode replace --all-release-tags, keeping every other flag unchanged.
  • The release-notes --stdout line is deliberately left windowed (--since-previous-tag --until-release-tag) — notes are scoped to the new release by design.
  • CHANGELOG.md regenerated after closing the item.

Verification

  • npm run changelog:check passes with a clean working tree.
  • Build, typecheck and the full test suite pass.

pm item

Summary by Sourcery

Align changelog generation and verification so CI checks the same rendering used for release artifacts.

New Features:

  • Add pm item and history entries for issue pm-github-8f60.

Bug Fixes:

  • Ensure changelog verification in CI matches the replace-mode, all-release-tags generation to avoid unsatisfiable diffs.

Enhancements:

  • Update npm changelog:check script to delegate to the full replace-mode changelog command with check enabled.
  • Regenerate CHANGELOG.md to record the convergence of changelog generation and verification configuration.

CI:

  • Adjust release workflow to generate and validate CHANGELOG.md using replace mode across all release tags while keeping release notes scoped to the current window.

Summary by cubic

Aligns changelog generation and CI verification to the same replace-mode render, and removes the old prepend script. This makes CI check exactly what we ship and prevents unsatisfiable diffs.

  • Bug Fixes

    • changelog:check now runs npm run changelog:full -- --check to verify the full replace-mode output.
    • Updated .github/workflows/release.yml to generate and check with --mode replace --all-release-tags; kept release notes windowed (--since-previous-tag --until-release-tag).
  • Refactors

    • Removed the unused prepend changelog script; changelog:full is now the single generator the gate verifies.