test(apple): cover simulator boot retry and the macOS helper source walk
Summary
Clears the three functions #3451 lists (part of #3414). Three files touched.
| Function | CRAP before | CRAP after |
|---|---|---|
core/simulator.ts shouldRetry | 72 | 2.0 (CC 2, 100%) |
core/simulator.ts classifyReason | 56 | 7.0 (classifyAttempt, CC 7, 100%) |
os/macos/helper.ts files | 42 | 6.0 (CC 6, 100%) |
ensureBootedSimulator rebuilt the same classifyBootFailure input in its retry policy, its deadline classifier and its final rethrow, so one local classifyAttempt closure replaces the copies and reads the two captures live. Coverage comes from new boot cases through ensureBootedSimulator with the existing runCmd fake: a retried transient failure, the two reasons that refuse a retry, the bootstatus-only timeout, exhaustion after three attempts, and the deadline stop. helper.ts is test-only: a new file drives the helper-build entry point against a scratch package tree containing .build, a nested directory, Package.swift, a non-Swift file and a symlink.
Closes #3451.
Validation
Tested at 55b018690 (review follow-up adding the per-case boot-memo assertion; no coverage change). pnpm check:affected --base origin/crap/3425-coverage-patches --run passed (unit and provider-integration deduped to CI). check:coverage-crap --all on the related-tests coverage map reports no function at or above 30. Mutation checks: refusing no retry fails 3 tests; dropping either capture or reversing the fallback order fails the bootstatus test; un-ignoring .build, counting non-Swift files, or treating the symlink as a file fails the fingerprint test; seeding the Booted memo per case fails all 8 boot cases. Coverage/Integration jobs pending.