Skip to content

Raise mutation testing MSI to 97% - #11

Merged
rflavien merged 1 commit into
mainfrom
fix/msi
Mar 13, 2026
Merged

rflavien merged 1 commit into
mainfrom
fix/msi

Conversation

@rflavien

Copy link
Copy Markdown
Contributor

Summary

  • Kill 5 escaped mutants with targeted boundary/logic tests in DeprecationRouteDescriber, DeprecationHeaderListener, and BrownoutChecker
  • Centralize MSI threshold (95%) in infection.json5, removing redundant CLI flags from CI and Makefile
  • MSI: 94.34% (150/159) → 97.48% (155/159)

Test plan

  • make test — all PHPUnit tests pass
  • make infection — MSI ≥ 95% (currently 97.48%)
  • make qa — full quality gate passes

🤖 Generated with Claude Code

…onfig

Kill 5 escaped mutants by adding targeted tests:
- Ternary swap, AND/OR logic, and concat mutations in DeprecationRouteDescriber
- Boundary condition (>= vs >) in DeprecationHeaderListener sunset check
- Exact cron time window end in BrownoutChecker

Move MSI threshold (95%) to infection.json5, remove redundant CLI flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 13, 2026 14:21
@rflavien
rflavien merged commit ba441b4 into main Mar 13, 2026
14 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens mutation testing by adding targeted boundary/logic tests around API deprecation behavior (headers, sunset handling, brownout timing) and simplifies Infection configuration by relying on infection.json5 thresholds instead of CLI flags.

Changes:

  • Add boundary tests for sunset-at-exact-time behavior in DeprecationHeaderListener, exact-cron-time behavior in BrownoutChecker, and route-method scoping/description formatting in DeprecationRouteDescriber.
  • Remove redundant --min-msi/--min-covered-msi flags from Makefile and CI Infection invocations (thresholds enforced via infection.json5).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/EventListener/DeprecationHeaderListenerTest.php Adds a sunset boundary-time test using an injected clock to kill mutation at the >= cutoff.
tests/Brownout/BrownoutCheckerTest.php Adds a test for brownout window end when the clock is exactly on the cron tick.
tests/Bridge/NelmioApiDoc/DeprecationRouteDescriberTest.php Adds tests ensuring only route methods are affected and description formatting is exact; tightens an existing assertion.
Makefile Runs Infection without MSI CLI thresholds (delegates to infection.json5).
.github/workflows/ci.yml Runs Infection without MSI CLI thresholds (delegates to infection.json5), keeping GitHub logger.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@rflavien
rflavien deleted the fix/msi branch March 13, 2026 14:59
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