Repository navigation
Closed
Labels
request:newInbox. Never picked up, body never edited.
Description
The problem
Test runners that drive devices through simlock's agent-device proxy (/v1/agent-device) need a local relay and workarounds before they work. budgie's e2e suite (budgie-at/budgie#1867, e2e/support/simlock/relay.ts and provider.ts) runs the e2e runner (@e2e-dev/mobile) from Linux against a simlock gateway and hits all of these:
bootis denied. simlock's agent-device daemon policy deniesboot(src/agent-device/shared/daemon-environment.ts:7). The leased simulator is already booted, but the e2e engine always sendsbootbefore it starts, so the call fails. budgie's relay answersbootlocally.closeends the lease. A sessionclosewith no arguments ends the simlock lease and deletes the simulator (src/agent-device/front/ended.ts:43). The e2e engine closes a session in the middle of a run, on a worker restart or a recording reset, anddevice.closeApp()sends the sameclose. The device is gone mid-run. budgie's relay swallows every bareclose, and the provider releases the lease itself at the end.- Runs that share a token share sessions. The agent-device tenant is the token's principal (
src/agent-device/host/host.ts:123), so two CI runs with one token and the runner's default session name (e2e-ios) drive each other's device. budgie sets a random session name per run. The gap is documented insrc/agent-device/AGENTS.md, but nothing stops it. - The UDID and the lease id are hard to find. The allocate reply has no
udidfield, so budgie takes it fromdeviceKey.split(':').pop(). To callPOST /v1/leases/<id>/exec, budgie scansGET /v1/leasesand searches each lease's JSON for the UDID. It does not know that the agent-deviceleaseIdalready is simlock's lease id (ADR 0020). - Errors don't say whose fault they are. budgie tells "the farm is down" from "this device failed" by matching message text:
not connected to the gateway|no worker connected|Remote daemon is unavailable|ECONNREFUSED|…|error code: 52\d. Proxy errors carry onlyINVALID_ARGS,COMMAND_FAILEDorUNAUTHORIZED, anddetails.reasonis set only forWORKER_UNREACHABLEandLEASE_ENDED_BY_HOST(src/agent-device/shared/replies.ts).
Who runs into this
A CI job, or a team writing one, that runs an e2e suite with one leased simulator per test worker and drives each one through the agent-device proxy, often from a Linux runner with no Mac.
What you would like to happen
booton the leased, already-booted device succeeds without doing anything.booton any other device is still refused.- A test runner can close an agent-device session without ending the simlock lease. Releasing the lease stays explicit.
- Two runs that share a token can't end up on each other's device, whatever session names they use.
- The allocate reply names the device's
udid. The docs say the agent-deviceleaseIdis the simlock lease id used by/v1/leases/<id>/…. - Proxy and exec errors carry a stable reason a caller can branch on: at least "the worker or gateway is unreachable" versus "this device or command failed".
Anything else
With this done, budgie can delete relay.ts (201 lines) and the string matching in provider.ts. Related: #944 (a lease grant names no device identifier), #1104.
Written by an agent.
Metadata
Metadata
Assignees
Labels
request:newInbox. Never picked up, body never edited.
Activity
V3RON commentedon Nov 7, 2026
Being specified in #1419. This issue stays open until that feature ships.
Written by an agent.
github-actions commentedon Nov 8, 2026
Shipped as #1419.
github-actions commentedon Nov 8, 2026
Shipped as #1419.