Skip to content

ci: run mutation tests with Infection - #47

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

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

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🔍 What was changed

  • New Mutation Tests workflow: PHP 8.4 with Xdebug and ext-msgpack, starts the Go test server, runs Infection over src with --min-msi=90 --min-covered-msi=90 and publishes the 4.x report to the Stryker dashboard on push.
  • infection.json.dist writes into runtime/, emits GitHub annotations and the Stryker report; mutation testing badge added to the README.

Review notes

  • The Infection phar (0.35.6) cannot run Testo mutants: the bundled testo/bridge-infection writes the unscoped \Infection\StreamWrapper\IncludeInterceptor into the mutant bootstrap, while the phar only has Infected\Infection\..., so every mutant fails with "class not found" and is counted as killed. The workflow installs Infection with Composer inside the job instead; composer.json is unchanged.
  • Infection kills the initial test run (exit 143) on the first stderr output; MsgPackMultiRPCTest::testHandlesCloneCorrectly triggers an expected msgpack "Extra bytes" warning, so the job runs with log_errors=Off.
  • The STRYKER_DASHBOARD_API_KEY secret is required for the dashboard report and badge.

Checklist

  • How was this tested:
    • CI run: 493 mutants, MSI 91%, covered MSI 91%, mutation code coverage 100% (42 escaped, 55 timeouts), about 9 minutes on 3 threads
    • Local run in Linux (PHP 8.4, ext-msgpack, Xdebug) against the test server: MSI 89%

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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 19 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ee450e4e-d1c5-4350-a3eb-00333a32316f

📥 Commits

Reviewing files that changed from the base of the PR and between 649b48e and ec6838d.


📒 Files selected for processing (3)
  • .github/workflows/mutation.yml
  • README.md
  • infection.json.dist


  • 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 force-pushed the ci/mutation-testing branch 2 times, most recently from 187ee9c to 7d696b3 Compare October 9, 2026 18:04
The Infection phar cannot run Testo mutants: its bundled adapter references the unscoped `\Infection\StreamWrapper\IncludeInterceptor`, which only exists under the `Infected\` prefix inside the phar. Infection is therefore installed with Composer inside the PHP 8.4 job, keeping require-dev installable on PHP 8.2.

Infection stops the initial test run on the first stderr output, so `log_errors` is off: the msgpack clone test triggers an expected "Extra bytes" warning.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk force-pushed the ci/mutation-testing branch from 7d696b3 to ec6838d Compare October 9, 2026 19:40
@roxblnfk
roxblnfk requested a review from a team as a code owner October 9, 2026 19:40
@roxblnfk

roxblnfk commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@roxblnfk

roxblnfk commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@roxblnfk
roxblnfk merged commit d62f1a2 into 4.x Oct 9, 2026
15 checks passed
@roxblnfk
roxblnfk deleted the ci/mutation-testing branch October 9, 2026 20:14
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