Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
|
This looks close, but one refusal path contradicts itself and the coverage gate is failing because of where the pose vocabulary got exported. At 37e7778, The Coverage job fails on 11 eager-closure-budget assertions, all tracing to one new edge: packages/contracts/src/facades/device.ts -> packages/contracts/src/fold-pose.ts (https://github.com/callstack/agent-device/blob/37e7778/packages/contracts/src/facades/device.ts). That pulls fold-pose exports onto the import path of packages/platform-android/src/mechanics.ts, provider-limrun, provider-webdriver, session-journal, and src/cli.ts, none of which can pose a hinge. Can the pose vocabulary move to a module those entries already evaluate, or be reached only through the Is the Apple-only per-platform seam here the same shape as Not blocking, take or leave: The PR body says 70 files touched where the diff shows 78, and describes I could not run anything on macOS, so the Device Hub press, the trampolined-pid discovery, the reopen, and the sidebar row selection are unverified from the diff, and the 313-line Swift helper has no test covering them. The live angles and timings in the PR body are narrative without an attached run, so I checked the code paths they describe but not the readings themselves. Line references above are pinned to 37e7778. Before this merges, the fold-pose exports need to move off packages/contracts/src/facades/device.ts so Coverage passes without rebaselining the budget, and the half-open refusal needs to stop firing when the observed angle already matches the requested pose. |
37e7778 to
82fc2fa
Compare
Live evidence at 82fc2fa (rebased on #2715, stacked on #2716)Built CLI against the booted iOS 27.1 iPhone Duo simulator, Safari session, Device Hub window switched to the Duo by the helper through the sidebar row. The recording shows the Device Hub window while the three commands ran; the screenshots are Screenshot sizes follow the lit panel: 466x678 before, 951x669 after One defect this run found and the head fixes: right after the helper switched the window from another simulator to the Duo, the action bar had not rendered yet and the first press reported Not part of this PR: pressing a ref on the unfolded inner panel lands on the wrong point (the snapshot rect for Safari's address field comes back transposed relative to the screenshot). Filed separately with the geometry. fold-device-hub-recording.mov |
82fc2fa to
c9e6cde
Compare
|
Addressed at c9e6cde (stacked on #2716 at 0c6a78f; both rebased onto Half-open refusal. The rule is now stated where the loop is: a refusal never names the pose that was asked for. Coverage / eager closure. The pose vocabulary moved into The seam. Yes, same shape as Non-blocking, taken: Swift helper tests. The helper's pure decisions (pose → control description, window-title match, sidebar row identifier) moved into an PR body corrected: 84 files on top of #2716, validation at c9e6cde. Live evidence with screenshots and the Device Hub recording is in the comment above; the run at that head repeated open → 179.2° (last sample of a stream that ended just before the stop), half-open → 130°, closed → 0°. |
|
Reviewed at c9e6cde. Both blockers from the last round are fixed. A fold refusal can no longer name the pose that was asked for: the 170/150/120/90 test now resolves at 90, and a sibling test covers the real refusal. The pose vocabulary now lives in the existing The live evidence comes from you: full JSON at 82fc2fa, and a rerun reported at c9e6cde without attached output. If that rerun's JSON is still around, please link it to close the gap. Smoke Tests fails on the iOS long-press scroll check. That looks unrelated. This PR touches no test-app, scroll, snapshot or runner interaction code, and the same failure shows on #2363 and #2688. There are no conflicts, and I added |
…erify it with CoreDevice
Add `agent-device fold <closed|half-open|open>` and `client.command.fold({ pose })`.
ADR 0025 recorded that no official host API sets the hinge pose and left it to the
operator. The operator's own control is the pose action bar in the Xcode Device Hub
window, whose controls are ordinary accessibility buttons; the macOS helper gains a
`device-hub pose` subcommand that finds Device Hub in the process table (LaunchServices
registers the trampolined app with pid -1, which is why System Events saw no nodes),
reopens its window with a reopen event when it shows none, selects the simulator through
the sidebar row keyed `TableRow.Device.<udid>`, and presses the control.
The press is not the evidence. The Apple owner reads the hinge angle back through
`devicectl device motion hinge-angle` until it agrees with the request: closed is 0°, open
is 180°, and half-open is any angle between them reported only once two consecutive reads
agree the hinge stopped moving, because a hinge sweeps through half-open angles on its way
to either stop (the live run read 175.1° one stream after pressing Book, 130° after it
settled). The stream never ends on its own, so each read is bounded by devicectl's smallest
`--timeout` of five seconds. The response carries the verified pose, the angle, and the lit
panel's point size, so an agent sees its refs are stale without another capture.
`setFoldPose` is a host-side device-runtime operation rather than an interactor method: it
needs no XCUITest runner, and the leaf fact admits iPhone/iPad simulators while the
operation itself refuses a single-panel simulator from CoreDevice's display table. Every
other platform and provider states its own refusal cell.
Verified through the built CLI on an iOS 27.1 iPhone Duo simulator: open → 180° on LCD-1
(669x951pt, screenshot 951x669), half-open → 130°, closed → 0° on LCD (466x678pt,
screenshot 466x678), from a Device Hub that showed no window for the device; an iPhone 17
refuses with UNSUPPORTED_OPERATION before anything is pressed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… and conformance tables The contracts export snapshot names the new `fold-runtime` subpath, the six-platform coverage declaration and its Android evidence row classify the command, the runtime-binding conformance table resolves it, and the provider output guard drives it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
c9e6cde to
3fb3c60
Compare




Summary
Adds
agent-device fold <closed|half-open|open>andclient.command.fold({ pose })for the iPhone Duo simulator. ADR 0025 concluded no official host API sets the hinge pose and left it to the operator. This PR sets it the way the operator does: the macOS helper presses the pose control in the Xcode Device Hub window through accessibility (the earlier "zero accessibility nodes" finding was System Events seeing the trampolined app as pid 0), and the Apple owner trusts only CoreDevice's read-back ofdevicectl device motion hinge-angle.closedandopenare the hinge end stops;half-openis reported only once two consecutive reads agree the hinge stopped, because the first read after pressing Book caught it at 175.1°.The helper resolves Device Hub from the process table, reopens its window when a headless boot left none, and selects the simulator through the sidebar row keyed
TableRow.Device.<udid>, so twins sharing a name cannot be confused. The response reports the verified pose, the angle, and the lit panel's point size, so an agent sees its refs are stale.setFoldPoseis a host-side device-runtime operation (no runner); every other platform and provider states a refusal cell. 84 files on top of #2716; the gross diff exceeds the 1,000-line budget because of the ADR update, tests, and the Swift helper subcommand with its own tested library target.Stacked on #2716 (both touch the macOS helper); rebased onto
mainafter #2715 landed. The helper awaits the action bar after switching the sidebar selection (a live run caughtdevice-hub-pose-control-missingwithout it), and its pure decisions are XCTested; that test caught a window-title match that acceptediPhone Duo LabforiPhone Duo. Review round one is addressed in the comment thread: a refusal never names the requested pose, the pose vocabulary lives indevice-rotation.tsso the eager-closure budgets hold, andfolddeclares its own 150s envelope. Pressing a ref on the unfolded inner panel lands on a transposed point; that is a pre-existing snapshot-geometry defect, filed as #2719, not part of this PR.Validation
Tested at 3fb3c60:
pnpm check:affected --runpasses (format, lint, typecheck, layering, di-seams, fallow, mcp-metadata, build, package, integration-node, macos-coverage, vitest-related 698 files, integration-progress, replay-compat, daemon-wire-compat, affected-selector).Live, through the built CLI on an iOS 27.1 iPhone Duo simulator: open → 180° on LCD-1, screenshot 951x669; half-open → 130°; closed → 0° on LCD, screenshot 466x678; 5–16s each with last-sample hinge reads. Screenshots, JSON output, and a Device Hub recording are in the evidence comment below. Also verified from a headless boot with no Device Hub window, and from a window showing another simulator. An iPhone 17 simulator refuses with
UNSUPPORTED_OPERATION(single-panel-device) before anything is pressed. Not exercised: a second Xcode running its own Device Hub, and physical foldables (refused by the leaf fact).🤖 Generated with Claude Code