Skip to content

fix(release): tidy changelog + per-nightly changelog in hub release#3713

Merged
insipx merged 1 commit into
mainfrom
fix-changelog-subject-only
Jun 3, 2026
Merged

fix(release): tidy changelog + per-nightly changelog in hub release#3713
insipx merged 1 commit into
mainfrom
fix-changelog-subject-only

Conversation

@insipx

@insipx insipx commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Two changelog improvements, both stemming from the scruffy first generated Release PR (#3712).

1. Tidy the generated changelog (cliff.toml)

Body-dump scruff — the template rendered commit.message (full message = subject + body). GitHub squash-merges fill the commit body with the PR description, so each merge dumped its whole PR body into the changelog: Macroscope HTML-comment summary blocks, Co-authored-by: trailers, even a pasted Nix build-error log (~316 of #3712's 461 lines).

-{{ commit.message | upper_first }}
+{{ commit.message | split(pat="\n") | first | trim | upper_first }}

Fake per-scope groups — non-conventional commits (e.g. xmtp_proto: …, bindings/mobile: …) made git-cliff invent junk section headers like Xmtp_proto / Bindings/mobile. A catch-all collects them into one Other group:

+  { message = ".*", group = "<!-- 8 -->Other" },

Result (regenerated from main): group headers are exactly Features · Bug Fixes · Performance · Documentation · Other, every entry a clean subject line, zero scruff.

2. Per-nightly changelog in the hub release (release.yml)

Each nightly hub GitHub Release now appends a "Changes since the last nightly" section — the git-cliff delta over <previous-nightly-tag>..HEAD (--strip header), computed before this run is tagged so the newest existing v*-nightly.* tag is genuinely the prior one. First-ever nightly (no prior nightly tag) falls back to since-last-stable. Empty output is dropped. Adds git-cliff to the hub job.

Uses an explicit <tag>..HEAD range rather than the config's stable-anchored tag_pattern, so it diffs against the last nightly, not the last stable. Relies on the §1 fixes for clean output.

Verification

  • Regenerated changelog from main: clean, 5 well-formed groups, no scruff.
  • Simulated the per-nightly delta (<tag>..HEAD --strip header): clean grouped output, 22 bullets, no header.
  • All workflow YAML validated.

Once merged, the open Release PR (#3712) regenerates clean on the next push to main, and the next real nightly carries a proper since-last-nightly changelog.

🤖 Generated with Claude Code

Note

Tidy generated changelog to show subject-only commits and group non-conventional commits into 'Other'

  • Updates cliff.toml to trim commit messages to their first line only and capitalise the first character, removing multi-line noise from changelogs.
  • Adds a catch-all parser rule in cliff.toml that places non-conventional commits into an 'Other' group instead of creating per-scope groups.
  • Updates release.yml to install git-cliff, compute a delta changelog from the previous nightly tag to HEAD, and append a

Macroscope summarized eecd171.

@insipx insipx requested a review from a team as a code owner June 3, 2026 21:43
@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown

Claude finished @insipx's task —— View job


Code Review — 2026-06-03 22:14 UTC

Todo List:

  • Read changed files
  • Analyze cliff.toml changes
  • Analyze workflow changes
  • Provide review feedback

Summary

The changes effectively solve both stated problems with minimal, well-targeted fixes. Code quality is high.

Detailed Review

cliff.toml (lines 22, 63)

✅ Subject-line extraction (line 22):

{{ commit.message | split(pat="\n") | first | trim | upper_first }}

Clean solution. The pipeline correctly isolates the subject line from squash-merge bodies.

✅ Catch-all rule (line 63):

{ message = ".*", group = "Other" },

Proper placement at the end of commit_parsers. The `` sort prefix ensures "Other" appears last, matching the documented PR behavior.

Minor observation: No issues, but consider whether "Miscellaneous" (line 57, ) and "Other" (line 63, ) could cause user confusion about which bucket applies. The distinction is clear in the rules (conventional chore/ci/build → Miscellaneous; non-conventional → Other), but naming overlap might be subtle for humans reading changelogs. Not blocking—works correctly as-is.

.github/workflows/release.yml (lines 421-437)

✅ Per-nightly changelog logic:
The new section computes the delta since the previous nightly tag, which is a solid UX improvement for nightly releases. Implementation details:

  • Line 426: git tag -l 'v*-nightly.*' --sort=-creatordate | head -1 correctly finds the most recent prior nightly
  • Lines 429, 432: Appropriate fallback to --unreleased for first-ever nightlies
  • Lines 435-437: Empty-content guard prevents publishing whitespace-only sections

🔍 Edge case: Line 429 uses 2>/dev/null || true to suppress git-cliff errors. If git-cliff fails (bad config, missing dependencies), the changelog silently becomes empty. Consider whether a failed git-cliff invocation should:

  1. Continue silently (current behavior, fail-open)
  2. Fail the workflow (fail-closed to catch config breakage)

Current approach is reasonable for robustness, but if git-cliff breaks due to the cliff.toml changes, you won't know until you notice the empty changelog in a release. Trade-off between resilience and observability.

Lines 469-475: The conditional append of nightly changelog to the release body is well-structured. The heredoc formatting and test [ -s /tmp/nightly-changelog.md ] are correct.


Test Coverage

No test changes included. Changelog generation is typically verified manually (as done in the PR description). For a config-only change, this is acceptable. Consider whether any of the following would add value:

  • A CI job that runs git cliff on a test repo/commits to validate the config parses
  • Smoke test that the split(pat="\n") | first template renders without errors

Given the manual verification shown in the PR body ("regenerated from main" with before/after), this is not a blocker.


Performance & Security

  • Performance: No concerns. Template filters and regex matching add negligible overhead to changelog generation.
  • Security: No concerns. Changes are to build/release tooling configuration, not runtime code.

Conclusion

Changes are well-designed and address the stated problems. No blocking issues. The one observability consideration (git-cliff silent failure) is a design choice, not a bug.


macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 3, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Minor CI/CD configuration changes to improve changelog generation for nightly releases. The changes only affect release note formatting, not production behavior, and the author owns both modified files.

You can customize Macroscope's approvability policy. Learn more.

@insipx insipx enabled auto-merge (squash) June 3, 2026 21:45
@insipx insipx disabled auto-merge June 3, 2026 21:45
@insipx insipx force-pushed the fix-changelog-subject-only branch from fd017a7 to dc5af90 Compare June 3, 2026 21:45
@macroscopeapp macroscopeapp Bot dismissed their stale review June 3, 2026 21:45

Dismissing prior approval to re-evaluate dc5af90

@insipx insipx changed the title fix(release): git-cliff changelog renders commit subject only fix(release): tidy generated changelog (subject-only + Other bucket) Jun 3, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 3, 2026
@insipx insipx force-pushed the fix-changelog-subject-only branch from dc5af90 to 72c80fe Compare June 3, 2026 22:09
… release

Changelog-quality fixes to cliff.toml:
1. Render only the commit SUBJECT (first line), not the full message. GitHub
   squash-merges put the PR description in the commit body, so the prior
   template dumped PR boilerplate (Macroscope HTML-comment blocks,
   Co-authored-by trailers, even a pasted Nix build log) into the changelog.
2. Catch-all parser so non-conventional commits land in a single 'Other' group
   instead of fake per-scope sections like 'Xmtp_proto' / 'Bindings/mobile'.

Plus a release.yml change: each nightly hub GitHub Release now appends a
'Changes since the last nightly' changelog — the git-cliff delta over
<previous-nightly-tag>..HEAD (--strip header), computed before tagging this
run. First nightly (no prior nightly tag) falls back to since-last-stable.
Adds git-cliff to the hub job.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@insipx insipx force-pushed the fix-changelog-subject-only branch from 72c80fe to eecd171 Compare June 3, 2026 22:13
@macroscopeapp macroscopeapp Bot dismissed their stale review June 3, 2026 22:13

Dismissing prior approval to re-evaluate eecd171

@insipx insipx changed the title fix(release): tidy generated changelog (subject-only + Other bucket) fix(release): tidy changelog + per-nightly changelog in hub release Jun 3, 2026
@insipx insipx enabled auto-merge (squash) June 3, 2026 22:14
@insipx insipx merged commit 0628dfd into main Jun 3, 2026
27 checks passed
@insipx insipx deleted the fix-changelog-subject-only branch June 3, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant