ā test(pr-autocreate): every mutant in src/pr-autocreate.ts lines 606 on dies
Slice: #625
Part of #580's one-time sweep. Part 2 of src/pr-autocreate.ts, lines 606 to the end (part 1 merged as #696). Every Survived and NoCoverage mutant in the file now dies, and the timeout-retry pass that refused #624's runs twice now settles inside its budget.
Evidence
The gate judges the whole file (agnipariksha 0.8.8's --files takes no line range). Two runs:
agnipariksha --lane src --files src/pr-autocreate.ts --no-reuse
6019a2f: src: 1578 killed of 1592 in 1 file(s) (1569 Killed, 7 Timeout, 14 Survived, 2 RuntimeError; 7 timeout(s) retried) - 14 blocking
exit 1 after 723 s
98e087c: src: 1586 killed of 1586 in 1 file(s) (1577 Killed, 7 Timeout, 2 RuntimeError; 7 timeout(s) retried) - pass
agnipariksha total: 1586 killed of 1586 in 1 lane(s), 0 blocking, 0 refused - exit 0
exit 0 after 593 s
On #624's head, the same gate found 71ā74 blocking mutants in lines 606 and on, and both runs were REFUSED on Timeouts, after 41 and 56 min. Now the gate takes 10 min, with 7 Timeouts, all retried and counted as killed.
- Before the second run, the 11 surviving mutants that needed tests were applied by hand, one at a time. Each one fails the suite. The other 3 were equivalent and the source rewrite below removes them.
pnpm checkexits 0:pnpm test3060 of 3060 andpnpm test:scripts138 of 138. Typecheck, lint, pins and pariksha pass too.- Guard's test-count check on the test file's diff gives
{"fewer":false,"skipped":false}. The diff is 693 lines, and no added line holdsskip,onlyortodo.
How they die
-
Part 2 runs in process now. A new describe,
pr-autocreate hooks, in-process, runs part 2's code on FakeSys, before the deferred real-git suites (describeLater). It covers:pushTarget's refspecs;- every sentence of the instruction;
- sarathi's Auto-fix list: where it lives, the row it adds, the state it folds;
- the token GitHub is asked with, and the git call that finds the repository;
claudeHookend to end, with git and GitHub faked;spawn-watchers, flags and timings,refuse-retiredandwatch.
A part-2 mutant now dies there in seconds, where it used to wait on git and time out.
-
The second commit kills the 14 the first gate left. Its tests pin:
- the Auto-fix row's source, as text;
- a failed
gh auth tokenwhose stdout still holds a token; - a recorded pull request that is closed or has no link, which gets no instruction;
- a cloud session on a list that shows Auto-fix on;
- a PostToolUse with no
tool_input; - an upstream on a remote whose name is as long as
origin; - no git call after a missing tracking ref;
- a record with no notes saved once.
Source changes, for equivalent mutants only
pushTargetslices the destination after the first colon (the whole spec when there is none).pullOfreads the link with one pattern.listRowreads a line that is not JSON as null for the schema.autofixStatereads each row through a schema that answers undefined for a line that is no row.autofixMessagetakes the session as the string or undefined thatclaudeHookmade it.pullsForasksgithubSlugonly of a url git gave.claudeHookhandspushTargetthe command as text.flagssplits--name=valueat its first=.refuse-retiredandspawn-watcherstake an unnamed--remoteas it is.spawn-watchersleaves the state folder torecordOptout's lock.watchmatches ls-remote's sha and tab, and logs with no empty part.
No // Stryker disable, no weakened check, no new dependency, and no guard file changed. Stryker's concurrency, timeoutMS and the lane are as they were.
š¤ Generated with Claude Code
Summary by cubic
Makes every mutation in src/pr-autocreate.ts from line 606 to the end die, completing part 2 of the #580 sweep (part 1 merged in #696). The mutation gate that refused two earlier runs after timing out now passes in about 10 minutes, killing 1586 of 1586 mutants with no // Stryker disable, no weakened check, and no new dependency.
Testing
- A new in-process suite runs part 2's code on FakeSys before the slow real-git suites, so mutants die in seconds instead of waiting on git and timing out.
- A second pass pins the 14 survivors of the first gate with tests that each fail before their fix.
Source changes (equivalent mutants only)
pushTarget,pullOf,listRow,autofixMessage,pullsFor,claudeHook,flags,refuse-retired,spawn-watchers, andwatcheach read what they got, losing the branch or default only the dead mutant kept.pnpm checkpasses: 3060 unit and 138 script tests, typecheck, lint, pins, and pariksha.