test(android,linux,apple): flake, dead-assertion, and fixture fixes from CRAP reviews

Merged
TH
2mo ago
+185-94

Summary

Area 2 of #3461 (follow-ups to the #3433/#3434/#3435 reviews). Tests only; the one non-test change is a test-only export subpath (./archive-fixtures, audio-probe-fixtures precedent + R11 entry) reaching host-kit's zip fixture writer.

  • Boot-timeout flake (emulator-lifecycle.test.ts): the 80 ms/150 ms/exactly-2-calls geometry raced host scheduling; now on vi.useFakeTimers(). Mutation: dropping the BOOT_COMMAND_FAILED→ANDROID_BOOT_TIMEOUT normalization fails it.
  • Dead assertion: removed notEqual(BOOT_COMMAND_FAILED), subsumed by the reason equality. Kept "keeps original details" — deleting the details spread in buildAndroidBootFailureDetails fails it, so the override is load-bearing.
  • Linux negative controls (snapshot.test.ts): the degenerate-rect tie gained an out-of-bounds probe (widening the inclusive bound fails it); the missing-depth test pins the default in both sort directions (mutations depth ?? -1 / ?? 1 each fail one fixture).
  • Host-binary fixture (install-artifact.test.ts): the IPA is written with writeZipFixture; no host zip shell-out. The fixture moved to src/archive.fixtures.ts, and its encrypted-entry helper writes the flag through the same writer.
  • Spent deadline (physical-device-files.test.ts): asserts typed details.step/timeoutMs.
  • Mock scope (host-provider.test.ts): no cast partial fs.Stats; the mocked stat answers with real fs.Stats of backing tmp paths, the user Applications root is a real tmp dir, absent roots are declared.
  • xctestrun record target: the surviving record target names a bundle nothing else references; dropping record-target collection or the isRecord filter fails it alone.

Part of #3461, part of #3414

Validation

  • Tested/pushed SHA: fe44548d8.
  • pnpm check:affected --run: passed under the machine lock.
  • Each mutation observed failing, then reverted. check:layering, check:fallow, typecheck, lint, format:check pass.