fix(fold): report a dispatched pose as unverified when devicectl has no hinge-angle stream

Merged
TH
4d ago
+127-8

Summary

On a devicectl without device motion (651.13.5, Xcode 27.1 RC), fold dispatched the HID pose and then failed with a generic COMMAND_FAILED: no hinge angle sample, indistinguishable from a pose that never took effect (#3581).

The first hinge read that yields no sample now fails with reason: fold-pose-dispatched-unverified: sent, not confirmed. The wording is neutral about the cause (a missing subcommand and an unreachable device both print no sample); the read's own failure rides along as hingeReadFailure (reason fold-hinge-angle-no-sample, exit code, stderr). Details also carry requestedPose and, when panel power decides one lit panel, screen as evidence only. A no-sample read after an earlier good one is not reclassified.

Touched 7 files: hinge-angle.ts, pose.ts, tests, ADR 0025, fold help, commands.md.

Closes #3581

Validation

  • Tested commit b1df399ef: pnpm check:affected --run passed.
  • Live, production CLI on an iPhone Duo (iOS 27.1) with an xcrun PATH shim that makes devicectl device motion exit 64 with Unknown option '--device' (the 651.13.5 failure; local devicectl is 651.13.4): fold open fails with fold-pose-dispatched-unverified, requestedPose: open, screen LCD-1 669x951, hingeReadFailure.stderr the shim's text; the following screenshot is 951x669, the inner panel. Output posted in the comments.
  • Unit tests cover the refusal with and without a lit panel and the mid-settle case.

🤖 Generated with Claude Code