fix(boxel-cli): narrow release notes; restrict CHANGELOG to stable cuts#4880
Merged
Conversation
The `## Changes` block in `CHANGELOG.md` and the GitHub Release body was listing every PR merged repo-wide between two `boxel-cli-v*` tags — 50+ bullets for unrelated observability, host, and realm-server work on every boxel-cli publish. Root cause: `generate-release-notes.ts` sourced its body from `gh api releases/generate-notes`, which filters by merge date, not by `paths:`. Replace that with a local builder that: - `git log <prev>..HEAD --pretty='%H%x09%an%x09%s' -- packages/boxel-cli/` to filter to commits that actually touched the package, - drops `github-actions[bot]` rows (the `chore(release): …` bumps the workflow pushes itself), - resolves each remaining SHA to its PR via `gh api commits/<sha>/pulls` and emits a `* <title> by @<user> in <PR URL>` bullet, - dedupes by PR number, - keeps the `**Full Changelog**: <compare URL>` footer. Pin `git log`'s cwd to the repo root — the workflow invokes the script from `packages/boxel-cli/`, where the relative path filter would otherwise resolve to a non-existent nested directory. Outer `composeReleaseBody` / `composeChangelogFragment` unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Only the stable promotion job writes `packages/boxel-cli/CHANGELOG.md` now. The per-merge unstable job still produces a rich filtered GitHub Release body but doesn't append to the on-disk changelog. Per-bump unstable detail stays available on the Releases page and on npm. Reset `CHANGELOG.md` to its seed state so the file starts fresh on the next stable cut — the existing `.293` / `.294` / `.298` entries were all generated with `PREV_TAG=boxel-cli-v0.1.4` (the lightweight-tag bug fixed in #4879 left intermediate tags unpushed, so `git describe` kept walking back to the last actually-pushed tag). Each entry was the same noisy ~50-PR repo-wide list and not worth keeping around. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Two fixes to the boxel-cli publish flow's release-notes story, building on the OIDC/annotated-tag fix in #4879.
1. Filter release notes to commits that touched
packages/boxel-cli/The
## Changesblock in every boxel-cli GitHub Release body andCHANGELOG.mdentry was listing every PR merged repo-wide between twoboxel-cli-v*tags — 50+ bullets per release, mostly unrelated observability / host / realm-server work. Root cause:generate-release-notes.tssourced its bullets fromgh api releases/generate-notes, which filters by merge date with nopaths:filter.Replaced with a local builder that:
git log <prev>..HEAD --pretty='%H%x09%an%x09%s' -- packages/boxel-cli/— filters to commits that actually touched the package.github-actions[bot]rows (thechore(release): …commits the workflow pushes itself).gh api commits/<sha>/pullsand emits* <title> by @<user> in <PR URL>(same shape GitHub's auto-notes use).**Full Changelog**: <compare URL>footer.2. Restrict
CHANGELOG.mdto stable cutsPer-merge unstable bumps were writing entries to
packages/boxel-cli/CHANGELOG.md, which isn't what a changelog is for. Now:unstablejob no longer prepends toCHANGELOG.mdand no longer stages it in the bot commit. It still produces a rich filtered Release body, posted to GitHub Releases.stablejob still writesCHANGELOG.md(one entry per stable promotion, aggregating PRs since the previous stable)..293/.294/.298) were all generated withPREV_TAG=boxel-cli-v0.1.4(because the lightweight-tag bug fixed in fix(boxel-cli): consolidate publish workflows, push annotated tags #4879 left intermediate tags unpushed, sogit describekept walking back), so they were all the same noisy ~50-PR repo-wide list and not worth keeping.Out of scope
The
compute-release.tsstable-tag logic stays as-is. A defense-in-depth boundary fix (using the previous bot commit instead of the previous tag) is no longer necessary now thatCHANGELOG.mdis stable-only; a noisy Release body in the edge case of a future tag-push failure is much lower-impact than a noisy on-disk changelog.Test plan
pnpm --filter @cardstack/boxel-cli exec vitest run tests/scripts/generate-release-notes.test.ts— 15 tests pass (9 existing + 6 new forbuildFilteredNotes).pnpm --filter @cardstack/boxel-cli lint— eslint + tsc clean.pnpm --filter @cardstack/boxel-cli test:unit-exclude-smoke— full unit suite (231 tests) green.yamllint -c .github/.yamllint.yml .github/workflows/boxel-cli-publish.yml— clean.boxel-cli-v0.1.4..HEAD— produced 5 boxel-cli-only bullets (vs 50+ pre-fix). All@FadhlanR, no bot commits, proper PR URLs and Full Changelog footer.feat(boxel-cli):PR's auto-publish: the bot commit onmaindoes NOT touchCHANGELOG.md, and the GitHub Release body lists only boxel-cli PRs.workflow_dispatchstable promotion: writes the first real entry toCHANGELOG.md.🤖 Generated with Claude Code