feat(ship): roll CHANGELOG [Unreleased] into a dated section on every release#491
Merged
Conversation
… release The drift fixed wholesale in #490 had a root cause: `just ship` bumped the workspace version but never touched CHANGELOG.md, so `## [Unreleased]` silently accumulated already-shipped work and every release in between went unrecorded. This makes the ship flow self-maintaining so it cannot drift again. - New `changelog` module in the ci-pipeline crate: pure, unit-tested `roll_unreleased(content, version, date)` moves the `## [Unreleased]` body under a fresh dated `## [vX.Y.Z]` header, leaves an empty `## [Unreleased]` for the next cycle, and repoints the Keep-a-Changelog footer compare-links ([Unreleased] -> vNEW...HEAD, adds [vNEW] -> vPREV...vNEW). - Wired into Phase 2 right after `bump_workspace_version`, before `git_commit` (`git add .`), so the rolled changelog lands in the same signed release commit. Gated by `version_incremented` and itself a no-op on an already-rolled file, so resumed ships never double-roll. - Soft no-ops: a missing CHANGELOG.md or an empty `## [Unreleased]` skip cleanly (no empty sections); only a changelog with no `## [Unreleased]` header at all is an error. - 6 unit tests: roll, empty no-op, idempotent re-run, missing-header error, footer-less roll, header parse. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The changelog drift fixed wholesale in #490 had a root cause:
just shipbumped the workspace version but never touchedCHANGELOG.md, so## [Unreleased]silently accumulated already-shipped work and every release in between went unrecorded. This makes the ship flow self-maintaining so it can't drift again.What
changelogmodule (scripts/ci-pipeline/src/changelog.rs) — pure, unit-testedroll_unreleased(content, version, date):## [Unreleased]body under a fresh dated## [vX.Y.Z]header## [Unreleased]for the next cycle[Unreleased]→vNEW...HEAD, adds[vNEW]→vPREV...vNEW)bump_workspace_version, beforegit_commit(git add .), so the rolled changelog lands in the same signed release commit. Gated byversion_incrementedand itself a no-op on an already-rolled file → resumed ships never double-roll.CHANGELOG.mdor an empty## [Unreleased]skip cleanly (no empty sections); only a changelog with no## [Unreleased]header at all is an error.Lint-clean under the full strict workspace stack (
.get()/iterators, nounwrap/expect/panic, every item documented).🤖 Generated with Claude Code