Commit 667eacf
committed
infection.json5 で Str::randomHex の equivalent mutant を ignore
mutation testing (run 25111678546) で MSI 94.95% / 95% 閾値で CI failure。
原因:
- Sloop\Support\Str::randomHex 内 `intdiv($length + 1, 2)` で
IncrementInteger (+1 → +2) と DecrementInteger (除数 2 → 1) が escape
- 両 mutation とも余分 bytes 取得 + substr trim で結果同一の equivalent mutant
- \Random\Randomizer は PHP コア内部の final class、state machine の最初の
N bytes が決定論的なため、bytes 取得数を増やしても先頭 N hex chars は同一
- テスト追加 / 実装変更 (DI 等) ではいずれも kill 不能と確認
CLAUDE.md「equivalent mutant は ignore で対応、実装を mutation のために
変えない」原則に従い、infection.json5 の mutators で ignore 指定。
理由コメントは既存の Container::resolveBinding / Container::autowire と
同じく英語で記載。1 parent 173c59a commit 667eacf
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
45 | 66 | | |
46 | 67 | | |
47 | 68 | | |
| |||
0 commit comments