test(platform-apple): cover core launch diagnostics, CoreDevice normalization, runner-file copy, and IPA hint resolution

Merged
TH
2mo ago
+491-0

Summary

Covers the five 0%-covered functions in platform-apple core flagged by the coverage-based CRAP report on 5f84627d8, all through the owning modules' public entry points (probeSimulatorLaunchContext, ensureCoreDeviceReady, copyCoreDeviceRunnerFile, prepareIosInstallArtifact). No production changes, no new exports, no test-only DI.

FunctionCRAP before → after
probeSimulatorLaunchContext56 → 7
normalizeCoreDeviceProbeError56 → 7
normalizeCoreDeviceReadyError42 → 6
copyCoreDeviceRunnerFile30 → 5
resolveIosPayloadBundleByHint30 → 5

The ambiguous-name throw in resolveIosPayloadBundleByHint stays uncovered: it needs two payload directories differing only by case, which APFS cannot hold; with that branch excluded the function scores 5.

Closes #3417. Part of #3414. 4 test files changed, +472 lines.

Validation

  • Tested SHA: 6aa85ad (review fixes on top of a590340)
  • pnpm check:affected --run passed locally under the machine lock (format, lint, typecheck, layering, fallow, vitest-related, unit).
  • pnpm check:coverage-crap --all over vitest related coverage for the owned files: no function at or above 30. Per-function CRAP via fallow health at ~full statement coverage: 7, 7, 6, 5, 5.
  • Mutation spot-checks (dropped guards, inverted hint ternary, removed retry/return, removed dotted-hint gate) each failed at least one new test.