Skip to content

fix(ci): create mutation testing output directory - #8174

Merged
kixelated merged 1 commit into
mainfrom
fix/mutants-output-directory
Nov 7, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/mutants-output-directory

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The scheduled Mutants run fails before testing: cargo-mutants cannot create target/mutants when target does not exist on the clean runner.

Approach

Create the output directory after clearing previous results.

Impact

  • No public API or wire changes.

Alternatives

Creating only target also works; creating the configured output directory keeps this independent of its path.

Validation

  • nix develop --command quest gate just ci passed.
  • Reproduced the missing-parent error locally; with the directory created, cargo-mutants reaches discovery and build. Stopped the build after confirming startup; the full mutation suite was not run.

Review

Skipped local cross-vendor review for the trivial directory creation change.

Follow-ups

Interop's stale attribute assertion is already addressed by #8168. Other Nightly job failures remain outside this fix.

(Written by GPT-6.1 Sol)

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b41ef321-fe1e-4564-9dfb-1fe5bb3a8773
Commits

Reviewing files that changed from the base of the PR and between 3ad0037 and 88696e1.

Files selected for processing: 1

  • sh/rs/mutants.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Create the mutants output dir before invoking cargo-mutants — after rm -rf target/mutants, sh/rs/mutants.sh now runs mkdir -p target/mutants, so cargo-mutants' non-recursive output-directory creation succeeds on a clean checkout where target/ does not yet exist.

The fix matches upstream behavior: OutputDir::new in cargo-mutants only calls fs::create_dir on the --output path (verified for v25.3.1 and current main; nixpkgs pins v27.1.0), so it fails with "create output parent directory" when target/ is missing. Pre-creating the directory is explicitly supported, and the rm -rf immediately above still prevents cargo-mutants from rotating stale mutants.out results.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed head 88696e1.

No actionable findings. Creating the configured output directory after cleanup and before invoking cargo-mutants addresses the clean-checkout startup failure without changing mutation selection or exit-status handling.

Verification: GitHub-only static review of the diff and complete wrapper. I did not run cargo-mutants or the mutation suite.

@kixelated
kixelated added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 45ca9c1 Nov 7, 2026
6 checks passed
@kixelated
kixelated deleted the fix/mutants-output-directory branch November 7, 2026 19:44
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