fix: keep automatic release versions stable across retries [skip release]#29

merged1
stack/calendar-unload-guard
stack/release-retry
opened7d agobySScreen
View on GitHubTwo-way sync enabledPR last imported 7d ago

Summary

Closes #25. A retried automatic release reuses the version already tagged on its own commit instead of picking the next unused patch.

diff
1-version = nextReleaseVersion(package.version, allTags)
2+tagAtHead = highest v* tag pointing at HEAD
3+version = tagAtHead > package.version ? tagAtHead : nextReleaseVersion(package.version, allTags)

set-build-version.mjs validates with the same rule and asserts the build ref equals HEAD. No workflow change; manual tag matching and release integrity gates are unchanged.

Evidence

  • Before: scripts/set-build-version.test.mjs 7 pass, 5 fail (full-run and build-job retries, lightweight and annotated tags, in temporary repos).
  • After: 12/12; release script tests 53 pass, 1 skipped; npm test passes.

Not verified: a hosted release retry.

Merge Danger

Door: two-way

Blast Radius: releases


View with [code]smith Autofix with [code]smith Need help on this PR? Tag @codesmith-bot with what you need.

Added 1 commit

  • fix: keep automatic release versions stable across retries [skip release]1cf1a45