Skip to content

fix(apple): classify visionOS simulators from their simctl runtime - #2829

Merged
thymikee merged 1 commit into
mainfrom
claude/charming-proskuriakova-46845c
Sep 23, 2026
Merged

thymikee merged 1 commit into
mainfrom
claude/charming-proskuriakova-46845c

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

A visionOS simulator was reported as appleOs: "ios" when its name did not contain "vision" (for example test-1). resolveAppleOs got only deviceTypeIdentifier and the device name. The identifier has hyphens (Apple-Vision-Pro-4K), so the two-word apple vision / vision pro phrases never match it. The simctl runtime key (…SimRuntime.xrOS-26-2) is the authoritative source, but it was dropped before classification.

parseSimctlAppleDevices now passes the runtime key as the first descriptor. The existing xros token in APPLE_VISION_PATTERN matches it. The pattern is unchanged.

This affects every appleOs-gated behavior, for example the runnerSynthesizesTap predicate from #2789, which would request unsupported tap synthesis on a misclassified visionOS simulator.

2 files touched: one line in simulator-inventory.ts and one regression test.

Validation

Commit 360dd4048b:

  • New test simctl parser classifies visionOS from the runtime when the name is not descriptive: fails without the fix, passes with it.
  • pnpm check:affected --run: all checks pass (1559 tests).
  • Live, visionOS 26.2 runtime: xcrun simctl create ad-2789-test-1 com.apple.CoreSimulator.SimDeviceType.Apple-Vision-Pro-4K com.apple.CoreSimulator.SimRuntime.xrOS-26-2, then agent-device devices --platform apple --json reports "appleOs": "visionos", "target": "mobile" for that simulator. Before the fix, the same setup reported "ios". I deleted the simulator after the run.

CI: pending.

simctl deviceTypeIdentifiers are hyphenated (Apple-Vision-Pro-4K), so the
two-word vision phrases never matched them, and the runtime key was dropped
before classification. A visionOS simulator whose name lacked 'vision' was
reported as appleOs ios. Pass the runtime key, which names xrOS, as a
descriptor.
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.80 MB 4.80 MB +2.6 kB
Package (unpacked) 4.80 MB 4.80 MB +2.6 kB
Package (download) 1.43 MB 1.43 MB +601 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.5 ms 29.6 ms +0.0 ms
CLI --help 80.8 ms 83.5 ms +2.7 ms

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at 360dd40. The fix reads runtime.platform from the simctl record, so a visionOS simulator with any name is no longer classified as iOS. The test covers it, and the code looks right.

Not blocking: is the same gap present for physical devices? mapDevicectlAppleDevice (https://github.com/callstack/agent-device/blob/360dd40/packages/platform-apple/src/inventory-classification.ts#L115) still uses only devicectlProductType/devicectlLabels, so a renamed Vision Pro could still be misclassified.

The Smoke Tests failure at live-snapshot-depth-frontier.ts:126 is unrelated. It also fails on main and #2832 fixes it.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 23, 2026
@thymikee
thymikee merged commit 81f39ca into main Sep 23, 2026
17 of 18 checks passed
@thymikee
thymikee deleted the claude/charming-proskuriakova-46845c branch September 23, 2026 17:23
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-23 17:28 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.

1 participant