✅ test(cloud, renumber-doc): every mutant in src/cloud.ts and src/renumber-doc.ts dies
Merged
AT
8h ago+415+415+012345678901234567890123456789-24-24-01234567890123456789
Slice: #609
Part of #580's sweep. Every mutant in src/cloud.ts and src/renumber-doc.ts now dies.
Re-measured on main (bda2af2): neither file nor its suite changed since 0a9c8be, and the count is the inventory's. 199 blocking:
src/cloud.ts: 152 (50 Survived, 102 NoCoverage)src/renumber-doc.ts: 47 (47 Survived)
How they die
cloud.test.ts:cloudLoginandreleaseSha256are tested on a FakeSys. They were NoCoverage because only other suites called them.cloudSigningis tested in-process. Its git is stood in for, and the probe commit is signed in memory withsshsig.ts. Each refusal and each probe failure is checked by its exact message, along with the files written, their modes, and the probe's env.- The cloud setup script and the Setup snippet are checked word for word, with every constant spelled out.
renumber-doc.test.ts:- Each regex's anchors and spacing in
rewriteRelationshipsandresidualBareRefs. isHistory's!patterns.applyPlanon a FakeSys disk: it confines each file before writing it, and reports git mv's message trimmed. Nothing touches the real disk.
- Each regex's anchors and spacing in
Source changes, made only where a mutant was equivalent:
cloud.ts:- catch blocks that only restated
undefined; existsguards that the catch already covers;lastLine's?? '', and the?? []on a release's assets;- a
typeofthatisSafeIntegeralready implies.
- catch blocks that only restated
renumber-doc.ts:rewriteRelationships' early return when there are no keys;residualBareRefs'end < 0(endis never 0) and its null-guarded key check;renumberArgs'undefinedchecks, which the four-digit test already implied.
Behaviour is unchanged. No // Stryker disable.
Evidence
pnpm exec agnipariksha --lane src --files src/cloud.ts,src/renumber-doc.ts --no-reuse
src: 874 killed of 874 in 2 file(s) (874 Killed; 0 timeout(s) retried) - pass
agnipariksha total: 874 killed of 874 in 1 lane(s), 0 blocking, 0 refused - exit 0
exit 0 after 577 s
- 874 mutants, not the inventory's 907: the source rewrites remove 33.
- The full pre-push passed on push: records, frozen, pins and niyam.
- Typecheck, lint, and the suites that call the changed functions (
cloud,renumber-doc,doctor,session-start,push-identity,onboard) pass.
🤖 Generated with Claude Code
Summary by cubic
Eliminates all surviving mutants in src/cloud.ts and src/renumber-doc.ts, so mutation testing now kills 874 of 874 mutants. Behavior is unchanged.
Tests
cloudLoginandreleaseSha256run on a FakeSys;cloudSigningruns in-process with git stood in for, checking each refusal and probe failure, and the setup script and Setup snippet are asserted word for word.rewriteRelationships,residualBareRefs, andisHistorygain edge-case coverage, andapplyPlanruns on a fake disk to verify confine-before-write and the trimmedgit mvmessage.
Source changes
- Removed redundant guards and fallbacks in
cloud.tsthat surrounding code already covers. - Dropped equivalent early returns and undefined checks in
renumber-doc.ts.