✅ test(sweep): every mutant in src/board-app.ts, src/decisions.ts and 3 more dies
Slice: #607
Part of #580's one-time sweep. Every Survived and NoCoverage mutant in
src/board-app.ts, src/decisions.ts, src/cubic-dismiss.ts,
src/guard.ts and src/session-start.ts now dies, and none times out.
Re-measured on main (bda2af2)
None of the five files, nor their tests, changed since 0a9c8be, and
main still holds the slice's 195 blocking mutants: 180 Survived and 15
NoCoverage. The slice's gate command on main reported 194 and was
REFUSED (see the flake below). These counts are from one Stryker run of
the five files with the flake fixed and the sources untouched:
| File | Blocking on main | Timeout | Now |
|---|---|---|---|
src/board-app.ts | 64 (61 Survived, 3 NoCoverage) | 7 | 0 |
src/decisions.ts | 58 (48 Survived, 10 NoCoverage) | 4 | 0 |
src/cubic-dismiss.ts | 55 (54 Survived, 1 NoCoverage) | 1 | 0 |
src/guard.ts | 9 (8 Survived, 1 NoCoverage) | 0 | 0 |
src/session-start.ts | 9 (9 Survived) | 0 | 0 |
A flake the first run hit
- The first gate run was REFUSED: a timeout retry's dry run failed on
cubic-dismiss.test.ts's real-git link test withENOTEMPTY. The
same flake killed one mutant in that run, so it counted 194. - Its two real-git tests ran git with the machine's global config. A
trace2 event target there has a daemon write into the fixture's
.gitwhile the test removes it. - The suite now calls
maskProcessGitEnv()before it runs and removes
its fixtures withremoveFixtureRoot, as the other real-git suites
do. Before the fix it failed in 1 of 13 Stryker dry runs here and in
my first plain run of the suite. After it, the suite passed 200 runs of 200.
How they die
- Literal expectations. Tests compared output to text rebuilt by
the code under test, such asboardAppSteps(...)or
boardAppManifest(...), so a mutant changed both sides. They now
assert the literal steps, manifest, start page and every answer page. - Edge fixtures first. Entries a
.findor.somemust pass over
(a null body, a comment with no author, another app's installation)
now come before the match. - Branches no test reached. Decisions on a personal account's
repository, and each mix of the decisions and review features. Also
the needs-owner listing refused, and lastEditors read directly. - Boundaries. Exactly 45 minutes spent, an Override 30 days out, a
78-column line, a 96-column title, 200 install looks in ten minutes. - No loop a mutant can make endless. The paged lists in
decisions.tsandboard-app.tsrecurse, and lastEditors batches
withArray.from.dismissArgswalks its words withfor...of. The
fake browser's sleep fails past the longest a run can wait, so a
mutated wait fails at once instead of timing out.
Source changes, for equivalent mutants only:
- A
?? ''fallback whose mutant changes nothing is gone:String(issue.body)andString(undo.body): a null body reads as
"null", which holds no field and undoes nothing.joinwrites an absent context as nothing.
- A catch that set what the variable already held is empty, with the
value set before the try (guard.ts,session-start.ts). session-start.tsworks out the record's folder before its
swallow-all try.localIdentityreturns from its catch instead of
keeping an always-overwritten initialiser.- A trim, split or
--guard that never mattered is gone:git remote
words and the dismissal reason are read withmatchAll(/\S+/g), and
a dismiss flag's name is cut at the first=. parseDecisionreturns from its match, not through a dead second
?.. The half-set board app message names the one secret held and
the one lacking, not a join of a one-name list.
No // Stryker disable, no new dependency, and no guard file changed.
Evidence
agnipariksha --lane src --files src/board-app.ts,src/decisions.ts,src/cubic-dismiss.ts,src/guard.ts,src/session-start.ts --no-reuse
src: 1513 killed of 1513 in 5 file(s) (1513 Killed; 0 timeout(s) retried) - pass
agnipariksha total: 1513 killed of 1513 in 1 lane(s), 0 blocking, 0 refused - exit 0
exit 0 after 47 s
- Run on
18ebc5a, which has Cubic's fixes and sits on3d446d8.
That commit (#646) changedsrc/asks.ts, whichguard.tscalls.
The verdict was all killed before the rebase too. - 1513 mutants, not the 1548 measured on main: the rewrites remove
the equivalent ones and a few more. - Stryker run directly with only the files' own suites (
guard.tsand
session-start.tstogether, the other three alone) left no
Survived, NoCoverage or Timeout mutant in any. pnpm checkexits 0 locally on the rebased branch:pnpm test
2388 of 2388,pnpm test:scripts138 of 138, with typecheck, lint,
pins, pariksha, hooks, build and smoke.- The pre-push hook (records, frozen, pins, niyam's agent check)
passed on the push.
🤖 Generated with Claude Code