[Fix] Release promote PR ships unfrozen develop commits and stale runs resurrect Version PRs - #150
Merged
Conversation
…e runs
The promote PR used head=develop, so its contents were the live develop
tip: commits merged after the Version PR silently rode into a release
whose changelog never mentioned them, and tag-release then tagged that
drifted content. Cut a frozen release/v{version} branch at the commit
that introduced the version (via scripts/release/find-version-commit.mjs)
and promote that branch instead.
Also stop stale queued Release runs from resurrecting outdated Version
PRs (like #144): cancel superseded runs and check out the live develop
tip instead of the triggering push SHA.
Contributor
Author
|
No code issues found. See task Reviewed the frozen release-cut logic ( |
mrubens
marked this pull request as ready for review
July 10, 2026 23:16
mrubens
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
July 10, 2026 23:16
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.
What changed
The release automation never actually froze a release. The promote PR was opened as
head: develop→base: main, so its contents were whateverdevelophappened to be at merge time — commits merged after the Version PR (like #145 riding into the v0.0.2 promote #146) silently shipped in a release whose changelog never mentioned them, andtag-release.ymlthen tagged that drifted content onmain.Two fixes:
scripts/release/find-version-commit.mjs, backed byfindVersionCommitinscripts/release/lib.mjswith a unit test), pushes a frozenrelease/v{version}branch pinned at that commit, and opens the promote PR asrelease/v{version}→main. Later merges todevelopwait for the next cut, and the tag lands on exactly the content the changelog describes. The now-unnecessary pending-changesets guard was removed: a new batch of changesets for the next release no longer blocks promoting the already-versioned one.release.ymlpreviously queued runs (cancel-in-progress: false) and each run checked out the triggering push SHA, so a stale queued run could execute after a Version PR merged and recreate it from an outdated snapshot (that's how Release Roomote #144 appeared). Superseded runs are now cancelled, and both jobs check out the livedeveloptip (ref: develop).CONTRIBUTING.mdand.changeset/README.mdare updated to describe the frozenrelease/vX.Y.Zpromote flow.Why this change was made
The first real release cut (v0.0.2) surfaced both problems: #145 rode into the open promote PR after the version bump, and a raced Release run resurrected the merged Version PR as #144. Without a frozen ref, every release can silently diverge from its changelog in both directions.
Impact
latest.develop(and their changesets) cleanly roll into the next release instead of leaking into the current one.release/v*branch can be deleted after merge; if multiple promote PRs stack up, they should be merged in version order (oldest first).Verified with
pnpm test:release-scripts(new temp-git-repo test forfindVersionCommit),pnpm lint,pnpm check-types,pnpm knip, and a read-only dry run against real repo history:find-version-commit.mjs 0.0.2 origin/developresolves toeaee303(the #143 Version PR merge), correctly excluding #145.