mutation-testing-stryker-gotchas

Diagnose and fix Stryker mutation testing survivors, directive failures, and sharded merge errors.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill mutation-testing-stryker-gotchas-vilnacrm-org
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mutation-testing-stryker-gotchas
Source: https://github.com/VilnaCRM-Org/claude-plugins/tree/main/plugins/react-frontend-sdlc/skills/mutation-testing-stryker-gotchas
Command: npx skills add https://github.com/VilnaCRM-Org/claude-plugins --skill mutation-testing-stryker-gotchas-vilnacrm-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Stryker mutation testing can fail silently in ways that look like a broken quality gate: equivalent mutants no test can kill, Stryker disable next-line comments that never take effect, and sharded CI merges that report survivors the owning shard already killed. This Skill provides deterministic fixes for each of these three traps. ## Core Features & Use Cases - Equivalent mutant resolution: Prove whether a survivor is equivalent, adopt the simpler program by deleting dead code, or annotate with a proof-based reason when no honest refactor exists (e.g., ArrayDeclaration mutants on React hook dependency arrays). - Directive placement correction: Fix Stryker disable next-line comments that dangle above }, []); and lead no node, by expanding the call so the array literal starts on its own line. - Sharded merge ownership: Rebuild shard packing with the same algorithm the shards used, keep each file only from its current owner, and drop stale incremental-cache results. - Use Case: A merged sharded mutation report shows a score lower than every individual shard's report. Use this Skill to identify stale-owner results from incremental caches and correct the merge to respect file ownership. ## Quick Start Ask the AI to explain why a Stryker survivor with an empty killedBy list persists and how to fix it without lowering the break threshold.

Frequently Asked Questions about mutation-testing-stryker-gotchas

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a Stryker survivor that no test can kill?▼

A survivor no test can kill is likely an equivalent mutant. First prove equivalence, then prefer adopting the simpler program by deleting the dead code path. Annotate with a disable directive only when no honest refactor exists, and put the equivalence proof in the reason.

Why is my Stryker disable next-line comment not working?▼

Stryker reads the directive from a node's leading comments and keys next-line off that node's line. A comment dangling above a closing line like `}, []);` leads no node and is silently ignored. Expand the call so the annotated element starts on its own line.

How do I handle ArrayDeclaration mutants on React hook dependency arrays?▼

ArrayDeclaration rewrites an empty deps array to a one-element constant, but React compares deps with Object.is so the effect fires identically, making the mutant equivalent. Hoisting the literal would remove it, but react-hooks/exhaustive-deps rejects non-literal deps, so annotate with the equivalence proof.

Why is my merged Stryker score lower than every shard's report?▼

Shard membership is packed by file size, so editing a file moves it between shards while incremental caches retain old results. Merging on first occurrence lets stale results outrank the current owner. Rebuild the packing with the shards' algorithm and keep each file only from its current owner.

When should I not use a Stryker disable directive?▼

Do not use a disable directive for ordinary survivors that a real assertion would kill — write the assertion instead. Also avoid it before checking whether the simpler program is available, and never lower the break threshold or narrow mutate scope to get past a survivor.