Skip to content

feat(drivers): device.exec fills in the lease's device and refuses another - #972

Merged
V3RON merged 19 commits into
feature/951-adrfrom
task/958
Oct 24, 2026
Merged

V3RON merged 19 commits into
feature/951-adrfrom
task/958

Conversation

@V3RON

@V3RON V3RON commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #958

Status

Implement: done (5/5 green) Review: passed (round 1 + claims fix-check) Hardware: n/a Gate: waiting for the stack
Next: stack gate after #959

  • pnpm check is green (toolchain.md). Checked by CI on the stack's head before the gate.
  • The five Tests lines pass in pnpm test. The driver tests: src/drivers/ios/index.test.ts, src/drivers/ios/devicectl-passthrough.test.ts, src/drivers/android/index.test.ts.
  • The website pages in Modules touched no longer tell a caller to name the device, look up the emulator serial, or use booted, and say a command naming another device is refused. Checked by the audit and the claims review.
  • docs/internal/flows/device-exec.md, both driver manuals and the two comments in Modules touched describe the fill-in. Checked by the claims review.

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 0 fixed, 3 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 1. Tokens: 9.6M.
Assessment: complete
Runs: 11. Cost USD: 4.8461. Agent seconds: 2407.

Rejected:

  • code: no test pins reconnect alone or forward tcp:… getting -s (src/drivers/android/index.ts:415) — [nonblocking] no Tests line asks for it; the fill-in is proven by shell getprop and install

Written by an agent.

@V3RON
V3RON added this pull request to stack #973 October 24, 2026 06:24
@V3RON
V3RON marked this pull request as ready for review October 24, 2026 06:49
@V3RON

V3RON commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: ac9187b
Round fix-check: 473d52b

Runs: 11. Cost USD: 4.8461. Agent seconds: 2407.
Tokens input 386, output 106579, cache read 11074324, cache write 638016.
- build implementer: claude-sonnet-5-5 596 s $0.8918
- audit implementer: claude-sonnet-5-5 178 s $0.2895
- fix implementer: claude-sonnet-5-5 100 s $0.1482
- fix implementer: claude-sonnet-5-5 70 s $0.1336
- review 1 reviewer: claude-sonnet-5-5 665 s $0.382
- review 1 reviewer spec: claude-sonnet-5-5 35 s $0.2043
- review 1 reviewer both: claude-opus-5-5 546 s $2.1539
- review 1 reviewer claims: claude-sonnet-5-5 48 s $0.1972
- fix 1 implementer: claude-sonnet-5-5 80 s $0.1886
- review fix-check reviewer: claude-sonnet-5-5 63 s $0.1199
- review fix-check claims-reviewer claims: claude-sonnet-5-5 26 s $0.1371
Finding outcomes: {"fixed":1,"nonblocking":3}. Classes: {"architecture 13 doc claim false":1,"documentation 7 manual incomplete":1,"documentation 9 gateway guide not updated":1,"testing 3 reconnect alone unproven":1}.
{"findings":[
{"id":"R1","role":"claims","class":"architecture 13 doc claim false","outcome":"fixed","fix":"473d52b95a2ea25c67702823551b9dbc5ebdb1fd","path":"website/src/content/docs/docs/using-devices/remote-agents.mdx","round":"1"},
{"id":"R2","role":"code","class":"testing 3 reconnect alone unproven","outcome":"nonblocking","path":"src/drivers/android/index.ts","round":"1"},
{"id":"R3","role":"code","class":"documentation 9 gateway guide not updated","outcome":"nonblocking","path":"website/src/content/docs/docs/using-devices/working-with-a-device.mdx","round":"1"},
{"id":"R4","role":"code","class":"documentation 7 manual incomplete","outcome":"nonblocking","path":"src/drivers/ios/AGENTS.md","round":"1"}
]}

Assessment: complete

Written by an agent.

@V3RON

V3RON commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • code: src/drivers/android/index.ts:415 no test pins reconnect alone or forward tcp:… getting -s
  • code: website/src/content/docs/docs/using-devices/working-with-a-device.mdx:78 the gateway guide does not describe the fill-in
  • code: src/drivers/ios/AGENTS.md:5 and src/drivers/android/AGENTS.md:5 the Uses lists omit ../other-device-refusal.ts, and the iOS Files table omits simctl-device.ts

Written by an agent.

@V3RON
V3RON merged commit c09c2ba into main Oct 24, 2026
32 checks passed
@V3RON
V3RON deleted the task/958 branch October 24, 2026 07:25
V3RON added a commit that referenced this pull request Oct 24, 2026
Closes #959

### Status
Implement: done (7/7 green) Review: passed (round 1) Hardware: n/a Gate:
waiting for the stack
Next: stack gate

- [ ] `pnpm check` is green. Checked by CI on the stack's head before
the gate.
- [x] The seven Tests lines pass in `pnpm test`, in
`src/mcp/server.test.ts` and `src/instructions/index.test.ts`. Probed by
the audit, 7/7.
- [x] `connect-your-agent.mdx` lists five tools, describes
`run_on_device`'s result and `NO_LEASE`, and no longer says the MCP
tools do not run commands; `reference/cli.mdx` and
`introduction/index.mdx` name five tools; `src/mcp/AGENTS.md` describes
the tool and that it does not queue; the instructions text's MCP section
names `run_on_device`. Checked by the audit and the claims review.

Feature #951 Completion conditions:

- [x] `run_on_device` runs `simctl install`, `simctl launch` and `adb
shell` with no device id and returns stdout, stderr and exit code:
`src/mcp/server.test.ts` (tool to daemon) and #972's driver fill-in
tests. Not run on a real device.
- [x] `POST /v1/leases/{id}/exec` installs on the lease's device and
refuses `booted` with `PASSTHROUGH_REFUSED`: #972's simctl fill-in and
refusal tests at the driver seam the route calls.
- [x] `run_on_device` without a lease answers `NO_LEASE`:
`src/mcp/server.test.ts`.
- [x] The MCP and remote-agents pages describe both:
`connect-your-agent.mdx` (here), `remote-agents.mdx` (#972).

## Assumptions

none

## Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 0
fixed, 1 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 11.3M.
Runs: 6. Cost USD: 3.2105. Agent seconds: 1543.
Assessment: complete

Rejected:

- code: the `lease_status` test fails by timeout, not on an assertion,
when `run_on_device` goes back on the queue (src/mcp/server.test.ts:881)
— [incorrect] a hung `lease_status` is the failure its title names

*Written by an agent.*
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.

device.exec fills in the lease's device and refuses another

1 participant