Pass --locked to the cargo-mutants install fallback (#364) - #377
Conversation
…pinned (#364) cargo binstall falls back to a source build when no prebuilt binary matches the runner. Without --locked that build resolves cargo-mutants' dependency tree to the newest permitted versions and can pull in a transitive crate whose MSRV exceeds the pinned nightly toolchain (cargo-platform 0.3.3 needing rustc 1.91 broke a run against nightly-2025-06-26), failing the install before any mutant runs. Add --locked to both binstall invocations; it is forwarded to the source build, which then honours cargo-mutants' committed Cargo.lock. This mirrors the cargo-nextest install in the generate-coverage action. Pin a shape-test invariant that the install passes --locked.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Summary
Validation
WalkthroughUpdate the mutation workflow to pass ChangesMutation tool installation
Possibly related issues
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 19 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (19 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
cargo binstallfalls back to a source build when no prebuilt binary matchesthe runner. The
Install cargo-mutantsstep ran binstall without--locked,so that fallback resolved cargo-mutants' dependency tree to the newest
permitted versions and pulled in a transitive crate whose MSRV exceeded the
pinned nightly toolchain —
cargo-platform 0.3.3requiring rustc 1.91 broke ascheduled run against
nightly-2025-06-26, failing the install before anymutant ran.
This adds
--lockedto both binstall invocations. cargo-binstall forwards--lockedto the source-build fallback, which then resolves againstcargo-mutants' committed
Cargo.lockand stays reproducible on the pinnedtoolchain. This mirrors the existing
cargo-nextestinstall in thegenerate-coverageaction, which already passes--locked.Design note
Two options were considered: (a) add
--locked, or (b) disable the compilestrategy (
--disable-strategies compile) and fail fast when no prebuilt binaryexists. Option (a) is chosen: it keeps the resilient source-build fallback
working (so a runner without a matching prebuilt binary still installs) while
removing the MSRV-drift failure mode, and it matches the established pattern in
this repo. Failing fast would trade a latent fragility for a hard outage
whenever a prebuilt binary is briefly unavailable.
Closes #364.
Review walkthrough
.github/workflows/mutation-cargo.yml—cargo binstall --no-confirm --lockedin both branches of
Install cargo-mutants, with an explanatory comment.workflow_scripts/tests/test_mutation_workflow_shape.py— new invarianttest_cargo_mutants_install_is_locked.Validation
pytest workflow_scripts/tests/test_mutation_workflow_shape.py— 5 passed.ruff format --check/ruff check— clean.Note for maintainers
The axinite sweep noted a
cargo-nextestfallback missing--locked. Inshared-actions the nextest install (
generate-coverage/scripts/install_cargo_nextest.py)already passes
--locked, so any remaining gap is in a caller repository, nothere.