Follow-up to #1403, which shipped in #1517. Two of that issue's experiments needed hardware that was not available at the time, so they were never run. Everything below is unverified rather than known-broken.
Multi-attached-device selection
#1403 asked to "exercise multiple attached devices and confirm UDID-to-device selection is unambiguous". Only one device was ever connected.
Structurally this looks sound: usbmuxd's SerialNumber is exactly the dashed hardware UDID that DeviceInfo.id already carries for devicectl-listed devices, and readDeviceIdFromList matches on it, with usbmuxd's own DeviceID used only as the mux handle. So selection should be exact rather than positional. That is a code reading, not evidence.
Worth checking with two or more cabled iPhones:
--device/--udid selection routes each command to the intended device
- two concurrent sessions on different devices do not cross transports
- a device attached or detached mid-session changes only its own routing
ListDevices ordering has no influence on which device is picked
Unpaired / untrusted / unavailable devices
#1403 asked to "verify failure behavior for locked, disconnected, unpaired, and unavailable devices". Locked and disconnected are covered:
Unpaired, untrusted, and unavailable were never exercised. The open question is whether usbmuxd distinguishes "attached but not trusted" from "not attached" clearly enough for the route resolver to tell them apart. Today anything that is not a successful lookup surfaces as usbmuxDeviceAttached: false, which on a CoreDevice device triggers a tunnel fallback that will also fail — so the user may end up with a tunnel-shaped error for what is really a trust problem, instead of the "trust this Mac" hint.
Wanted: the observed usbmuxd behaviour for each state, and if they are distinguishable, a mapping to the right hint.
Notes for whoever runs this
bin/agent-device.mjs runs dist/, so pnpm build first or you measure stale code
- per-request diagnostics only record exec/devicectl phases under
--debug; their absence without it is not evidence
- assert real command output, not just wall-clock — a failing command also returns fast
- set Auto-Lock to Never, or the runner dies mid-series
Follow-up to #1403, which shipped in #1517. Two of that issue's experiments needed hardware that was not available at the time, so they were never run. Everything below is unverified rather than known-broken.
Multi-attached-device selection
#1403 asked to "exercise multiple attached devices and confirm UDID-to-device selection is unambiguous". Only one device was ever connected.
Structurally this looks sound: usbmuxd's
SerialNumberis exactly the dashed hardware UDID thatDeviceInfo.idalready carries for devicectl-listed devices, andreadDeviceIdFromListmatches on it, with usbmuxd's ownDeviceIDused only as the mux handle. So selection should be exact rather than positional. That is a code reading, not evidence.Worth checking with two or more cabled iPhones:
--device/--udidselection routes each command to the intended deviceListDevicesordering has no influence on which device is pickedUnpaired / untrusted / unavailable devices
#1403 asked to "verify failure behavior for locked, disconnected, unpaired, and unavailable devices". Locked and disconnected are covered:
SBMainWorkspace … Locked, xcodebuildUnlock <device> to Continue)Unpaired, untrusted, and unavailable were never exercised. The open question is whether usbmuxd distinguishes "attached but not trusted" from "not attached" clearly enough for the route resolver to tell them apart. Today anything that is not a successful lookup surfaces as
usbmuxDeviceAttached: false, which on a CoreDevice device triggers a tunnel fallback that will also fail — so the user may end up with a tunnel-shaped error for what is really a trust problem, instead of the "trust this Mac" hint.Wanted: the observed usbmuxd behaviour for each state, and if they are distinguishable, a mapping to the right hint.
Notes for whoever runs this
bin/agent-device.mjsrunsdist/, sopnpm buildfirst or you measure stale code--debug; their absence without it is not evidence