8000 cargo-mutants 27.1.0 (new): mutation testing for Rust (fv-lab) by bryan-minimal · Pull Request #1609 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content

cargo-mutants 27.1.0 (new): mutation testing for Rust (fv-lab) - #1609

Merged
bryan-minimal merged 1 commit into
mainfrom
cargo-mutants
Nov 21, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
cargo-mutants

Conversation

@bryan-minimal
Copy link
Copy Markdown
Member

What

New package cargo-mutants 27.1.0 (sourcefrog/cargo-mutants, latest release), mutation testing for Rust. Wanted for the fv-lab loadout (formal-verification lab sessions, amd64 + arm64): it reads mutation testing against the proofs.

  • Built from source with our rust: cargo fetch --locked against upstream's Cargo.lock, then cargo build --frozen --release under the detbuild preload. RUSTFLAGS carry -C linker=gcc, --remap-path-prefix for the source and cargo-home paths, codegen-units=1 and v0 mangling (as codex, nushell and zola do).
  • Source is mirrored create-only at gs://minimal-staging-archives/sourcefrog/cargo-mutants/v27.1.0.tar.gz, byte-identical to GitHub's archive/refs/tags/v27.1.0.tar.gz (sha256 e57d8c31…).
  • Ships no toolchain. It runs whatever cargo is on PATH, so rust is only a test dep. Runtime deps are glibc and subsetOf gcc ["libgcc"] (libgcc_s, for unwinding). build.sh fails closed if the binary ever NEEDs anything outside glibc and libgcc_s.
  • No -sys crates and no build script that downloads anything.

Tests (standalone)

  • version_check: cargo-mutants mutants --version is exactly cargo-mutants 27.1.0.
  • list: writes a one-function crate, runs cargo mutants --list through cargo's subcommand lookup, and requires two specific mutants of add. It uses rust as a test dep. Nothing is compiled, so it needs no linker.

How tested

  • arm64 (local min session, pkgbuild loadout): min package build --rebuild --verbose cargo-mutants built, and min check --packages cargo-mutants passed every check, standalone tests included.
  • Negative control: with the expected mutant changed to one that does not exist, the list test failed. Restored afterwards.
  • amd64: build-bot on this PR.
  • Every recipe was run through nickel format and evaluated on both arches.

Unresolved / for the reviewer

  • gcc-runtime (gcc 15.2.0 → 16.2.0, with gcc-runtime split out (pm#1182) #1545). main has no gcc-runtime yet, so this uses subsetOf gcc ["libgcc"] like every other Rust package. gcc 15.2.0 → 16.2.0, with gcc-runtime split out (pm#1182) #1545's gcc_runtime_guard rejects that. Whichever of the two merges second has to change this line to subsetOf gcc-runtime ["libgcc"].

  • RustSec advisories in upstream's Cargo.lock (OSV.dev, all 202 registry crates checked). None is a CVE in reachable code, and none is lock-patched here:

    • anyhow 1.0.86, RUSTSEC-2026-0190, unsound Error::downcast_mut (fixed in 1.0.103)
    • crossbeam-epoch 0.9.18, RUSTSEC-2026-0204, fmt::Pointer on an invalid pointer (fixed in 0.9.20)
    • rustix 1.1.2, RUSTSEC-2026-0486, xattr functions given a zero-length buffer (fixed in 1.1.6)
    • atty 0.2.14 (RUSTSEC-2021-0145 and RUSTSEC-2024-0375, unmaintained) and yaml-rust 0.4.5 (RUSTSEC-2024-0320, unmaintained), with no fixed release

    If we want floors, pkgmgr lock-patch cargo-mutants can generate them as a follow-up.

🤖 Generated with Claude Code

@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 20, 2026 20:16
@coderabbitai
coderabbitai Bot commented Nov 20, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 58 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 03aa958 and ebe99c9.

Files selected for processing: 2

  • packages/cargo-mutants/build.ncl
  • packages/cargo-mutants/build.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope matches the title. The diff adds one package, packages/cargo-mutants/build.ncl and packages/cargo-mutants/build.sh, and touches nothing else. Clobber none: both files are new, and git log shows only the PR commit on that path. Correctness The recipe follows packages/zola and packages/cargo-nextest: the same gs://minimal-staging-archives mirror shape, the same glibc + subsetOf gcc ["libgcc"] runtime deps, and no cd after strip_prefix. The detbuild rules hold: detbuild is in build_deps, cargo fetch --locked runs without the preload, and the preload is a prefix on one cargo build --frozen command. The readelf gate fails closed, also on empty output. The comments explain the code and do not narrate the change. One nit: build_args forwards version, and build.sh does not read it. Not checked I did not build the package. I did not verify the source sha256, the mirror bytes, the upstream license, or the exact cargo mutants --list output that the list test expects. gitleaks and trivy did not run, because the harness denied those commands. The PR body lists RustSec advisories in the upstream Cargo.lock, and I did not verify that list. The CLI version is not known, because the harness denied claude --version.

} | Needs,

cmd = "./build.sh",
build_args = { include version },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit · build_args forwards version, but build.sh does not read MINIMAL_ARG_VERSION. The source extracts into the cwd through strip_prefix, so the script needs no version. Remove the line, as packages/zola/build.ncl does. packages/cargo-nextest/build.ncl has the same unused forward, so this is a small pattern and not one instance.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 907ca2b Nov 21, 2026
16 checks passed
@bryan-minimal
bryan-minimal deleted the cargo-mutants branch November 21, 2026 16:53
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.

2 participants

0