fix(daemon): point a --device UDID conflict to --udid

Merged
ZE
1mo ago
+92-2

Summary

A session bound to an Apple device rejects --device=<UDID> of that same device with INVALID_ARGS. As decided on #3945, --device stays a name selector and --udid the ID selector, so the rejection is kept. The error now tells the caller which flag takes that value.

  • listSessionSelectorConflicts is unchanged: --device still matches only the device name.
  • New describeDeviceUdidSelectorConflict: when a --device conflict's value equals the bound Apple device's UDID, the conflict message adds --device selects a device by name; select this device by UDID with --udid <UDID>. Used by assertSessionSelectorMatches and by the bound-session request-lock conflict message.
  • A different UDID, or an Android serial passed as --device, gets the plain conflict error with no --udid pointer.
  • No resolveCommandDevice change.

Refs #3945

Validation

  • vitest run on session-selector.test.ts, session-device-resolution.test.ts, request-lock-policy.test.ts: 48 passed.
  • oxfmt --check on the touched TS files: pass.
  • tsc -b packages/daemon: pass.
  • Not run locally: check:affected, oxlint. CI is the authority for these.

šŸ¤– Generated with Claude Code