feat(release): list aqua package additions/updates in changelog#9471
feat(release): list aqua package additions/updates in changelog#9471
Conversation
The release PR description was previously listing the aqua-registry release tags rolled into a mise release, which reads as opaque version noise to users. Restore the prior pre-#9043 behavior of listing the individual added and updated packages instead, but make it work against the merged registry.yaml that #9043 introduced: fetch the previous tag's registry.yaml from upstream, parse both files by canonical package id (name | repo_owner/repo_name | path), and emit New Packages / Updated Packages sections. Linking only resolves repo_owner/repo_name ids to GitHub URLs so name-only ids (e.g. kiro.dev/kiro-cli) don't render as broken links. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Greptile SummaryThis PR replaces the changelog generation mechanism for aqua-registry updates: instead of listing opaque aqua-registry release tags, it now fetches the upstream Confidence Score: 5/5Safe to merge — replaces opaque release-tag listing with a correct package-level diff; fail-soft guards and the No P0 or P1 issues found. The inline Python parses registry.yaml with the same canonical-ID logic as the Rust build script, the heading hierarchy is correctly derived ( No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant RP as xtasks/release-plz
participant SC as gen-aqua-changelog.sh
participant GH as raw.githubusercontent.com
participant PY as python3 (inline)
participant LR as local registry.yaml
RP->>SC: gen-aqua-changelog.sh OLD_TAG NEW_TAG "###"
SC->>SC: guard: empty/equal tags → exit 0
SC->>SC: guard: local registry.yaml missing → exit 0
SC->>GH: curl registry.yaml @ OLD_TAG
GH-->>SC: old registry.yaml (tempfile)
SC->>PY: python3 - old_path new_path heading
PY->>PY: parse(old_path) → {id: (github_repo, block)}
PY->>LR: parse(new_path) → {id: (github_repo, block)}
LR-->>PY: package map
PY->>PY: added = new_ids - old_ids
PY->>PY: updated = shared_ids where block differs
PY-->>SC: markdown output (or exit 0 if no changes)
SC-->>RP: changelog section string
RP->>RP: inject into CHANGELOG.md and PR body
Reviews (2): Last reviewed commit: "fix(release): strip yaml inline comments..." | Re-trigger Greptile |
The aqua-registry sub-section headings were hardcoded to `####`, which skipped a level (`##` → `####`) when xtasks/release-plz invoked the script with `"##"` for the PR body. Derive the sub-heading by appending `#` to the supplied heading so hierarchy stays consistent for both CHANGELOG.md (`###`/`####`) and the PR body (`##`/`###`). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request refactors the gen-aqua-changelog.sh script to generate a detailed list of added and updated packages by comparing registry.yaml files between tags. The script now uses an embedded Python block to manually parse the YAML content. Review feedback suggests refining the parsing logic to properly handle trailing comments, which could otherwise cause incorrect package identification or false positives in the changelog.
| # field also appears inline on the ' - ' line itself. | ||
| fields: dict[str, str] = {} | ||
| first_line, _, rest = body.partition('\n') | ||
| m = re.match(r'(name|repo_owner|repo_name|path|type):\s*(.*?)\s*$', first_line) |
There was a problem hiding this comment.
The regex used to extract YAML field values will capture trailing comments if they exist on the same line (e.g., name: foo # comment). This can lead to incorrect package IDs and false positives in the 'Updated Packages' section if comments are modified. Consider stripping comments from the value before processing.
| def strip_quotes(v: str) -> str: | ||
| v = v.strip() | ||
| if len(v) >= 2 and v[0] == v[-1] and v[0] in ("'", '"'): | ||
| return v[1:-1] | ||
| return v |
There was a problem hiding this comment.
The strip_quotes function is naive and will fail to strip quotes if there is a trailing comment on the line, as the last character won't be a quote. It's better to handle comment stripping first.
| def strip_quotes(v: str) -> str: | |
| v = v.strip() | |
| if len(v) >= 2 and v[0] == v[-1] and v[0] in ("'", '"'): | |
| return v[1:-1] | |
| return v | |
| def strip_quotes(v: str) -> str: | |
| v = v.split(' #')[0].strip() | |
| if len(v) >= 2 and v[0] == v[-1] and v[0] in ("'", '"'): | |
| return v[1:-1] | |
| return v |
Defensive fix: split values on ` #` (space-hash) before quote handling so a hypothetical `name: foo # comment` line wouldn't poison the package id or the per-package content hash used for update detection. Splitting on ` #` rather than bare `#` preserves aqua-style ids that legitimately contain `#`, e.g. `_go/sigsum.org/sigsum-go#cmd/sigsum-key`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 x -- echo |
22.4 ± 0.6 | 21.5 | 25.9 | 1.00 |
mise x -- echo |
23.2 ± 0.5 | 22.1 | 25.9 | 1.03 ± 0.04 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 env |
21.9 ± 0.6 | 20.8 | 27.1 | 1.00 |
mise env |
22.8 ± 0.6 | 21.8 | 25.6 | 1.04 ± 0.04 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 hook-env |
22.5 ± 0.4 | 21.5 | 24.7 | 1.00 |
mise hook-env |
23.3 ± 0.6 | 22.2 | 26.1 | 1.03 ± 0.03 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.25 ls |
22.7 ± 0.5 | 21.8 | 28.1 | 1.00 |
mise ls |
23.7 ± 0.5 | 22.7 | 26.6 | 1.04 ± 0.03 |
xtasks/test/perf
| Command | mise-2026.4.25 | mise | Variance |
|---|---|---|---|
| install (cached) | 157ms | 161ms | -2% |
| ls (cached) | 80ms | 84ms | -4% |
| bin-paths (cached) | 80ms | 84ms | -4% |
| task-ls (cached) | 814ms | 791ms | +2% |
Summary
The release PR description was previously listing the aqua-registry release tags rolled into a mise release (e.g.
v4.491.0,v4.492.0, ...), which reads as opaque version noise to users. This restores the pre-#9043 behavior of listing the actual added and updated packages, but adapted to work against the mergedregistry.yamlthat #9043 introduced.scripts/gen-aqua-changelog.shnow:registry.yamlfrom upstreamaquaproj/aqua-registry.name→repo_owner/repo_name→path), matchingcrates/aqua-registry/build.rs::canonical_package_id.#### New Packages (N)and#### Updated Packages (N)sections (matching the original pre-refactor(aqua): bake aqua registry from merged yaml #9043 format).repo_owner/repo_nameids to GitHub, so name-only ids likekiro.dev/kiro-clidon't render as broken links.YAML parsing is done by inline
python3(stdlib only — noPyYAML/yqdependency). The release runner isubuntu-latestwhich ships python3.Sample output (
v4.491.0→v4.499.0)Test plan
bash -n scripts/gen-aqua-changelog.shmise run lint scripts/gen-aqua-changelog.sh(shellcheck, shfmt, etc. clean)./scripts/gen-aqua-changelog.sh v4.498.0 v4.499.0 "###"— 1 added, 1 updated./scripts/gen-aqua-changelog.sh v4.491.0 v4.499.0 "###"— 28 added, 13 updated./scripts/gen-aqua-changelog.sh v4.499.0 v4.499.0 "###"— silent exit 0./scripts/gen-aqua-changelog.sh "" v4.499.0 "###"— silent exit 0./scripts/gen-aqua-changelog.sh v0.0.0-bogus v4.499.0 "###"— fails curl, exits 0 with stderr (matches prior fail-soft contract;xtasks/release-plzwraps the call in|| true)🤖 Generated with Claude Code
Note
Medium Risk
Touches release/changelog generation logic and introduces custom YAML parsing, which could fail or mis-detect package changes if the registry format shifts, but does not affect runtime product behavior.
Overview
Switches
scripts/gen-aqua-changelog.shfrom enumerating upstreamaqua-registryrelease tags (viagh) to diffing the old vs currentregistry.yamland printing New Packages and Updated Packages sections for the changelog.The script now fetches the old tag’s
registry.yamlviacurl, parses both YAMLs with an inlinepython3stdlib parser to compute canonical package IDs, and only adds GitHub links whenrepo_owner/repo_nameis present to avoid broken links for name-only entries.Reviewed by Cursor Bugbot for commit 6b93531. Bugbot is set up for automated code reviews on this repo. Configure here.