Repository navigation
fix(ios): report devices CoreDevice cannot reach as not booted - #4210
Conversation
devicectl lists every paired device, and the inventory mapped each one as booted, so a phone that was unplugged and off the network was listed as booted and passed boot. The first command that failed was the app launch. The devicectl mapping now reads connectionProperties.tunnelState and reports an unavailable device as not booted, and CoreDevice readiness refuses it as not_ready with a hint to connect it. Fixes callstack#4209
The physical-device help and the installation page now say how devices and readiness report a paired device that CoreDevice cannot reach.
|
@gronxb is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
View guided diff | Re-trigger cubic
The inventory mapping and the readiness check each compared the tunnel state to 'unavailable', and only readiness lowercased it first. Both now call isCoreDeviceUnreachable, which lives beside the readiness constants so neither eager import closure grows.
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
The inventory reads devicectl JSON without validating it at runtime, so isCoreDeviceUnreachable lowercased whatever tunnelState held and would throw on a non-string, breaking the whole device listing. It now returns false for anything that is not a string.
isCoreDeviceReachable states the positive case, which is what booted reports, so the inventory assigns it directly and readiness negates it.
|
At b814e92, the code looks good. Tunnel reachability is decided once, by the CoreDevice predicate in physical-device-constants.ts. Both the inventory mapping and the readiness check use it, so an unreachable paired iPhone now shows Not blocking, take or leave: the help sentence could say it applies to No GitHub Actions checks have run on this head yet; the only failing check is the Vercel deployment authorization. No conflicts are known. |
fef0f60 to
73c4918
Compare
|
Thanks! Head output of The same script on 0.21.36 prints The only change since b814e92 is a rename: the classifier is now |
|
@cubic review |
|
At 73c4918, the code looks good. The rename makes the CoreDevice tunnel classifier read as a reachability check, and both of its uses, the inventory mapping and the readiness check, go through it. Your base-vs-head live run on an unreachable paired iPhone covers the change. The routed test and the narrower help wording from my earlier note are not in this head; they were optional, so take or leave them. The only failing check is the Vercel deployment authorization, which is not a code problem. No conflicts are known. |
Summary
The devicectl inventory marked every paired device as booted. A paired iPhone that was unplugged and off the network was listed as
booted: true, andbootsucceeded on it. The app launch was the first command to fail, with CoreDeviceError 4016.mapDevicectlAppleDevicelists anunavailabletunnel state asbooted: false. Both call sites useisCoreDeviceReachable, which ignores case and non-string values.ensureCoreDeviceReadyrefusesunavailableasnot_readywithdetails.tunnelState.connected,disconnected(CoreDevice opens tunnels on demand), and an absent state still pass.installation.mddescribe this. The help sentence is on the existing "connected" line becausecli-help.tsis at the 1,000-line limit.7 files, no scope expansion. Moving off devicectl's deprecated
connectionPropertiesis a separate change.Fixes #4209
Validation
Base
035c2b6ca, head73c49187d.pnpm check:affected --run --head 73c49187dpassed (exactCommit: true).unavailable, with agent-device-repro@ios-unavailable-device:booted: true,bootsucceeds,./repro.shexits 1.booted: false,bootfails withnot_ready/unavailable,./repro.shexits 0. Booting a simulator still works.connectedanddisconnectedpaths are covered by unit tests only. No reachable device was available.