✅ test(asks): every mutant in src/asks.ts and src/design.ts dies
Merged
AT
8h ago+537+537+012345678901234567890123456789-167-167-012345678901234567890123456789
Slice: #606
Every mutant in src/asks.ts and src/design.ts now dies. This is slice 1 of #580's sweep.
Re-measured on main (bda2af2). The two files held 216 blocking mutants, not the 200 found on 0a9c8be:
src/asks.ts: 188 (181 Survived, 7 NoCoverage). It was 172; #642's closed-issue sweep added code.src/design.ts: 28 (25 Survived, 3 NoCoverage), unchanged.
How they die
- Tests in
asks.test.tsanddesign.test.ts:- every gh flag that takes a value, placed before the subcommand;
- each Actions env var missing on its own;
- each boundary instant: an answer made at the ask's own instant, an image covering exactly half a frame, a Figma budget spent to the millisecond;
- null authors, labels, actors and issue types;
- the reads a guard skips, seen in
sys.requests.
- Source rewrites, only where no test could tell a mutant apart. Behaviour is unchanged except for the notes below.
- Loops a mutant could make endless are now recursion: gh's argument scans, the list pages, the walk up to the settings, and the slice's state pages. Each such mutant now stops at Stryker's hit limit, a Timeout that ends at once, instead of a 90 s timeout. 15 real timeouts became 5 instant ones.
- Fallbacks no reader could see are gone:
?? ''before a regex:opensAskandopensDecisiontake a missing body.[]before a filter that drops anything else.{ asked: false }.removeLabel's unread result.instances, a count only ever compared with 0, now a boolean.length > 0guards beforeownersAlone, which reads nothing for an empty list.
every's 404 case becameeveryFound, which returns undefined for a list GitHub cannot find.
- No
// Stryker disable, and no check weakened.lint/eslint-suppressions.jsondrops threestrict-scalar-parseentries ofasks.tsthat the rewrite left unused.
Behaviour notes
- A literal
\u0000escape in a GraphQL comment body now reads as known. Before, it read as a part only the shell knows. A real shell-only part is a raw NUL, which JSON cannot parse, so the guard still cannot read that body. - A 404 on page 2 or later of the timeline or the Approvals issue's comments now fails the run. Before, it returned the pages read so far. Page 1's 404 still reads as "not found".
- The total went from 1338 mutants to 1231 because the rewrites removed code.
Evidence
pnpm exec agnipariksha --lane src --files src/asks.ts,src/design.ts --no-reuse
src: 1231 killed of 1231 in 2 file(s) (1226 Killed, 5 Timeout; 5 timeout(s) retried) - pass
agnipariksha total: 1231 killed of 1231 in 1 lane(s), 0 blocking, 0 refused - exit 0
exit 0 after 22 s
- Before:
216 blocking(206 Survived, 10 NoCoverage, 15 Timeout), exit 1 after 698 s. pnpm checkpasses locally (exit 0).
🤖 Generated with Claude Code
Summary by cubic
Makes every mutant in src/asks.ts and src/design.ts die: new tests kill all 1231 mutants, and the source is rewritten where no test could distinguish a mutant.
- A batch answer posted on the Approvals issue counts again when GitHub cannot list that issue's comments; the sweep rewrite had dropped it.
- Comments with no body read as opening with nothing, and a GraphQL query's written body is read whole wherever JSON parses it.
- Recursive scans replace loops so a looping mutant ends at Stryker's hit limit instead of a 90-second timeout.
- Drops three now-unused strict-scalar-parse suppressions.