Two tests passed for every possible production bug. Both now fail for a specific one,
and both were checked against the mutant they are meant to catch.
- `runner-io.test.ts` "a tail whose file disappears stops on its own instead of
throwing" discarded every chunk (`onOutput: () => {}`) and asserted nothing, so the
sentence the test is named after was never observed. It now collects the chunks and
requires the tail to still be silent after the log reappears. Mutating `drain()`'s
`catch { stop(); }` to swallow and keep polling — i.e. exactly the give-up-then-
resume bug the in-code comment forbids — reddens this test
(`1 failed | 7 passed`) while the old body reports `8 passed`.
- `inventory.test.ts` "Vega inventory ... accepts only its virtual device" compared
discovery output against `parseVegaDeviceList(...)`, a production export, so the
parser was its own expected value and both sides moved together. It now spells the
device out. Flipping `kind: 'emulator'` to `'physical'` reddens it
(`1 failed | 1 passed`) where the oracle reported `2 passed`. That literal is also
the first real test of `parseVegaDeviceList`: the oracle call was its only reference
outside `inventory.ts`, so `kind`, `booted`, `target`, and the display-name format
were pinned nowhere.
Dropped from this change after a second read: `runner-sequence.test.ts`'s unasserted
`validateRunnerSequenceSteps(...)` accept-paths. A throw fails those tests, and the
cap+1 rejection is pinned two tests above the cap case, so the boundary is closed.
Summary
Two tests passed for every production bug of the kind they claim to catch. Both now lose for a
specific one, and I ran the mutant against both the old and the new body.
runner-io.test.ts— "a tail whose file disappears stops on its own instead of throwing"onOutput: () => {}threw every chunk away; the body had zero assertions, so the "stops on its own" half of its own name was never observeddrain()'scatch { stop(); }→ swallow and keep polling (runner-io.ts:211), i.e. precisely the give-up-then-resume bug the in-code comment forbids8 passed1 failed | 7 passedinventory.test.ts— "Vega inventory … accepts only its virtual device"parseVegaDeviceList(...), a production export — the parser was its own oracle, so both sides moved togetherkind: 'emulator'→'physical'inparseVegaDeviceList(inventory.ts:26)2 passed1 failed | 1 passedparseVegaDeviceListis the more interesting half: that oracle call was the function's onlyreference outside
inventory.ts, so itskind,booted,target,idand display-name formatwere pinned nowhere in the repo. The literal expectation is now that parser's first real test, and it
still carries the discovery claim — the mocked
device listoutput contains aphysical : tvrowwhich must not reach the result.
Dropped after a second read, rather than shipped as noise:
runner-sequence.test.ts's unassertedvalidateRunnerSequenceSteps(...)accept-paths (the cap case and the low-durationMscase). Anunasserted call still fails when it throws, and
cap + 1rejection is pinned two tests above the capcase, so the boundary is genuinely closed. Wrapping them in
assert.doesNotThrowwould have beencosmetic.
Validation
Tested at
3d11a8ff.--project apple-runner packages/platform-apple/src/runner/__tests__/runner-io.test.ts→ 8 passed--project unit-core packages/platform-vega/src/inventory.test.ts→ 2 passedpnpm check:affected --run— all runnable checks passedoxlint . --deny-warnings, repo-wideoxfmt,tsc -b packages/platform-vega packages/platform-applegit statusclean of production changes before committingTouches no production file, so no device lane is selected;
check:production-exportsreports no newfinding for the now test-unreferenced
parseVegaDeviceList, which stays exported.