Harden crates.io release publishing - #49
Merged
Merged
Conversation
|
|
|
||
| preexisting_crates=() | ||
| for crate in "${crates[@]}"; do | ||
| if crate_published "$crate"; then |
There was a problem hiding this comment.
The blueprint specifies that the ReleasePackager is responsible for building and assembling release artifacts, but it does not document the safety requirement that the release workflow must abort if target crate versions already exist on crates.io to prevent dependency confusion.
pproenca
added a commit
that referenced
this pull request
Jul 9, 2026
pproenca
added a commit
that referenced
this pull request
Jul 9, 2026
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.
Motivation
Description
publish-cratesstep that checks every release crate/version and aborts the job with an error if any target version already exists on crates.io instead of continuing and skipping those crates.cargo publishpass which runs only after the preflight confirms no preexisting crate versions.xtaskrelease-workflow testrelease_workflow_publishes_and_smokes_crates_io_and_source_installto assert the presence of the new preexisting-crate guard strings in.github/workflows/release.yml.Testing
cargo test -p xtask release_workflow_publishes_and_smokes_crates_io_and_source_installand it passed.cargo test -p xtask crates_io_publish_plan_accepts_runtime_crate_graphand it passed.cargo fmt --checkandgit diff --checkwhich both succeeded.Codex Task