fix(release): preserve aqua-registry sections in changelog across releases#8047
fix(release): preserve aqua-registry sections in changelog across releases#8047
Conversation
…eases git cliff -o regenerated the entire CHANGELOG.md from git history, wiping out previously injected aqua-registry sections. Switch to --unreleased --prepend to only add the new release entry while preserving existing content. Also fix missing blank line separators between the injected aqua section and adjacent release headers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses two key issues in the release process related to Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
Updates the release automation to preserve previously injected aqua-registry changelog sections when generating new releases, while also fixing formatting between injected sections and release headers.
Changes:
- Switch changelog generation to prepend only the new release entry instead of regenerating the entire file.
- Add explicit blank lines around injected aqua-registry sections to ensure proper separation/formatting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| git cliff --tag "v$version" -o CHANGELOG.md | ||
| # Use --unreleased --prepend to only add the new release entry, preserving existing content | ||
| # (including previously injected aqua-registry sections from older releases) | ||
| git cliff --tag "v$version" --unreleased --prepend CHANGELOG.md |
There was a problem hiding this comment.
git cliff previously wrote to CHANGELOG.md via -o CHANGELOG.md, but the updated command relies on --prepend CHANGELOG.md without an explicit output flag or redirection. In many git-cliff versions, --prepend affects how output is combined with an existing file but does not itself imply an output destination, which can result in the changelog being printed to stdout instead of updating CHANGELOG.md. To make the behavior unambiguous, write explicitly (e.g., add -o CHANGELOG.md and keep --prepend CHANGELOG.md, or redirect stdout to CHANGELOG.md if that matches the intended semantics).
| git cliff --tag "v$version" --unreleased --prepend CHANGELOG.md | |
| git cliff --tag "v$version" --unreleased --prepend CHANGELOG.md -o CHANGELOG.md |
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the issue of CHANGELOG.md being overwritten during releases by switching git cliff to prepend new entries. The changes also fix formatting issues by ensuring there are blank lines around the injected aqua-registry sections. The logic in the xtasks/release-plz script is sound and the changes are well-implemented. I have no further suggestions, great work!
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.6 x -- echo |
21.3 ± 0.7 | 20.1 | 29.4 | 1.00 |
mise x -- echo |
21.6 ± 0.9 | 20.4 | 28.3 | 1.01 ± 0.05 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.6 env |
21.1 ± 0.9 | 19.3 | 27.0 | 1.00 |
mise env |
21.7 ± 0.8 | 20.1 | 23.8 | 1.03 ± 0.06 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.6 hook-env |
21.5 ± 0.5 | 20.4 | 23.1 | 1.00 |
mise hook-env |
22.1 ± 0.8 | 20.7 | 28.2 | 1.03 ± 0.04 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.6 ls |
19.5 ± 0.7 | 18.3 | 25.1 | 1.00 |
mise ls |
19.6 ± 0.8 | 18.6 | 29.5 | 1.01 ± 0.05 |
xtasks/test/perf
| Command | mise-2026.2.6 | mise | Variance |
|---|---|---|---|
| install (cached) | 113ms | 114ms | +0% |
| ls (cached) | 72ms | 72ms | +0% |
| bin-paths (cached) | 77ms | 77ms | +0% |
| task-ls (cached) | 540ms | 543ms | +0% |
### 🚀 Features - **(shim)** add native .exe shim mode for Windows by @jdx in [#8045](#8045) ### 🐛 Bug Fixes - **(install)** preserve config options and registry defaults by @jdx in [#8044](#8044) - **(link)** linked versions override lockfile during resolution by @jdx in [#8050](#8050) - **(release)** preserve aqua-registry sections in changelog across releases by @jdx in [#8047](#8047) - ls --all-sources shows duplicate entries by @roele in [#8042](#8042) ### 📚 Documentation - replace "inherit" terminology with config layering by @jdx in [#8046](#8046) ### 📦 Registry - switch oxlint to npm backend by default by @risu729 in [#8038](#8038) - add orval (npm:orval) by @zdunecki in [#8051](#8051) ### New Contributors - @zdunecki made their first contribution in [#8051](#8051)
…eases (jdx#8047) ## Summary - `git cliff -o` was regenerating the entire CHANGELOG.md from git history, which wiped out previously injected aqua-registry sections from older releases (since those sections come from the AWK injection, not git commits) - Switched to `git cliff --unreleased --prepend` to only add the new release entry while preserving all existing content - Fixed missing blank line separators between injected aqua sections and adjacent release headers (bash `$()` strips trailing newlines, so AWK's `print` alone wasn't enough) ## Test plan - [ ] Verify next release preserves aqua-registry sections from previous releases in CHANGELOG.md - [ ] Verify blank line formatting between aqua section and next release header 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Small change to release automation affecting changelog formatting only; low blast radius, but could impact CI release output if the `git cliff` invocation behaves differently than expected. > > **Overview** > Updates `xtasks/release-plz` to generate changelog entries by *prepending* the new release (`git cliff --unreleased --prepend CHANGELOG.md`) instead of regenerating the entire file, preventing loss of previously injected `aqua-registry` sections. > > Tweaks the AWK injection that appends the `aqua-registry` changelog block to ensure a blank line separator is inserted before adjacent release headers (and when appending at EOF). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit cb9b368. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
### 🚀 Features - **(shim)** add native .exe shim mode for Windows by @jdx in [jdx#8045](jdx#8045) ### 🐛 Bug Fixes - **(install)** preserve config options and registry defaults by @jdx in [jdx#8044](jdx#8044) - **(link)** linked versions override lockfile during resolution by @jdx in [jdx#8050](jdx#8050) - **(release)** preserve aqua-registry sections in changelog across releases by @jdx in [jdx#8047](jdx#8047) - ls --all-sources shows duplicate entries by @roele in [jdx#8042](jdx#8042) ### 📚 Documentation - replace "inherit" terminology with config layering by @jdx in [jdx#8046](jdx#8046) ### 📦 Registry - switch oxlint to npm backend by default by @risu729 in [jdx#8038](jdx#8038) - add orval (npm:orval) by @zdunecki in [jdx#8051](jdx#8051) ### New Contributors - @zdunecki made their first contribution in [jdx#8051](jdx#8051)
Summary
git cliff -owas regenerating the entire CHANGELOG.md from git history, which wiped out previously injected aqua-registry sections from older releases (since those sections come from the AWK injection, not git commits)git cliff --unreleased --prependto only add the new release entry while preserving all existing content$()strips trailing newlines, so AWK'sprintalone wasn't enough)Test plan
🤖 Generated with Claude Code
Note
Low Risk
Small change to release automation affecting changelog formatting only; low blast radius, but could impact CI release output if the
git cliffinvocation behaves differently than expected.Overview
Updates
xtasks/release-plzto generate changelog entries by prepending the new release (git cliff --unreleased --prepend CHANGELOG.md) instead of regenerating the entire file, preventing loss of previously injectedaqua-registrysections.Tweaks the AWK injection that appends the
aqua-registrychangelog block to ensure a blank line separator is inserted before adjacent release headers (and when appending at EOF).Written by Cursor Bugbot for commit cb9b368. This will update automatically on new commits. Configure here.