Skip to content

Count uncovered code in mutation testing (--with-uncovered) - #42

Merged
rasuvaeff merged 1 commit into
masterfrom
test/mutation-with-uncovered
Nov 1, 2026
Merged

rasuvaeff merged 1 commit into
masterfrom
test/mutation-with-uncovered

Conversation

@rasuvaeff

Copy link
Copy Markdown
Owner

Rollout of the mutation rule recorded in the monorepo AGENTS.md ("Мутации: --with-uncovered обязателен"). No src/ changes, so no release.

Testo credits a test only with the code its #[Covers] names, and Infection by default mutates only credited code. Code the tests execute but do not name therefore had no mutants and the gate reported Not Covered: 0. With --with-uncovered those mutants are generated and counted in the overall MSI.

Changes

  • composer mutation: Composer\Config::disableProcessTimeout, then infection --threads=max --with-uncovered.
  • infection.json5: PublicVisibility off and global-ignoreSourceCodeByRegex for parameter defaults (as in the template). minMsi stays 95 with its existing comment.
  • CHANGELOG entry. No new tests needed: every mutant is either killed or sits on a signature line.

Numbers (local, pcov)

Before (--with-uncovered, old config) After
Mutants 28 26 counted
Not Covered 2 0
Escaped 0 0
Timed Out 0 0
Ignored 0 2 (parameter defaults on signature lines)
Overall MSI 92% 100% (minMsi 95, unchanged)

Without the ignore regex the two signature-line mutants stay Not Covered (no executable opcode under pcov) and the MSI is 26/28 = 92.9%, below 95. They are shown as Ignored, not hidden. composer mutation exits 0 twice in a row.

@rasuvaeff rasuvaeff added the enhancement New feature or request label Nov 1, 2026
@rasuvaeff rasuvaeff self-assigned this Nov 1, 2026
@rasuvaeff rasuvaeff added the enhancement New feature or request label Nov 1, 2026
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f1343377-cf3b-4f93-8131-9797887a726e
  • 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

@rasuvaeff
rasuvaeff merged commit 4bc24ac into master Nov 1, 2026
12 checks passed
@rasuvaeff
rasuvaeff deleted the test/mutation-with-uncovered branch November 1, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant