Skip to content

fix(release): check auto-release ordering with the shared SemVer guard - #321

Merged
BunsDev merged 1 commit into
mainfrom
d/surface/release-forward-guard
Oct 15, 2026
Merged

BunsDev merged 1 commit into
mainfrom
d/surface/release-forward-guard

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Member

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

Changes

  • check-release-version.py gains --forward-only. It checks only SemVer precedence against git ls-remote --tags origin and skips stamp verification. check_release now calls a shared check_forward, so both modes order versions identically. Without the flag, behavior is unchanged.
  • Auto-release's "Forward-only check" step runs check-release-version.py --forward-only "$RELEASE_VERSION" instead of the sort -V shell block. An equal, existing or lower version fails, and so does a remote read error. Stamps are still verified afterwards by the dispatched release.yml preflight and its pre-publication recheck.
  • Unit 63's ordering cases move into a ForwardOnly test class. The CLI tests show --forward-only accepts a candidate on an unstamped checkout while the full preflight rejects it.
  • Behavior choice (kept from main): a malformed version-shaped tag such as v1.0 or v9.0.0-01 fails 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 include auto-release.yml.

Validation

  • RED: on main there is no --forward-only, so the CLI forward-only tests fail there. The auto-release step it replaces ranks v1.0.0-rc.1 above v1.0.0 under sort -V.
  • python3 -B scripts/test-release-version.py -v on 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.
  • actionlint on auto-release.yml, release.yml and release-version-tests.yml: clean apart from the existing SC2016.
  • git diff --check: clean.
  • Accepted source: unit 63's ordering tests were independently reviewed. Its 8 local-origin tests are carried over with the same cases.

PR Readiness

  • Diff is limited to the release guard, its tests and the two workflows.
  • Generated files were not edited by hand.
  • User-facing docs: not needed. Release maintainers see the guard's error text in the workflow log.
  • No secrets, credentials, local paths, or unrelated logs are included. The tests mock git ls-remote and make no network calls.
  • Remaining risks: hosted execution of auto-release is unverified, since it only acts for the release bot. The new step needs python3 3.11 or later (for tomllib), which ubuntu-latest provides.

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
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 15, 2026 4:43pm UTC

Request Review

@BunsDev
BunsDev merged commit 2a90ded into main Oct 15, 2026
11 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2af09b40 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant