ci: run the rest of the cargo jobs with --locked - #411
Merged
Conversation
#410 put `--locked` on `cargo test` alone, which is the one job that needed it to make a stale `Cargo.lock` visible on the pull request. The others resolve dependencies too, and left as they were they quietly regenerate the lockfile they were handed: `Test Suite` goes red while `Clippy`, `Docs` and `Code Coverage` pass beside it, having each written a different answer to what the tree says. Whatever a job builds, it builds what the lockfile names. `just lint` and `just cov` go with them, `just test` having gone in #410. `cargo fmt` takes no lockfile and resolves nothing, so it stays as it is. `just flamegraph` and `just fuzz` are left alone as well: `cargo fuzz` builds out of `fuzz/`, which carries a manifest and a lockfile of its own, and neither recipe is a gate — a contributor profiling a change is not the person a stale lockfile has to stop. Verified by running each of the five commands with the flag against the tracked lockfile: `cargo clippy --locked` and `cargo doc --locked` are clean, `cargo llvm-cov --locked` reports the same 99.73% line coverage, and `just test` passes 378 tests. `actionlint` is clean on every workflow. Refs #394. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xqGos7Q8MiBm6G59sh4FV
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #411 +/- ##
=======================================
Coverage 99.81% 99.81%
=======================================
Files 72 72
Lines 8527 8527
=======================================
Hits 8511 8511
Misses 16 16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
akiomik
added a commit
that referenced
this pull request
Sep 6, 2026
`scripts/acceptance/test.sh` builds and runs mado to compare it against mdl, and `scripts/benchmarks/comparison.sh` builds it to time. Both did so unlocked, which is the same thing #410 and #411 fixed in CI seen from the other side: a contributor running either one has the tracked `Cargo.lock` rewritten under them by a script that only meant to measure something. The measurement is the reason, more than the lockfile is. Both scripts answer a question about this tree — what mado reports, and how long it takes — and a build that resolves a newer dependency answers it about a different one. `just flamegraph` and `just fuzz` are the two invocations this leaves, and neither can be given the flag: `cargo flamegraph` has no `--locked`, `--frozen` or `--offline` of its own and no passthrough to cargo's — its trailing arguments go to the binary being profiled — and `cargo fuzz run` has none of the three either, its trailing arguments going to libFuzzer. `just fuzz` resolves and can rewrite `fuzz/Cargo.lock`, which is tracked, so it is the same failure this closes rather than a different one; both need something other than a flag, and that is not this. Verified by running each command as the scripts now spell it: `cargo build --locked`, `cargo run --locked -- --config … check …` and `cargo build --locked --release` all succeed against the tracked lockfile. `sh -n` and `dash -n` pass on both scripts, and `shellcheck` reports what it reported before — the four SC2016 in `comparison.sh` that #398 covers, and nothing new. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xqGos7Q8MiBm6G59sh4FV
akiomik
added a commit
that referenced
this pull request
Sep 6, 2026
`scripts/acceptance/test.sh` builds and runs mado to compare it against mdl, and `scripts/benchmarks/comparison.sh` builds it to time. Both did so unlocked, which is the same thing #410 and #411 fixed in CI seen from the other side: a contributor running either one has the tracked `Cargo.lock` rewritten under them by a script that only meant to measure something. The measurement is the reason, more than the lockfile is. Both scripts answer a question about this tree — what mado reports, and how long it takes — and a build that resolves a newer dependency answers it about a different one. `just flamegraph` and `just fuzz` are the two invocations this leaves, and neither can be given the flag: `cargo flamegraph` has no `--locked`, `--frozen` or `--offline` of its own and no passthrough to cargo's — its trailing arguments go to the binary being profiled — and `cargo fuzz run` has none of the three either, its trailing arguments going to libFuzzer. `just fuzz` resolves and can rewrite `fuzz/Cargo.lock`, which is tracked, so it is the same failure this closes rather than a different one; both need something other than a flag, and that is not this. Verified by running each command as the scripts now spell it: `cargo build --locked`, `cargo run --locked -- --config … check …` and `cargo build --locked --release` all succeed against the tracked lockfile. `sh -n` and `dash -n` pass on both scripts, and `shellcheck` reports what it reported before — the four SC2016 in `comparison.sh` that #398 covers, and nothing new.
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.
Follows #410, which put
--lockedoncargo testbecause that is the job whoseabsence #394 named. The rest of the cargo jobs resolve dependencies too.
Left as they were, they quietly regenerate the lockfile they were handed:
Test Suitegoes red on a staleCargo.lockwhileClippy,DocsandCode Coveragepass beside it, each having written a different answer to whatthe tree says. Whatever a job builds, it builds what the lockfile names.
.github/workflows/ci.yml:cargo clippy,cargo doc,cargo llvm-cov.justfile:just lintandjust cov,just testhaving gone in ci: run cargo test with --locked #410.Left alone
cargo fmt— takes no lockfile and resolves nothing.just flamegraphandjust fuzz—cargo fuzzbuilds out offuzz/, whichcarries a manifest and a lockfile of its own, and neither recipe is a gate. A
contributor profiling a change is not the person a stale lockfile has to stop.
Verification
Each of the five commands run with the flag against the tracked lockfile:
cargo clippy --locked --all-targets --all-features --workspace -- -D warnings: clean.cargo doc --locked --no-deps --document-private-items --all-features --workspaceunder
RUSTDOCFLAGS=-D warnings: clean.cargo llvm-cov --locked --all-features --workspace: 99.73% line coverage, thesame as without it.
just test: 378 tests pass.just lint: clean.actionlintis clean on every workflow.No changelog entry: CI is not something a user of
madocan observe, which iswhat
CONTRIBUTING.mdasks the entry to describe.Refs #394.
🤖 Generated with Claude Code
https://claude.ai/code/session_011xqGos7Q8MiBm6G59sh4FV