fix(fold): report the panel the verified pose lights, not the pre-fold one

Merged
IM
5d ago
+210-22

Summary

On the iPhone Duo, fold read the lit panel once, right after the hinge stopped. The guest can switch panel power later, so screen could name the panel lit before the fold.

After a named pose, fold now rereads the panel table for a few seconds until the pose's panel is lit (primary when closed, the other panel otherwise). If it never is, screen is left out. The reads stop at once when the table is unresolved or reports no measured power. Custom keyframe angles keep a single read. Poll reads are bounded by the deadline, so the wait costs about one read. Help and ADR 0025 are updated.

Before / after

iPhone Duo simulator (iOS 27.2), with fold open / fold closed each followed by screenshot:

base a4f2dcad0 (4 open + 4 closed): panel reported 5/8, omitted 3/8; none disagreed with the screenshot
head 157d15ebb (warm, 7 folds):     panel reported 7/7; open 951x669, closed 466x678, all matching the screenshot

The stale read happened under host load and didn't reproduce on an idle Mac. It is covered by pose.test.ts: on a stale first read, base reports LCD 466x678, head reports LCD-1 669x951.

Validation

  • Head 157d15ebb, check:affected --run --head, exactCommit: true. Every gate passes except unit, where upload-http-deadline and committed-source-tree fail the same way on clean main on this macOS host.
  • Run directly: provider integration 317/317, adr-citations 2/2.
  • The timeout ledger covers a named pose whose panel never switches (129 s of 255 s).
  • Unrelated and unchanged: the first fold open after a cold boot sometimes fails with fold-pose-dispatched-unverified on both base (1/4) and head (2/3). The helper waits only 3 s for the first hinge sample.

Prove it works
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.