Repository navigation
fix(release): read sync notes edits under the changelog key - #761
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
@greptile review |
Contributor
|
Standing release PR: #730 · v0.42.1 queued (4 packages) · open 7h 32m · ✅ ready to merge Release Preview — v0.42.0 → v0.42.1
These changes will be added to the release PR (#730) when merged: Changelogmonorepo 0.42.0 → 0.42.1
After merge — predicted release
Updated automatically by ReleaseKit |
… changelogs The draft-then-dispatch flow had the same key mismatch as the standing PR. The draft issue renders its notes region under the changelog key (`monorepo` for a sync release without mainPackage), but publishFromDraft read it back by package names. A sync draft edit was dropped, and a "markers may have been removed" warning fired on every sync draft. The key helper now lives with the notes region code and serves both flows. It also tolerates a manifest without changelogs: the manifest is parsed back from a PR or issue body, its schema doesn't check changelogs, and a missing list used to crash the publish. Region checks use Object.hasOwn rather than `in`. The sync test fixtures use a shared v1.2.3 tag, as a real sync release does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
Open
The previous commit let notes keying tolerate a missing changelogs list, which made things worse. The GitHub-release stage also reads changelogs, and it runs after npm publish and the tag push, so a bad manifest failed halfway through the release instead of up front. The manifest schema now validates changelogs, so both the standing-PR publish and the draft dispatch reject such a manifest before tagging or publishing anything. Every manifest releasekit writes includes changelogs. extractNotesRegions now derives the keys from the version output itself. Callers can no longer pass a different key list, which is how the sync mismatch arose. The sync publish test asserts the exact notes map, so a second package-keyed entry (the original failure shape) would fail it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…regions out of edits The manifest schema checked only changelogs[].packageName, so a changelog without entries still passed and failed after npm publish, when the GitHub-release step formats it. It now validates version and entries as well. Validating those fields reorders each parsed changelog's keys, and the draft dispatch compared plans with a key-order-sensitive JSON string, so every real draft would have read as drifted. The plan fingerprint now sorts object keys. A notes region still ending in the truncation note is releasekit's own cut-down seed, not a human edit, so it no longer overrides the full regenerated notes. Without this, a sync release over 8000 characters published notes ending in "…(truncated)". Notes keys now come only from the changelogs, which every real run produces and the schema requires; the fallback to package names served only test fixtures, which now carry real changelogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks
…rder The previous commit treated a notes region ending in the truncation note as unedited. That inferred machine state from the human-editable prose, against the marker rule in AGENTS.md. It also discarded real edits that kept the trailing note, threw away hand-written notes over the cap once re-rendered, re-ran the LLM on every update for oversized notes, and made the draft flow warn falsely. Reverted. Telling a seed from an edit needs machine state, which #782 tracks; the docs now say notes over 8000 characters are cut and the cut text publishes unless edited. parseManifest now returns the validated input rather than zod's copy, so field order survives the round-trip for every consumer. The draft plan fingerprint no longer needs to sort keys, so that change is reverted too. The manifest's changelogs are validated with the publish package's full VersionPackageChangelogSchema, now exported, instead of a partial copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves the export conflict in packages/publish/src/index.ts by keeping both pipelineErrorEnvelope (from #760) and VersionPackageChangelogSchema.
3 tasks
…draft region A sync draft's single notes region is now read back, so a draft whose notes exceed the 8000-character region cap published the truncated render, although the manifest holds the full drafted text. A region that still holds exactly what the draft rendered is now treated as unedited, so the full drafted notes win; a changed region still ships as edited. The check compares the body with the manifest's stored notes, not the prose. The standing-PR body docs now say edits are capped too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks
This was referenced Oct 24, 2026
Merged
goosewobbler
pushed a commit
that referenced
this pull request
Oct 24, 2026
#761 exported VersionPackageChangelogSchema from @releasekit/publish so the standing-PR manifest schema could use it. This branch moves that schema to @releasekit/core/version-output-schema, so release imports it from there and publish no longer re-exports it. A publish re-export would leave publish's bundled types pointing at the core subpath, which isn't one of its dependencies. Co-Authored-By: Claude Opus 5.5 <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
In a sync release without
version.mainPackage, the notes region is rendered undermonorepo, but updates and publish read it back by publishable package name. Edits were dropped and the LLM regenerated every time.Both paths now use the changelog
packageNames (falling back to publishable names when a manifest has no changelogs). A sync edit survivesstanding-pr updateand is what publish sends as the GitHub Release body.The draft-then-dispatch flow (
release --draft/--from-draft) had the same mismatch.extractNotesRegionsnow takes the version output and works out the keys itself, so no caller can pass a different list. The manifest schema now validateschangelogswith the publish package'sVersionPackageChangelogSchema(now exported), so a bad manifest is rejected before anything is tagged or published, instead of failing in the GitHub-release step after npm publish.parseManifestreturns the validated input rather than zod's copy, so field order survives the round-trip, which the draft plan comparison relies on. Region checks useObject.hasOwninstead ofin. Notes keys come only from the changelogs; the fallback to package names served only test fixtures.In the draft flow, a region that still holds exactly what the draft rendered counts as unedited, so the full drafted notes (stored in the manifest) publish instead of the region's truncated render.
Known consequence for sync releases with
release:preview-notes: the single region now counts as an edit, like package regions already did. So notes seeded once stay frozen, notes over 8000 characters publish truncated, and later updates skip the LLM, which also leavesCHANGELOG.mduncategorized (#789). Telling a seed from an edit needs machine state; #782 tracks that, anddocs/standing-pr-body.mdnow mentions the cap.Fixes #656
Made with Cursor


Confidence Score: 5/5
The PR appears safe to merge.Summary
Fixes how standing PRs read edited release notes for sync releases.
No actionable issues found. Review was based on code inspection; tests were not run.
Reviews (1) · Last reviewed commit: "fix(release): read sync notes edits unde..." · Reviewed by Greptile