Skip to content

fix(release): stop masking crates.io publish failures behind exit code 101#24

Merged
chuks merged 1 commit into
mainfrom
fix/crates-publish-error-masking
Jul 7, 2026
Merged

fix(release): stop masking crates.io publish failures behind exit code 101#24
chuks merged 1 commit into
mainfrom
fix/crates-publish-error-masking

Conversation

@chuks

@chuks chuks commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

At v1.0.0-alpha.13, the cargo publish (ratify-c) step hit a real 403CARGO_REGISTRY_TOKEN is scoped to ratify-protocol only — but the job reported success because cargo exits 101 for every error and the same-version tolerance matched on the exit code. Silent failure, caught only by post-release registry verification.

Fix: both crates publish steps now capture output and tolerate only genuine already exists/uploaded messages; anything else fails the job loudly.

Operator action still needed (not fixable from the repo): re-scope the crates.io token to also cover ratify-c (crates.io → Account → API Tokens; the crate is owned by the same account — alpha.8 was published with the old manual flow), update the CARGO_REGISTRY_TOKEN repo secret, then re-run the alpha.13 publish-crates job from the Actions UI — ratify-protocol re-upload is cleanly tolerated, ratify-c@1.0.0-alpha.13 publishes.

Note: this PR fixes future releases (tag workflows run at the tag's ref); the alpha.13 recovery path is the job re-run above.

…e 101

cargo exits 101 for EVERY error, not just 'version already exists' —
so the same-version tolerance matched on the exit code masked a real
403 (CARGO_REGISTRY_TOKEN lacking permission for the ratify-c crate) as
'already published — ok' at v1.0.0-alpha.13, and the publish-crates job
reported success while ratify-c remained at alpha.8 on crates.io.

Both publish steps now tolerate only output matching an actual
already-exists message and fail loud on everything else. The token
itself must also be re-scoped to cover ratify-c (operator action;
crates.io dashboard), after which re-running the alpha.13 publish-crates
job will publish ratify-c@1.0.0-alpha.13.

Signed-off-by: chuks <891251+chuks@users.noreply.github.com>
@chuks chuks merged commit 1069062 into main Jul 7, 2026
11 checks passed
@chuks chuks deleted the fix/crates-publish-error-masking branch July 7, 2026 01:54
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