fix(release): break the qa:pre-release/tag circularity in release:finish - #303
Merged
Merged
Conversation
finish-release.mjs (added tonight, PR #300) runs `npm run qa:pre-release` as its own precondition before creating the release tag. verify:release's check-version-coherence.mjs always errors when main declares a version with no matching tag yet -- which is exactly main's state every single time release:finish runs, before it ever gets to `gh release create`. qa:pre-release could therefore never pass on a freshly-bumped main, and release:finish could never succeed. checkMainDeclaresPublishedVersion gains aboutToTagThisVersion, narrowly scoped to the one branch it can affect: real tags are visible, just not this one yet. It does nothing to the "no tags visible at all" case, which stays a hard error regardless. check-version-coherence.mjs wires this to MEMESH_FINISH_RELEASE_TAGGING=1, set only at finish-release.mjs's own qa:pre-release spawn -- unset for CI, PR checks, and every plain manual run, which all keep today's behavior exactly.
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.
What it does
Adds
aboutToTagThisVersiontocheckMainDeclaresPublishedVersion(scripts/lib/published-version.mjs), narrowly scoped to tolerate exactly one condition: real tags are visible, onmain, just not the currentpackage.jsonversion's tag yet. Wired throughcheck-version-coherence.mjsvia a new env varMEMESH_FINISH_RELEASE_TAGGING=1, set only atfinish-release.mjs's own internalqa:pre-releasespawn.Why it is needed
finish-release.mjs(this repo's own G4 gate, added tonight in PR #300) runsnpm run qa:pre-releaseas a precondition before it creates the release tag.check-version-coherence.mjs'smain-declares-published-versioncheck always errors whenmaindeclares a version with no matching tag — which ismain's state every single timerelease:finishruns, beforegh release createhas had a chance to act.qa:pre-releasecould therefore never pass on a freshly-bumpedmain, andrelease:finishcould never succeed for any future release. This is a regression introduced by tonight's own G4 work, found by running it for real against v4.8.5.The "no tags visible at all" branch (a shallow checkout with no tag data) is untouched and stays a hard error regardless of the flag — that is a different, real failure this fix does not touch. CI, PR checks, and every plain manual
qa:pre-releaserun keep exactly today's behavior, since the env var is unset for all of them.How to test
Linked issues
None.