Repository navigation
Description
Problem Statement
prepare-release freezes dev's ## Unreleased into the new version section. Under #1676, main may carry changes — and changelog entries — that have landed but are not yet shipped.
sync-main-to-dev.yml propagates those to dev automatically (it triggers on push: [main]), so in the normal case dev already has them by the time a release is cut. But nothing enforces that ordering. If a release is prepared while that sync PR is still open, the carried entries are silently left out of the frozen section, and the release ships without describing changes it actually contains.
Proposed Solution
Add a validate-job precondition to prepare-release.yml: refuse when dev is behind main.
BEHIND=$(git rev-list --count origin/main ^origin/dev)
[ "$BEHIND" = "0" ] || refuseThis is the same check sync-main-to-dev.yml already performs to decide whether to open its PR, so the two agree by construction rather than by coincidence. The remedy is always the same and easy to state in the error: merge the open chore/sync-main-to-dev-* PR, then re-dispatch.
Worth having regardless of #1676 — cutting a release from a dev that is behind main has never been intentional.
Alternatives Considered
- Warn instead of refuse. Weaker: the failure mode is a silently incomplete changelog on a published release, which is not noticed until someone goes looking. Prefer refusing, since the fix is one PR merge away. Open to reversing this if it proves obstructive in practice.
- Have
prepare-releasemergemainintodevitself. Rejected: it would make the release lane a writer ofdevoutside the freeze commit, andsync-main-to-devalready owns that job.
Impact
Breaking change: no. Adds a precondition that should already hold in every intended workflow.
Scaffold split to expect: prepare-release.yml also ships in assets/workspace/.github/workflows/. Devkit's own copy is release-neutral and can ride the #1676 lane; the scaffold copy is a published asset and needs a release. Land them as separate commits.
Changelog Category
Added
Activity
test(ci): pin the dev-behind-main guard in prepare-release
feat(ci): refuse to cut a release while dev is behind main
test(ci): pin the scaffold copy of the dev-behind-main guard
docs(release): record the dev-behind-main precondition
feat(ci): ship the dev-behind-main guard to the scaffold
chore: merge dev into the 1680 dev-behind-main guard branch
c-vigo commentedon Sep 25, 2026
Implemented in #1681 (merged to
dev2026-09-25, ed0980d):prepare-releaserefuses to cut whiledevis behindmain, so a train can no longer freeze a section that misses entries the open sync PR still carries. Reachesmainwith the next train.chore: release 1.17.0 (#1734)