ci(rust): reject stale Cargo lockfiles - #3227
Open
pimlock wants to merge 4 commits into
Open
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
pimlock
marked this pull request as ready for review
September 8, 2026 22:44
pimlock
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 8, 2026 22:44
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
pimlock
force-pushed
the
ci-check-cargo-lockfiles/pm
branch
from
September 8, 2026 22:49
0ec142b to
57b6555
Compare
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.
Summary
Reject stale committed Cargo lockfiles before Rust validation can silently refresh them. PR #3226 demonstrates the failure mode: an independent example workspace drifted from its manifest without an existing CI failure.
Using Cargo's
--lockedmanifest option is the standard way for CI to consume a committed dependency resolution without rewriting it. The explicit metadata pass applies that check to every tracked workspace lockfile, including standalone examples that are outside the root workspace.Related Issue
No issue required: this is localized CI hardening prompted by #3226.
Rebased onto
main, including the lockfile correction merged in #3226.Changes
Cargo.lockand runs fullcargo metadata --lockedagainst its adjacent manifest.--lockedto the existing Cargo check and Clippy commands in GitHub Actions and the corresponding local mise tasks.Testing
bash -n tasks/scripts/check-cargo-lockfiles.shgit diff --checkexamples/supervisor-middleware-content-guard/Cargo.lock, matching chore(example): refresh content guard lockfile #3226.mise run rust:lockfiles:checkpasses for all four tracked lockfiles after rebasing ontomain.mise run pre-commitpasses on the rebased branch.cargo metadata --format-version 1 --manifest-path examples/supervisor-middleware-content-guard/Cargo.tomlrefreshes the stale lockfile. The temporary lockfile change was restored after validation.Checklist