Run the npm suite before prepare.mjs, not after - #10
Merged
Conversation
The npm job could not publish on any tag, and cli-v0.4.0 is where that
became visible.
`prepare.mjs` stamps the tag's version into all five manifests -- that is
its entire purpose, because the repo deliberately carries 0.0.0-dev so a
version can never drift from the tag that produced it. The test suite ran
immediately afterwards, and one of its seventeen cases asserts exactly the
opposite:
test("the repo carries no real version: the tag is the only source")
So the step order made the job assert that prepare.mjs had not done the
thing prepare.mjs is for. Not a flake and not specific to this release:
16 pass, 1 fail, by construction, on every tag, forever.
The cost was worse than one red job. The publish step below carries a
written-out diagnostic for the one failure guaranteed to happen exactly
once -- that npm Trusted Publishing cannot be configured on a package
that does not exist yet, so the first version of each of the five has to
go by hand. cli-v0.4.0 was that once. The job died two steps early and
took the message with it, leaving a bare assertion failure where the
instructions should have been.
Moving the suite above the stamp step restores what it was written to
check: a clean tree, before anything mutates it. Verified both ways on
the cli-v0.4.0 tree with that tag's real release assets -- 17/17 on the
clean checkout, and 16/1 with the same failure after prepare.mjs runs.
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.
The npm job could not publish on any tag, and cli-v0.4.0 is where that
became visible.
prepare.mjsstamps the tag's version into all five manifests -- that isits entire purpose, because the repo deliberately carries 0.0.0-dev so a
version can never drift from the tag that produced it. The test suite ran
immediately afterwards, and one of its seventeen cases asserts exactly the
opposite:
So the step order made the job assert that prepare.mjs had not done the
thing prepare.mjs is for. Not a flake and not specific to this release:
16 pass, 1 fail, by construction, on every tag, forever.
The cost was worse than one red job. The publish step below carries a
written-out diagnostic for the one failure guaranteed to happen exactly
once -- that npm Trusted Publishing cannot be configured on a package
that does not exist yet, so the first version of each of the five has to
go by hand. cli-v0.4.0 was that once. The job died two steps early and
took the message with it, leaving a bare assertion failure where the
instructions should have been.
Moving the suite above the stamp step restores what it was written to
check: a clean tree, before anything mutates it. Verified both ways on
the cli-v0.4.0 tree with that tag's real release assets -- 17/17 on the
clean checkout, and 16/1 with the same failure after prepare.mjs runs.