fix(apple): parse parenthesized xctrace physical device format#1360
Conversation
Accept the new 'Device Name (OS Version) (device-id)' output from xctrace list devices while preserving the legacy bracket format. Relates to #1355 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. |
Extract device line parsing and DeviceInfo construction into focused helpers so the discovery loop stays under fallow thresholds. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Re-review of [P1] Parse the legacy All exact-head CI checks are green. Do not apply labels. |
…OS version Only treat 'Name (version) (id)' as the new parenthesized xctrace format; preserve the full name for legacy 'Name [id]' lines, including names that contain parentheses. Addresses review feedback in #1360. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Fixed the review points in
I can't attach the exact-head |
|
Re-review of Readiness is still blocked by practical evidence. The author confirmed this environment has no macOS/Xcode/physical iOS device, so there is no exact-head
|
|
I can't produce the exact-head Could you (or anyone with the reported iPhone 8 Plus setup) run that command against |
|
Validated on exact head
After No session was opened; that remains out of scope for #1355. |
|
Thanks for validating this on exact head with a physical iPhone. Good to see the parenthesized |
|
Thanks for the exact-head physical-device check. This confirms the parenthesized |
When devicectl reports no devices, listAppleDevices must source the physical device from the parenthesized xctrace output. Addresses review feedback in #1360. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Added a route-specific unit test ( I still can't attach an exact-head run on the reported iPhone 8 Plus from this Linux environment. If you have access to that device, could you run |
|
Good catch: the first run was not route-specific. I reran exact head The connected physical device was still discovered by the built CLI: The source This proves the changed parser route against a real physical device, though it is not the originally reported iPhone 8 Plus. The shim and isolated daemon state were removed after the run; no session was opened. |
|
Thanks for doing the isolated shim validation — that's a clean way to force the |
|
Re-review of |
|
Thanks for the final review and for running the isolated shim validation. All exact-head checks are green and the route-specific regression is in place, so this is ready for the next human reviewer. |
|
Fixes part of #1355.
xcrun xctrace list devicesnow emits physical devices asDevice Name (OS Version) (device-id), while the legacyDevice Name [device-id]format is still in circulation. The parser inparseXctracePhysicalAppleDevicesonly recognized the bracket form, so iPhone 8 Plus-class physical devices were missing fromagent-device devices --platform ios.What changed:
XCTRACE_DEVICE_LINE_PATTERNinsrc/platforms/apple/core/devices.tsnow accepts both:My iPhone [00008020-001C2D2234567890]iPhone 8 Plus (16.7.16) (00008020-001C2D2234567890)[id]or(id).appleOs, giving the sameios/ipados/tvos/visionosclassification as before.This intentionally does not tackle the larger
devicectlfallback work described in #1355; it only fixes the discovery parser so the device is no longer silently dropped.Link to Devin session: https://app.devin.ai/sessions/5d7319f5e4d4404c95bf6f2988ae8553
Requested by: @thymikee