Skip to content

ci: run mutation tests with Infection - #19

Merged
roxblnfk merged 1 commit into
1.xfrom
ci/mutation-testing
Oct 9, 2026
Merged

roxblnfk merged 1 commit into
1.xfrom
ci/mutation-testing

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026

Copy link
Copy Markdown
Member
Q A
Bugfix? ❌
Breaks BC? ❌
New feature? ❌
Issues —

Adds mutation testing with Infection on top of the Testo suite.

  • Mutation Tests workflow runs on PRs and pushes to 1.x (PHP 8.4, Xdebug, zend.assertions=1) with --min-msi=90 --min-covered-msi=90; pushes to 1.x send the report to the Stryker dashboard, and the README gets its badge.
  • Local run: 38 mutants, MSI 92%, covered MSI 92%. A new data set checks that a float TTL is rounded to the nearest microsecond (kills the floor/ceil mutants). The 3 escaped mutants are equivalent: round/floor/ceil and the (int) cast on the already integral DateInterval product.

Review notes

  • Infection is installed with composer require in the workflow, not from the phar: the Testo adapter bundled in the 0.35.6 phar writes a bootstrap calling the unscoped \Infection\StreamWrapper\IncludeInterceptor, while the phar only contains the scoped class, so every mutant ends as an error.

  • It is not in require-dev because Infection ≥ 0.33 needs PHP 8.3+, and the package supports 8.2.

  • How was this tested:

    • Infection and Testo run locally (PHP 8.4, Windows)

test: check that TTLs are rounded to the nearest microsecond

Infection is installed in the workflow rather than from the phar or require-dev: the 0.35.6 phar's Testo adapter calls the unscoped IncludeInterceptor, and Infection needs PHP 8.3+ while the package supports 8.2. The three remaining escaped mutants are equivalent: rounding or casting the already integral DateInterval product.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk requested a review from a team October 9, 2026 19:53
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

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

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0cab1fd3-5405-4f4d-a4fc-5a8c67a0e7e4

  • 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

Comment @coderabbitai help to get the list of available commands.

@roxblnfk
roxblnfk merged commit f5503b1 into 1.x Oct 9, 2026
15 checks passed
@roxblnfk
roxblnfk deleted the ci/mutation-testing branch October 9, 2026 19:54
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