Repository navigation
Commit 6fde2ef
committed
test(bedrock): kill the cacheDetails reader mutants the gate found surviving
What:
- Add a 3-row `it.each` covering the malformed split shapes the reader must
absorb: a 5m entry with no 1h entry, a negative 1h count, and a zero 1h count.
- Add a split ordered 5m-first so the reader is proven to match on the ttl value
rather than trusting the entry's position.
Why:
CI's mutation-diff run reported four survivors inside `readCacheWrite1hTokens`.
Re-run of Stryker on the same span confirmed all four, and three are real gaps
rather than equivalent mutants: the optional chain before `.inputTokens` was
never exercised without a 1h entry, the `ttl === ONE_HOUR` predicate was only
ever fed a 1h-first array (so "return the first entry" passed), and the `<= 0`
guard was never fed a negative count. The fourth (`<= 0` -> `< 0`) is equivalent
because `!oneHour` already rejects 0.
Impact:
Test-only. `readCacheWrite1hTokens` is unchanged and still clamps to the reported
aggregate. Stryker on the same span now kills 14/15, with the single survivor
being the equivalent `<= 0` -> `< 0` mutant. No production line, price row, or
suppression count changes.1 parent 7a06eac commit 6fde2ef
1 file changed
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
382 | 442 | | |
383 | 443 | | |
384 | 444 | | |
| |||
0 commit comments