Skip to content

ci: run the rest of the cargo jobs with --locked - #411

Merged
akiomik merged 1 commit into
mainfrom
ci-locked-everywhere
Sep 6, 2026
Merged

ci: run the rest of the cargo jobs with --locked#411
akiomik merged 1 commit into
mainfrom
ci-locked-everywhere

Conversation

@akiomik

@akiomik akiomik commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Follows #410, which put --locked on cargo test because that is the job whose
absence #394 named. The rest of the cargo jobs resolve dependencies too.

Left as they were, they quietly regenerate the lockfile they were handed:
Test Suite goes red on a stale Cargo.lock while Clippy, Docs and
Code Coverage pass beside it, each having written a different answer to what
the tree says. Whatever a job builds, it builds what the lockfile names.

Left alone

  • cargo fmt — takes no lockfile and resolves nothing.
  • just flamegraph and just fuzzcargo 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.

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 --workspace
    under RUSTDOCFLAGS=-D warnings: clean.
  • cargo llvm-cov --locked --all-features --workspace: 99.73% line coverage, the
    same as without it.
  • just test: 378 tests pass. just lint: clean.
  • actionlint is clean on every workflow.

No changelog entry: CI is not something a user of mado can observe, which is
what CONTRIBUTING.md asks the entry to describe.

Refs #394.

🤖 Generated with Claude Code

https://claude.ai/code/session_011xqGos7Q8MiBm6G59sh4FV

#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

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.81%. Comparing base (d911b3e) to head (2173a80).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@akiomik
akiomik merged commit fb5e57a into main Sep 6, 2026
18 checks passed
@akiomik
akiomik deleted the ci-locked-everywhere branch September 6, 2026 15:46
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.
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