Repository navigation
Description
The problem
A CI run that leases many devices has to prepare each one by hand and clean up after itself by hand. budgie's e2e suite (budgie-at/budgie#1867) shows both.
Device setup. On every lease it runs simctl through POST /v1/leases/<id>/exec:
defaults write .GlobalPreferences AppleKeyboards …andAppleLanguages -array en-USdefaults write com.apple.Accessibility ReduceMotionEnabled -bool trueprivacy grant contacts|microphone <bundle id>keychain resetbefore each test, so a PIN one test set can't lock out the next
The lease request has no field for any of this (src/contract/operations.ts:152-180). The Maestro setup it replaces had simulator-reduce-motion and simulator-device inputs. Since #1319 (#1203), an agent-device allocate can name a baseline (deviceBaseline / --device-baseline), so a baseline (ADR 0061) prepared with these settings covers most of this today. That still means one baseline per settings combination, set up by an operator. The per-test keychain reset is not covered.
Cleanup. A cancelled CI job never releases its leases, and the devices stay held until the TTL runs out. budgie keeps the TTL at 3 minutes, renews every minute, writes every lease id it gets to .e2e/simlock-leases.json, and releases them in an if: always() step. Leases carry no run or group id. lease.release-all is admin-only, takes no filter and has no HTTP route. An agent token can't release "everything from this run".
Who runs into this
A CI job that leases 5–10 simulators per run on a shared farm. Other jobs wait for the devices a killed run still holds.
What you would like to happen
- Device settings: decide whether a named baseline is the answer (then document how to make one for a CI suite), or whether the lease request should also take common settings (language/locale, reduce motion, permission grants for a bundle id) without a baseline per combination. Whether a keychain reset belongs here or needs its own call is open.
- A lease can carry a run id. A holder can release every lease of a run in one call, with the token that took them. A CI cleanup step then needs only the run id, not a file of lease ids.
Anything else
Related: #1240 (display-only label), #944 (a run command and leases tied to a process), #1202 (an operator program before first boot), #1203 (closed by #1319).
Written by an agent.
Activity
V3RON commentedon Nov 17, 2026
Being specified in #1633. This issue stays open until that feature ships.
Written by an agent.
V3RON commentedon Nov 17, 2026
Split in the spec session of 2026-11-17: this request is now specified as two features.
This issue stays open until both ship.
Written by an agent.
github-actions commentedon Nov 18, 2026
Shipped as #1633.
github-actions commentedon Nov 18, 2026
Shipped as #1633.