Repository navigation
fix(release): check auto-release ordering with the shared SemVer guard - #321
Merged
Merged
Conversation
Auto-release's forward-only step still compared tags with sort -V against local tags, unlike manual releases, which since #200 run the SemVer preflight against origin. Surface unit 63 replaced that step with its own guard script, which collides with #200's script at the same path; and #200's script also verifies version stamps, which do not exist yet at that step (bump-version.py runs after it). Reconcile them: add a --forward-only mode to #200's check-release-version.py that checks only SemVer precedence against origin tags, and run it from auto-release before the bump. Stamps are still verified by release.yml's preflight and recheck. Unit 63's ordering cases (first release, unrelated tags, equal and lower versions, numeric components, the SemVer prerelease sequence, remote failure) move into test-release-version.py, and its lightweight workflow runs those tests when the release workflows or scripts change. Malformed version-shaped tags keep #200's fail-closed behavior. Surface unit 63. Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Auto-release's forward-only check now uses the same SemVer guard as manual releases. Before, it compared local tags with
sort -V, which is not SemVer precedence for prereleases. Manual releases have used #200's preflight against origin tags since that PR merged.Context
surface-release-forward(fix/release-forward-guard).scripts/check-release-version.pycollides with fix(ci): block on the reverse engine contract and preflight release versions #200's accepted preflight at the same path. fix(ci): block on the reverse engine contract and preflight release versions #200's script also verifies the version stamps, which auto-release only writes after its forward-only step, so calling it there unchanged would always fail. This PR reconciles the two instead of replacing either.scripts/check-release-version.py,scripts/test-release-version.py,.github/workflows/auto-release.yml, and the new.github/workflows/release-version-tests.yml.Changes
check-release-version.pygains--forward-only. It checks only SemVer precedence againstgit ls-remote --tags originand skips stamp verification.check_releasenow calls a sharedcheck_forward, so both modes order versions identically. Without the flag, behavior is unchanged.check-release-version.py --forward-only "$RELEASE_VERSION"instead of thesort -Vshell block. An equal, existing or lower version fails, and so does a remote read error. Stamps are still verified afterwards by the dispatchedrelease.ymlpreflight and its pre-publication recheck.ForwardOnlytest class. The CLI tests show--forward-onlyaccepts a candidate on an unstamped checkout while the full preflight rejects it.v1.0orv9.0.0-01fails closed, as in fix(ci): block on the reverse engine contract and preflight release versions #200. Unit 63's own script ignored those tags. This keeps the stricter accepted contract rather than loosening it.release-version-tests.yml, unit 63's lightweight workflow, runs these tests on PRs touching the release scripts or either release workflow. Rust CI's existing run of the same tests only triggers on its own path list, which doesn't includeauto-release.yml.Validation
--forward-only, so the CLI forward-only tests fail there. The auto-release step it replaces ranksv1.0.0-rc.1abovev1.0.0undersort -V.python3 -B scripts/test-release-version.py -von this branch: 17 passed (fix(ci): block on the reverse engine contract and preflight release versions #200's 11 plus 6 forward-only).python3 -B scripts/test_release_markers.py: 5 passed, so the auto-release marker steps still parse.python3 -B scripts/test_bump_version.py: 4 passed.actionlintonauto-release.yml,release.ymlandrelease-version-tests.yml: clean apart from the existing SC2016.git diff --check: clean.PR Readiness
git ls-remoteand make no network calls.python33.11 or later (fortomllib), whichubuntu-latestprovides.