release: make verify-release-version.sh refuse a silent artifact skip - #1009
Open
maxy-player wants to merge 2 commits into
Open
maxy-player wants to merge 2 commits into
maxy-player wants to merge 2 commits into
Conversation
`verify-release-version.sh <version>` with no binary path skipped its whole
artifact arm — the `if [ -n "$BINARY" ]` guard — and still printed
`PASS: everything states <version>` and exited 0. A full run prints 7 `ok:`
lines; the skipping run printed 4, and nothing in the output or the exit code
said the teeth were absent. Both real call sites (ci.yml:32,
release.yml:180-181) pass a path, so the exposure was every manual or agent
invocation — which is how the skip was found.
The binary path is now required unless the caller opts out in writing:
<version> <binary> unchanged behaviour, summary names both arms
<version> --tree-only tree checks run, one loud ARTIFACT ARM NOT RUN line,
PASS (TREE ONLY) summary, exit 0
<version> exit 1 naming the arm that did not run
<version> <binary> --tree-only exit 1, contradictory
The final line always states which arms ran, so the exit code is not the only
evidence. Usage block and RELEASE.md updated; neither workflow call site is
touched.
|
Someone is attempting to deploy a commit to the MakePrisms Team on Vercel. A member of the Team first needs to authorize it. |
…sh does The opt-out this script grew for its artifact arm was invented locally (`--tree-only`) while the repo already had one: `verify-release-surface.sh` takes `--no-artifacts` and prints ok: skipping the built-artifact check (--no-artifacts) — holding the tree surfaces only Two release gates with two names for the same decision is two things to learn and one of them to get wrong. So this script now takes `--no-artifacts`, and prints the skip in the same shape and the same place — where the artifact check would have run, never silently: ok: skipping the built-artifact check (--no-artifacts) — holding the tree-stated version only; nothing here binds a built artifact to <version> or to this commit The summary closes `PASS (NO ARTIFACTS): … the built-artifact check did NOT run (--no-artifacts)`, so the arms that ran are on the line either way. Behaviour is otherwise unchanged: a path still runs both arms and exits 0, a bare version is still a refusal, and no call site is touched.
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 defect
scripts/verify-release-version.sh <version>with no binary path skipped its entire artifact arm —the
if [ -n "$BINARY" ]guard — and still printedPASS: everything states <version>and exited 0.The three checks that vanish are the ones binding the artifact to the tree:
--versionand theversionsubcommand both reportingmaxplayer <version> (<sha>), and the build stamp resolving to acommit that is this tree's HEAD (#818).
The evidence: the same command, old script and new
The control is the old script against the new one, run side by side with identical arguments:
maintodayverify-release-version.sh 0.5.9ok:lines, printsPASS: everything states 0.5.9— 4 of the 7 checks absent, and nothing says soverify-release-version.sh 0.5.9 <binary>ok:linesok:lines — unchangedSo the old run reports success with three of its seven checks — the whole artifact arm — never
executed, and a reader sees
PASS. That is the failure this PR closes. A seven-assertion self-checkwritten for it is RED against the script as it stands on
main(4 assertions fail) and GREENat this head; a green-only run would have the same shape as the bug.
The change
A binary path is required unless the caller opts out by name, with the flag this repo already uses
for exactly this decision —
verify-release-surface.sh --no-artifacts:<version> <binary>ok:lines, exit 0<version> --no-artifactsok: skipping the built-artifact check (--no-artifacts) — …where the artifact check would have run<version><version> <binary> --no-artifactsverify-release-surface.sh:101printsok: skipping the built-artifact check (--no-artifacts) — holding the tree surfaces only; thisscript now prints the same sentence with its own tail, at the point of skip, never silently. The
summary states which arms ran, so the exit code is not the only evidence:
Arguments are parsed in a loop, so the flag,
-h/--helpand unknown-*options are handled ratherthan silently taken as a version or a path. The refusal happens before the tree checks, so a run that
cannot be complete says so immediately. The usage comment block is rewritten, and
RELEASE.md— whichcarried no invocation text at all — now states the two arms, the
<version> <path-to-binary>form,the no-leading-
vrule, and the--no-artifactsopt-out.Two commits: the refusal and the arms-named summary, then the rename of the opt-out from a locally
invented
--tree-onlyto the house--no-artifacts.Caller sweep: every mention in the repo, and what changed
grep -rn verify-release-versionover the tree, with the disposition of each hit. OnlyRELEASE.mdis edited;
git diffcoversscripts/verify-release-version.shandRELEASE.mdand nothing else.Real callers — both read back UNEDITED, both already two-arm. Each passes a binary path, so each
keeps its current behaviour and colour under the stricter script, and each passes the version without
a leading
v:.github/workflows/ci.yml:32—./scripts/verify-release-version.sh "$VERSION" target/debug/maxplayer, with$VERSIONread fromcargo metadata. Unchanged..github/workflows/release.yml:180-181—./scripts/verify-release-version.sh '${{ needs.plan.outputs.version }}' \+"target/${{ matrix.target }}/release/maxplayer", withplan.outputs.versionbeing the tag withvalready stripped. Unchanged.Mentions that invoke nothing — all left alone, because each describes what the gate asserts rather
than how it is called, and none of them states an invocation that the new argument handling would
invalidate:
.github/workflows/release.yml:79— a comment on what the crate/manifest/pin comparison covers. Unchanged..github/workflows/publish-sandbox-image.yml:118— a comment noting this gate already holds the tag to the crate version, while that job holds something else. Unchanged.scripts/package-release-asset.sh:22— a comment on the artifact answering to the name it ships as. Unchanged.RELEASE.md:193— the existing sentence naming this script as what asserts the payload pin. Unchanged.Changed:
RELEASE.mdgains one paragraph, since the file carried no invocation text at all — itnow states the two arms, the
<version> <path-to-binary>form, the no-leading-vrule, and theopt-out.
Gates at this head, exit codes captured
ok:verify-release-version.sh 0.5.9 target/debug/maxplayerverify-release-version.sh 0.5.9verify-release-version.sh 0.5.9 --no-artifactsverify-release-surface.sh --no-artifactsverify-release-workflow.shcargo build --bin maxplayerNegative controls, each required to go red: artifact of the wrong version (rc 1); the real artifact
against a moved HEAD, i.e. a stale build stamp (rc 1, dies on the #818 stamp/HEAD comparison);
--no-artifactswith a path (rc 1); leadingv(rc 1); wrong version under the opt-out (rc 1);unknown option (rc 1); path to nothing (rc 1); the retired
--tree-only(rc 1).bash -nclean;shellcheckis not installed on the machine this was run on.