Skip to content

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

Merged
thymikee merged 2 commits into
mainfrom
crap/3417-apple-core
Oct 11, 2026
Merged

thymikee merged 2 commits into
mainfrom
crap/3417-apple-core

Conversation

@thymikee

@thymikee thymikee commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

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.

Function CRAP before → after
probeSimulatorLaunchContext 56 → 7
normalizeCoreDeviceProbeError 56 → 7
normalizeCoreDeviceReadyError 42 → 6
copyCoreDeviceRunnerFile 30 → 5
resolveIosPayloadBundleByHint 30 → 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.

…r-file copy, and IPA hint resolution

Exercise the 0%-covered branches of probeSimulatorLaunchContext,
normalizeCoreDeviceReadyError, normalizeCoreDeviceProbeError,
copyCoreDeviceRunnerFile, and resolveIosPayloadBundleByHint through
their public entry points, clearing every CRAP >= 30 finding for the
platform-apple core files (#3417, part of #3414).

Co-authored-by: Apex <apex@callstack.com>
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.17 MB 5.17 MB 0 B
Package (unpacked) 5.17 MB 5.17 MB 0 B
Package (download) 1.55 MB 1.55 MB +7 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 30.2 ms 29.7 ms -0.5 ms
CLI --help 84.3 ms 83.4 ms -0.8 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/platform-apple/src/core/__tests__/physical-device-files.test.ts Outdated
Comment thread packages/platform-apple/src/core/__tests__/physical-device-files.test.ts Outdated
Comment thread packages/platform-apple/src/core/__tests__/install-artifact.test.ts Outdated
… option

Review follow-up (#3434): distinct per-attempt stderr proves the copy
failure reports the last container rather than the first, --source and
--destination are asserted at their option positions so a swap fails,
and the IPA fixture summary no longer claims ambiguous-name coverage.

Co-authored-by: Apex <apex@callstack.com>
@thymikee

Copy link
Copy Markdown
Member Author

Reviewed 6aa85ad: no blocking findings. The diff is test-only and reaches each targeted function through its public entry point, using the existing AppleToolProvider seam. All 18 checks pass and there are no conflicts. A test-only change needs no live device run.

All three earlier inline threads are fixed at this commit, so they can be resolved: the distinct per-attempt container miss message (#3434 (comment)), the positional argument reads (#3434 (comment)), and the trimmed case list in install-artifact.test.ts (#3434 (comment)).

Not blocking, take or leave: the IPA fixture in install-artifact.test.ts shells out to the host zip binary, so could it reuse host-kit's writeZipFixture? The spent-deadline test in physical-device-files.test.ts could also assert details.step, and the PR body says +472 lines where the diff is +491.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 11, 2026
@thymikee
thymikee merged commit 8b7bfe4 into main Oct 11, 2026
18 checks passed
@thymikee
thymikee deleted the crap/3417-apple-core branch October 11, 2026 16:06
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-11 16:07 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRAP: platform-apple core (launch diagnostics, CoreDevice, install artifact)

1 participant