Skip to content

feat(agent-device): the front answers orientation on an iOS simulator through device.rotate - #1124

Merged
V3RON merged 41 commits into
callstackincubator:mainfrom
leonardoxr:task/1109
Oct 31, 2026
Merged

V3RON merged 41 commits into
callstackincubator:mainfrom
leonardoxr:task/1109

Conversation

@leonardoxr

@leonardoxr leonardoxr commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1109

Status

Stacked on #1122. CodeRabbit is not reviewing this repository at the moment (no activity on any PR since 2026-10-30 20:25 UTC), so this PR had the blind spec/code/claims review only. The manual Mac check line stays unticked: it is the maintainer's.

  • The Tests lines pass. (front/orientation.test.ts; both tests)
  • Manual check (maintainer, worker Mac): through a gateway, POST /v1/leases/{id}/rotate {"orientation":"landscape_left"} turns a leased iPhone simulator running the Appduct fixture app to landscape, and after the same call with portrait, agent-device orientation landscape-left turns it the same way.
  • The agent-device page says orientation on an iOS simulator goes through Simlock and replies unconfirmed, and that a batch step does not. (website/.../using-devices/agent-device.mdx)

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Round 2: no findings; task/1107 round-2 fixes merged in — a65cdee
Rounds: 2. Tokens: n/a.
Assessment: complete

Written by an agent.

leonardoxr and others added 27 commits October 31, 2026 00:50
…tation, and is refused (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r and gets ROTATION_UNSUPPORTED naming it (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…blet simulator (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s and gets INPUT_UNAVAILABLE with the reason (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… when the helper or the write fails (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…esh helper; a socket open during a rotate keeps its helper (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s sockets and device.rotate (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…gets the op's output (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rotate (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ugh a gateway (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eway (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…wn message (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…he unknown message (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ller's lease id (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… device.rotate (callstackincubator#1109)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… lease through device.rotate (callstackincubator#1109)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… or tablet simulator (callstackincubator#1109)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…et simulator, and the front map records physical (callstackincubator#1109)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…otating (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hat proves it (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…one model, another token's lease, and an unreachable worker ending the renewal (callstackincubator#1109)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@leonardoxr
leonardoxr marked this pull request as ready for review October 31, 2026 04:34
@leonardoxr

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Written by an agent.

@leonardoxr

leonardoxr commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 428a0ff

Runs: 7. Cost USD: 3.1864. Agent seconds: 2227.
Tokens input 256, output 80087, cache read 6598883, cache write 460847.
- build implementer: claude-sonnet-5-5 439 s $0.8803
- audit implementer: claude-sonnet-5-5 368 s $0.3064
- review 1 reviewer: claude-sonnet-5-5 665 s $0.3145
- review 1 spec: claude-sonnet-5-5 18 s $0.1224
- review 1 code both: claude-opus-5-5 494 s $1.146
- review 1 claims: claude-sonnet-5-5 27 s $0.1485
- fix 1 implementer: claude-sonnet-5-5 216 s $0.2683
Finding outcomes: {"fixed":1}. Classes: {"testing 3":1}.
{"findings":[{"id":"R1","role":"code","class":"testing 3","outcome":"fixed","fix":"9e60a656","path":"src/agent-device/front/allocate.ts","round":"1"}]}

Written by an agent.

leonardoxr and others added 4 commits October 31, 2026 02:10
…rove rotate's cases (callstackincubator#1107)

The coordinator rewrote the worker's lease id only for two codes and with a
substring replace; it now maps every coded error's details.leaseId and replaces
the id only as a whole token. The rotate e2e test sends all four orientation
names, covers a rejected open and a failed shared input, and no longer waits on
the daemon's real host-load probe on Linux; the registry's lease-end close and
failure drop get a unit test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ls, and reword the orientation claims (callstackincubator#1107)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ntation test split into helpers; manual within 150 lines (callstackincubator#1109)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@V3RON

V3RON commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Manual check (#1109 Done when): passed

Run on 2026-10-31 on a Mac with Xcode 27.0, branch head 9e60a656a. A gateway (driver none) and one real iOS worker on the same Mac, with capabilities.input off on both. An agent-device agent leased an iPhone simulator through the gateway. Safari was open instead of Appduct: an iPhone's home screen does not rotate, but any app that follows orientation shows the turn.

Step Result
POST /v1/leases/{id}/rotate {"orientation":"landscape_left"} through the gateway 200 {"leaseId":…,"orientation":"landscape_left"}; screenshot 874×402, Safari laid out in landscape
the same call with portrait 200; screenshot 402×874, portrait
agent-device orientation landscape-left exit 0; reply "Rotation requested: landscape-left (unconfirmed)", confirmed: false; screenshot 874×402, landscape, the same turn as the HTTP call

The reply is the one Simlock's front gives, so the command was answered by Simlock and not forwarded to agent-device's own runner.

Written by an agent.

@V3RON
V3RON merged commit 40c414e into callstackincubator:main Oct 31, 2026
31 checks passed
V3RON added a commit that referenced this pull request Oct 31, 2026
….rotate uses it (#1106)

Refs #1105

ADR 0053: the daemon owns each lease's device input, so `device.rotate`
works with the input module off. Implemented by #1122, #1123 and #1124
(all merged); this PR flips its status to Accepted.

## Review

Spec review: skipped. Code review: skipped. Claims review: skipped.
Assessment: complete

The maintainer approved the ADR in the #1105 spec session; docs-only ADR
PRs get no code review.

*Written by an agent.*

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Szymon Chmal <szymon@chmal.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The agent-device front answers orientation on an iOS-simulator lease

2 participants