Skip to content

build: list each change once in the GitHub release notes - #2405

Merged
fforootd merged 1 commit into
mainfrom
claude/sleepy-lehmann-1668da
Oct 27, 2026
Merged

fforootd merged 1 commit into
mainfrom
claude/sleepy-lehmann-1668da

Conversation

@fforootd

Copy link
Copy Markdown
Member

Summary

The generated ### Package Changes in each GitHub Release repeated every package's CHANGELOG.md section, so a change listed in several packages appeared once per package. For 0.2.0 that is 148 entries for 100 changes, and a 114,156-character body: 10,844 under GitHub's 125,000 limit before any maintainer notes (0.1.0's were about 6.6k).

Merge this before the version PR #2226. The v0.2.0 draft release is written when #2226 merges, so it gets the new format only if this lands first. #2226 itself needs no change: it adds no changesets.

scripts/release-github.mjs now lists each change once, under its highest bump, after the packages it changes:

#### Minor Changes

- `@zitadel/cli`, `@zitadel/server`: [#2076](…) [`12b3226`](…) Thanks …! - The server SDKs now count a session as signed in only when …
  • It still skips the @zitadel/server-<platform> packages and strips Updated dependencies blocks.
  • Over 125,000 characters, it omits changes that are not breaking: patch before minor, the longest first. Each bump's omitted changes leave one line naming the CHANGELOG.md files that hold them. A major, or a change that mentions **Breaking:**, is never omitted. If the notes and the breaking changes alone don't fit, the update fails loudly, as before. Today's fallback swaps whole package sections for pointers, the largest first. For 0.2.0 that would be @zitadel/server's ~42k section, which holds every server, console and login change, breaking ones included.
  • apps/website/app/changelog/releases.ts reads the new shape and still reads the per-package one, which v0.1.0's published body uses. The spec's main fixture is the script's own output, byte for byte, and the old fixture stays as the per-package case.
  • docs/runbooks/manual-release.md describes the new block and its fallback.

Validation

  • vitest run scripts/release-github.test.mjs: 17 passed. moon run workspace:test: 71 passed.
  • moon run website:typecheck website:lint website:test: pass (22 tests). website:build passes too.
  • biome check on the changed files: clean.
  • Dry run against the changesets pending on main. The head of build: version packages #2226 (4cf2adc6a, one commit on top of main's fbec087ca) holds their CHANGELOG.md sections. On that checkout I wrote the metadata with writeReleaseMetadata, then ran upsertProductGithubRelease({ dryRun: true }). That is the step release publish --dry-run ends with, without building binaries or images first.
    • Before: 114,156 characters, 148 entries for 100 changes.
    • After: 79,144 characters, 45,856 under the limit. There are 100 entries, one for each non-empty pending changeset. The other 2 changesets are empty.
  • The website parser reads the same 100 changes (45 minor, 9 breaking, 46 patch) from the old and the new 0.2.0 body: same summaries, packages, bumps, PRs and authors. v0.1.0's published body parses identically with main's parser and this one.
  • The fallback on the real 0.2.0 data, with large maintainer notes. Up to about 45k characters of notes nothing is omitted. At 70k, 34 patch changes are omitted. At 110k, 46 patch and 44 minor changes are. All 9 breaking changes stay every time, and the body stays under the limit.

Release notes / changeset

No changeset required — no shipped behavior changed. The script is release wiring, and the website is not versioned (it is in the Changesets ignore list). node scripts/check-changesets-status.mjs --base origin/main agrees.

Notes

  • Changes are grouped by their highest bump, as the website already showed them. A change's bump in each separate package is no longer shown; in the lockstep group every package ships the same version.
  • The script counts any **Breaking:** mention as breaking, where the website marks only a paragraph that starts with it. So it errs toward keeping a change.
  • This doesn't depend on the separate efforts to shorten changeset summaries or to redesign /changelog.

🤖 Generated with Claude Code

The generated Package Changes repeated every package's CHANGELOG.md
section, so a change listed in several packages appeared several times:
148 entries for 0.2.0's 100 changes, a 114,156-character body against
GitHub's 125,000 limit. They now list each change once, under its
highest bump, after the packages it changes: 79,144 characters for the
same release.

Past the limit, the block omits patch changes before minor ones, the
longest first, and names the CHANGELOG.md files that hold them; it
never omits a breaking change. The website changelog reads the new
shape and still reads v0.1.0's per-package one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 20:19
@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Oct 27, 2026 8:21pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: fd681fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-27T20:22:17.165032Z fd681fb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fforootd
fforootd enabled auto-merge October 27, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A releaser must confirm the live dry-run release-body output and the required merge ordering before #2226, which cannot be reproduced or verified here.

No open issues 🎉

What changed in this PR

This PR reworks the GitHub Release body generator so each change is listed once (under its highest semver bump, after the packages it changes) instead of repeating every package's full CHANGELOG.md section. For 0.2.0 this cuts the generated body from ~114k to ~79k characters, well under GitHub's 125,000-character limit. When a body still would not fit, it now omits individual changes (patch before minor, longest first), never a breaking one, leaving a one-line pointer to the relevant CHANGELOG.md files; if only breaking changes plus maintainer notes still overflow, it fails loudly as before. The website changelog parser is updated to read the new shape while still parsing the legacy per-package shape used by v0.1.0.

Changes:

  • scripts/release-github.mjs: replaces per-package section collection with collectReleaseChanges/parseChangelogEntries, renders a per-bump list with package prefixes, and switches the fit/omit strategy to per-change (breaking-aware), renaming omittedPackages → omittedChanges.
  • apps/website/app/changelog/releases.ts: parses the new #### Minor Changes + - \@pkg`, …:format (newPACKAGESregex,item.packages, ####?` heading match) while retaining legacy parsing.
  • Docs and tests updated to describe and cover the new block, its omission fallback, and backward compatibility.

Verification performed: removed helpers (collectPackageChangeSections, normalizeChangelogSection, renderPackageChangeSection, omittedPackageChangeStub, etc.) have no remaining references; scripts/release.mjs does not consume the renamed return field; new/old format parsing and the fit/omit logic round-trip correctly against the tests; both JS files pass node --check; referenced ADR/anchor targets exist; and the no-changeset claim is consistent (@zitadel/website is private and in the Changesets ignore list, and scripts/ is not a published package). No objective defects found.

File Description
scripts/​release-github.mjs Core rewrite: collect/parse/dedup changes, per-bump rendering with package prefixes, breaking-aware omission, renamed result field.
scripts/​release-github.test.mjs Rewrites fixtures/assertions for collectReleaseChanges, parseChangelogEntries, and the new omission behavior; adds a breaking-change-too-long failure test.
apps/​website/​app/​changelog/​releases.ts Parses the new single-listing format and still the legacy per-package format; adds PACKAGES regex and item.packages.
apps/​website/​app/​changelog/​releases.spec.ts Adds new-format body fixture plus a legacy (≤0.1.0) fixture and asserts both parse to identical changes.
docs/​runbooks/​manual-release.md Updates the runbook to describe the new block and its omission/fail-loud fallback.

Review effort: Balanced

@fforootd
fforootd added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 9a0cf25 Oct 27, 2026
19 checks passed
@fforootd
fforootd deleted the claude/sleepy-lehmann-1668da branch October 27, 2026 20:33
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Oct 27, 2026

This branch was successfully deployed

1 active deployment
Preview — fd681fb3 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants