fix(ios): spawn the AX bridge and fold helper inside the scoped simulator set - #2818
Conversation
…ator set Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…start Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
|
The code looks ready at da6e287. Not blocking: fold on a scoped set still fails earlier at devicectl inventory, before it reaches the HID dispatch this PR fixes (https://github.com/callstack/agent-device/blob/da6e287/packages/platform-apple/src/foldable/pose.ts#L45), and the fake-child cast in the host test is a minor style point — both can be taken or left. The Smoke Tests failure in the "Restore and build iOS XCTest runner" step (xcrun --sdk iphonesimulator --show-sdk-version timing out, log line 1549) matches the known cold-toolchain flake and looks unrelated to this change: the diff only touches simctl spawn argv for the AX bridge and the fold helper, and neither runs during the toolchain probe or the runner build. The second Smoke Tests job is still queued. I read the PR body's report of Please wait for the queued Smoke Tests job to finish green and rerun the job that hit the cold-toolchain flake. It's also worth opening a follow-up issue for the devicectl scoped-set gap, since fold still fails outright there, rather than closing #2784 on this PR. |
|
|
This is still the case on main at 5c19230. I traced the code and did not run a device.
Filed #2871 as an implementation contract. It asks for one of two outcomes: support the scoped set end to end with verified readback, or refuse up front with a typed 🤖 Generated with Claude Code |
Summary
With
--ios-simulator-device-set, twosimctl spawncalls ignored the scoped set: the AX snapshot bridge and the fold HID helper. Both now build argv with the sharedcore/simctl.tshelper. The bridge usesbuildSimctlArgs, fed by a newsimulatorSetPathon the snapshot target. The resolver copies it fromDeviceInfo, andSnapshotSourceHost.startnow takes the target. Fold usesrunSimctlForDevice, andsendSimulatorFoldPosenow takes theDeviceInfo. Without a set, both argv arrays are unchanged. No new builder was added. 12 files changed,platform-appleonly.Where the code differs from the issue: fold on a scoped-set foldable still fails, one step before the HID dispatch.
devicectl device info displays, and the hinge readback, cannot see a simulator outside the default set ("The specified device was not found"). This PR does not address that.Closes #2784
Validation
da6e28702f:pnpm check:affected --runpassed (268 files / 1725 tests). Unit tests assert both argv arrays with and without a set. Reverting each hop fails the 4 new scoped-set tests.--ios-simulator-device-set:snapshot -i --debugloggedios.snapshot-source.acquire/presentfromsimulator-ax-bridge, with no fallback warning. The bridge ran assimctl --set <set> spawn.fold half-openfailed at the devicectl inventory, as described above.simctl --set <set> spawn <udid> fold half-openexited 0; without--setit failed withInvalid device.discoveryCounthelper and added an adapter-hop assertion. Rejected as out of scope or pre-existing: UDID-only session and cache keys (UDIDs are unique across sets), theperf.tsand app-log markersimctl spawntext matches, the bridge bypassing the Apple tool provider, and duplicated target types.platform-appleis private, so there is no dts compatibility concern.🤖 Generated with Claude Code