fix(release-train): rebuild versioning as tag-driven, cross-channel aware and atomic#9
Merged
Merged
Conversation
…ware and atomic The release train could publish a beta of a version that had already graduated to stable (e.g. 0.15.1-beta.N after v0.15.1 shipped) because each channel derived its version from its own latest tag in isolation, and bumps were computed relative to package.json, which drifts between branches. - detect.sh now computes the EXACT next version in one place, from git tags only, with full cross-channel awareness: every version is strictly greater than the latest stable; stale pre-release cycles are abandoned; staging promotes the newest alpha cycle; main graduates the leading beta (with hotfix fallbacks for staging/main). - Conventional commits drive new-cycle bumps (feat -> minor, breaking -> major, otherwise patch). - docker-release applies the computed version verbatim (npm version <exact>), removing the relative npm-version math and the release-train-bump action. - Safe publish ordering: build image (no push) -> atomic git push of release commit + tag (with retries) -> registry push -> GitHub Release. A git tag can no longer lag behind a published image. - Release commits now use chore(release): so git-cliff skips them in changelogs. - Add a 17-scenario test suite (incl. a regression test for the stale-beta bug) and a CI workflow running it + shellcheck. https://claude.ai/code/session_01MFD8imoXtKUEUoZTvL5Ztv
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.
Problem
The release train could publish a beta of a version that had already graduated to stable — exactly what happened on
gardenia-api: staging kept iterating0.15.1-beta.Nafterv0.15.1had shipped stable on main, while develop was already on0.15.2-alpha.N.Root causes:
promote-betapath could literally never run after the first cycle, and there was no check against the stable line (only the alpha channel had a partial patch for this).package.json(npm version prerelease), which drifts between branches. This is howv0.15.1-beta.1appeared with nobeta.0ever existing.Changes
detect.shrewritten: git tags are the single source of truth and the exact next version is computed in one place, with full cross-channel awareness. Core invariant: every emitted version is strictly greater than the latest stable release — a stale pre-release cycle whose base already shipped is abandoned, never continued. Staging promotes the live alpha cycle; main graduates the leading beta; hotfixes merged straight to staging or main get their own paths (previously these errored). New-cycle bumps follow conventional commits (feat:→ minor, breaking → major, otherwise patch).docker-release.yml: applies the computed version verbatim (npm version <exact>), removing the relative npm-version math and the now-obsoleterelease-train-bumpaction. Safe publish ordering: build image (no push) → atomic git push of release commit + tag (with retries) → registry push → GitHub Release. A git tag can no longer lag behind a published image. Release commits now usechore(release):so git-cliff skips them in changelogs.Verification
gardenia-apitag state: the next merge to staging produces0.15.2-beta.0(abandoning the stale0.15.1-beta.3), main graduates0.15.2, develop then opens0.16.0-alpha.0. The system self-heals with no manual tag surgery.https://claude.ai/code/session_01MFD8imoXtKUEUoZTvL5Ztv
Generated by Claude Code