Repository navigation
fix(prepare-release): stop stripping Unreleased so sync cannot drop it - #594
Merged
Merged
Conversation
sync-main-to-dev could silently drop dev's fresh ## Unreleased: the sync branch is cut from main (which had no Unreleased, since prepare-release stripped it from the release branch) and merged into dev (which has it), so the 3-way merge resolved cleanly in main's favour and deleted the scaffold with no conflict. Stop stripping ## Unreleased from the release branch. main now keeps an empty ## Unreleased above the dated release, matching dev, so the section is stable common context in the freeze commit that becomes the main/dev merge base. Finalization only edits the [X.Y.Z] line, so the sync merge preserves ## Unreleased cleanly. Apply to the workspace template too so adopters inherit the fix. Refs: #590
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
Fixes #590.
sync-main-to-devcould silently dropdev's fresh## Unreleasedscaffold: the sync branch is cut frommain(which had no## Unreleased, becauseprepare-releasestripped it from the release branch) and merged intodev(which has it). The 3-way merge then resolves cleanly inmain's favour and deletes the scaffold — no conflict, green auto-merge, invisible loss until the next structure PR has nowhere to add an entry (observed every release inpart-registry).Fix
Stop stripping
## Unreleasedfrom the release branch.mainnow keeps an empty## Unreleasedabove the dated release, matchingdev, so the section is stable common context in the freeze commit that becomes themain↔devmerge base. Finalization only edits the## [X.Y.Z]line, so the sync merge preserves## Unreleasedcleanly. Keep a Changelog endorses an always-presentUnreleasedsection.This is the minimal change — just remove the strip step — applied to both the canonical workflow and the workspace template so adopters (e.g.
part-registry) inherit it.Why not re-add Unreleased on
devafter the fork?An earlier approach froze without
Unreleasedand re-added it todevpost-fork, keepingmainfree ofUnreleased. Empirically that made themain→devsync conflict every release (finalize edits the[X.Y.Z]line adjacent to the re-inserted scaffold) — i.e. the same manual chore #590 complains about. Keeping the section on both sides is the only way to get a clean conflict-free merge.Changes
.github/workflows/prepare-release.yml+assets/workspace/.github/workflows/prepare-release.yml: drop the "Strip empty Unreleased section" step (and its release-branch commit); refresh the flow header/summary comments..github/workflows/sync-main-to-dev.yml+ workspace copy: refresh the stale comment to document the new invariant.CHANGELOG.md(+ mirrored workspace copy):Fixedentry.Verification
Simulated the full freeze → fork → finalize →
main→devsync cycle with the realprepare-changelogtooling, across two consecutive releases, with and without ongoingdevwork:The pre-fix flow reproduces the silent drop (
clean -> DROPPED) for contrast.just test-pytestforvig-utils(481 passed) andyamllinton all four workflows are green.