Skip to content

Commit a8b4670

Browse files
committed
test(examples): add manual iPhone Duo pose-transition semantic check
Drives one booted iPhone Duo through closed -> half-open -> open -> closed and asserts the app reacts after every pose change: a tab press routes and selects, Add to cart moves the cart counter, a scroll reveals a canary, a long press moves its dedicated count, and one multipointer pinch changes a recognized scale. Coordinates are derived from the current target's bounds and refs are re-resolved after each fold, never reused across a pose change. Local/manual coverage only; GitHub Actions cannot schedule it yet (no hosted Duo runtime or registered Duo runner). --demo-geometry-mutation derives the pinch origin from a different control's bounds to prove the scale assertion is sensitive to targeting geometry. Refs #2731
1 parent 4116405 commit a8b4670

2 files changed

Lines changed: 669 additions & 0 deletions

File tree

‎examples/test-app/README.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,51 @@ local bundle.
296296
The suite intentionally covers the compat layer syntax used by public Maestro suites:
297297
`runFlow` file/inline blocks, `when.platform`, config hooks, deterministic `repeat.times`,
298298
flow `env`, selectors, input, assertions, and swipe.
299+
300+
## Local iPhone Duo pose-transition semantic checks (manual)
301+
302+
`examples/test-app/foldable/duo-pose-semantic.mjs` drives one booted iPhone Duo through
303+
closed → half-open → open → closed and asserts the app reacts after **every** pose change —
304+
a Catalog tap is proved to activate by an absent→present `catalog-title` transition measured from
305+
the same snapshot that resolved the tap's ref (with `home-title` gone after), the Home reset is
306+
asserted before the next fold, Add to cart moves the cart counter, a scroll reveals a canary,
307+
a long press moves a dedicated count, and one multipointer pinch changes a recognized scale.
308+
It reuses the `agent-device` CLI/daemon and this fixture app; it adds no framework.
309+
310+
This is **local/manual coverage only, never automatic regression coverage.** GitHub Actions
311+
cannot select it yet (no hosted iPhone Duo runtime, no registered Duo runner), so it is not a CI
312+
gate and does not change the ordinary iPhone lane.
313+
314+
Requirements: `DEVELOPER_DIR` pinned to a Duo-capable Xcode (iOS 27.1 ships only with Xcode 27.1+);
315+
exactly one booted iPhone Duo not shared with a concurrent run (concurrent runs rebuild the shared
316+
Apple runner and race capture/pose state); Xcode Device Hub reachable with Accessibility permission
317+
(`fold` presses its pose control — a Device Hub window on a secondary display makes the control
318+
unreachable and reports `device-hub-window-missing`; move it to the main display); the Agent Device
319+
Tester app installed on that simulator.
320+
321+
```bash
322+
# List booted Duo simulators, then run the scenario against one:
323+
DEVELOPER_DIR=/Applications/Xcode-27.1.0-Beta.app/Contents/Developer \
324+
node examples/test-app/foldable/duo-pose-semantic.mjs --udid <DUO-UDID>
325+
326+
# Prove the activation check is sensitive to targeting geometry: derive the pinch origin from a
327+
# different control's bounds. This flips the pinch scale check to FAIL (red is expected here):
328+
DEVELOPER_DIR=/Applications/Xcode-27.1.0-Beta.app/Contents/Developer \
329+
node examples/test-app/foldable/duo-pose-semantic.mjs --udid <DUO-UDID> --demo-geometry-mutation
330+
331+
# Prove the activation check is sensitive to a missed reset: skip the return-to-Home tap so a
332+
# closed/half-open activation or Home-reset check FAILS (red is expected here):
333+
DEVELOPER_DIR=/Applications/Xcode-27.1.0-Beta.app/Contents/Developer \
334+
node examples/test-app/foldable/duo-pose-semantic.mjs --udid <DUO-UDID> --demo-skip-home-reset
335+
```
336+
337+
A clean run prints `15/15 semantic checks passed` and exits 0; each pose's Catalog check reports a
338+
`catalog absent->present, home present->absent` transition. Failure snapshots land under
339+
`--artifacts-dir` (default `<state-dir>/artifacts`). The scenario never reuses a ref or coordinate
340+
across a pose change or mutation (a dropped session re-opens but never replays an `@ref`), saves
341+
failure artifacts, closes the session, and restores the starting pose.
342+
343+
**Deferred GitHub Actions enablement (not a completion condition).** Wiring an automatic Duo job
344+
later requires, all at once: a Duo runtime/device type on the runner image, working Device Hub pose
345+
controls with Accessibility permission on the runner host, and one actual successful lane run — then
346+
re-check the runner-image inventories, which are dated, not permanent.

0 commit comments

Comments
 (0)