How to choose the Mutation-CRAP limit (0.22.2) #43

Merged
mi merged 1 commits from mihoe/choosing-a-limit into main 2026-10-04 21:38:36 +02:00
Owner

The Problem

The README says that no threshold is proven, but not what a project should consider when it chooses one.
Two reasons to raise the limit came up: a Kotlin project set 16 instead of 10 for the branches the compiler adds, and the idea to raise it where only coding agents change the code.
Both look alike, but have opposite effects on what the gate demands.

The Solution

  • A README section "Choosing a Limit": start a ratchet at today's highest value; a higher limit also lowers the mutation score demanded from complex methods, shown for complexity 10.
  • Kotlin's generated branches are a reason to raise it, a measurement effect; code that nobody reads anymore is none, as the tests are then the only check left.
  • Version 0.22.2; no change to the plugins.

Additional Changes

  • The usage example in the README applies the plugin 0.22.0.

Prerequisite PRs

  • PR#42: this branch builds on it for the versions 0.22.1 and 0.22.2.

🤖 Generated with Claude Code

## The Problem The README says that no threshold is proven, but not what a project should consider when it chooses one. Two reasons to raise the limit came up: a Kotlin project set 16 instead of 10 for the branches the compiler adds, and the idea to raise it where only coding agents change the code. Both look alike, but have opposite effects on what the gate demands. ## The Solution - A README section "Choosing a Limit": start a ratchet at today's highest value; a higher limit also lowers the mutation score demanded from complex methods, shown for complexity 10. - Kotlin's generated branches are a reason to raise it, a measurement effect; code that nobody reads anymore is none, as the tests are then the only check left. - Version 0.22.2; no change to the plugins. ## Additional Changes - The usage example in the README applies the plugin 0.22.0. ## Prerequisite PRs - [PR#42](2026-10-04-PR%2342-plugin-0.22.0.md): this branch builds on it for the versions 0.22.1 and 0.22.2. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 1 commit 2026-10-04 17:05:46 +02:00
How to choose the Mutation-CRAP limit (0.22.2)
werkator build succeeded after 01:40
57ce56828c
A higher limit also allows weaker tests; Kotlin's generated branches
justify raising it, code changed by coding agents only does not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi force-pushed mihoe/choosing-a-limit from 2a8f92004a to 57ce56828c 2026-10-04 17:05:46 +02:00 Compare
mi merged commit e7117eba20 into main 2026-10-04 21:38:36 +02:00
mi deleted branch mihoe/choosing-a-limit 2026-10-04 21:38:36 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkcrappit#43