fix(release): collapse synthetic version-bump entries in feeder-PR preview#469
Merged
Conversation
…eview In standing-PR mode the feeder-PR preview rendered a full changelog block (`Changed → Update version to X.X.X`) for every package a sync/lockstep bump carries along, instead of collapsing those no-real-change packages into the compact "Also bumped" list. A single-package PR drowned in placeholder blocks for untouched packages. The version engine mints a synthetic `Update version to X` placeholder for any bumped package with no conventional commits of its own. The preview formatter's compaction keyed off an *empty* changelog, so the placeholder (entries.length === 1) defeated it and the package rendered a full block. Mark the placeholder structurally with a new optional `synthetic` flag on VersionChangelogEntry, set at every minting site (sync/single/group/async). The formatter now treats a changelog whose entries are all synthetic as "no real changes" — collapsing it into "Also bumped" — and excludes the root lockstep bump from that list. The flag is additive and optional: manifests written before it existed render exactly as before. Closes #468 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Standing release PR: #470 · v0.35.0 queued (4 packages) · open 39m · ✅ ready to merge Release Preview — v0.34.0 → v0.35.0
These changes will be added to the release PR (#470) when merged: Changelogmonorepo v0.34.0 → 0.35.0Added
Changed
Fixed
All packages → 0.35.0 (sync versioning)
After merge — predicted release
Updated automatically by ReleaseKit |
… (Greptile) Greptile flagged that marking the empty-extraction fallback `synthetic` in the single and async strategies — and on the group strategy's extraction-error path — over-reached. Those fallbacks represent the released package itself or a read failure, not a lockstep carry, so collapsing them in the preview would hide a real single/async release or make an extraction error look like a no-change bump. Narrow `synthetic` to the version-groups engine's clean empty-extraction path, the only genuine lockstep carry. Single/async fallbacks and the group catch path stay unflagged, keeping their visible changelog block. Add group-strategy tests for both directions: carry → flagged, extraction error → unflagged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…utcome (Greptile) Greptile flagged that extractChangelogEntriesFromCommits swallows git failures and returns [] rather than throwing, so the prior `extractionFailed` guard could not tell a no-change carry from an unreadable changelog: a group member with an invalid/ambiguous revision gets [] with extractionFailed=false and was wrongly marked synthetic (collapsed in the preview). Key the synthetic flag off the authoritative signal instead — `isCarry` (`!plan.changed`), a member that earned no releasable change of its own, the only true fixed-group ride-along. A *changed* member that still comes back empty keeps an unflagged, visible version-bump block. Ungrouped packages reach the changelog path only when changed, so they pass isCarry=false. Co-Authored-By: Claude Opus 4.8 (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
Closes #468. In standing-PR mode, the feeder-PR preview rendered a full changelog block (
Changed → Update version to X.X.X) for every package a sync/lockstep bump carries along, instead of collapsing those no-real-change packages into the compact "Also bumped" list. A single-package PR (wdio example) drowned in ~10 placeholder blocks for untouched packages.Root cause
The version engine mints a synthetic
Update version to Xplaceholder for any bumped package with no conventional commits of its own (versionStrategies.ts,groupStrategy.ts,packageProcessor.ts). The preview formatter's compaction keyed off an empty changelog:The placeholder makes
entries.length === 1, so the package escaped the "Also bumped" list and rendered a full block. The tell: only the one package that reached the formatter with a genuinely empty changelog collapsed correctly; every other carry leaked the placeholder.Fix
VersionChangelogEntrygains an optionalsyntheticflag (packages/core/src/types.ts), set at every minting site. Additive and optional — manifests written before it existed (absent flag = real entry) render exactly as before.hasRealEntriespredicate replacing the bareentries.length > 0checks.By construction a package's entries are either all-real or a single synthetic placeholder (the placeholder is only minted when extraction yields zero), so there is no mixed case to disambiguate.
Tests
packages/release/test/unit/preview-format.spec.ts— new block covering what the existing sync tests never exercised (synthetic entries actually present inchangelogs):Update version tonoise leaks; root never listed.versionStrategies.spec.tsupdated to assert the flag is now minted.Verification
pnpm turbo run lint typecheck test— green (32/32 tasks). No config-schema change, so noschema:gen/docs:configregen (the flag is on the runtimeVersionOutputcontract, not config).🤖 Generated with Claude Code
Greptile Summary
This PR cleans up feeder-PR preview output for synthetic version-bump entries.
syntheticmarker to changelog entries.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
syntheticchangelog entry marker.Reviews (3): Last reviewed commit: "fix(version): key carry-synthetic off me..." | Re-trigger Greptile