You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8bcf7d7
Browse filesBrowse the repository at this point in the historyBrowse files
docs(adr): drop the withdrawn host allocator design from ADR 0021
ADR 0021 records the Simlock decision: agents lease devices directly and
agent-device has no allocator. Remove the narrative of the withdrawn in-process
host design, keep one decision-history line and a rejected-alternative entry,
and rename the file to drop "host". Point ADR 0034 at startAgentDevice on the
agent-device entry instead of a separate agent-device/host subpath.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: docs/adr/0021-simlock-leased-devices.md
+7-23Lines changed: 7 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,17 @@
2
2
3
3
## Status
4
4
5
-
Accepted (2026-09-01). The decision was replaced on 2026-10-10. The in-process Host allocator integration is withdrawn.
6
-
Simlock closed [simlock#70](https://github.com/callstackincubator/simlock/issues/70) in favor of direct device leases by agents.
7
-
agent-device follows that design.
5
+
Accepted (2026-10-10).
6
+
7
+
Decision history: on 2026-10-10 this replaced an earlier in-process allocator design. Simlock closed [simlock#70](https://github.com/callstackincubator/simlock/issues/70) in favor of direct device leases by agents, and agent-device follows that design. To recover the earlier design, read the git history before that date: #2284, #2308 and #2312.
8
8
9
9
## Rules at a glance
10
10
11
11
- Agents acquire booted devices from Simlock through `simlock lease`, the Simlock MCP tool, or the Simlock HTTP API.
12
12
Agents own renewal and release. agent-device does not call Simlock.
- agent-device uses the ordinary local runtime, sessions, and process-owned device claims for a leased device.
15
-
It has no managed runtime owner, allocator client, allocation journal, managed binding fence, or Host lease mapping.
15
+
It has no managed runtime owner, allocator client, allocation journal, or managed binding fence.
16
16
- For iOS, pass the grant's `SIMLOCK_IOS_DEVICE_SET` as `--ios-simulator-device-set` or the `iosSimulatorDeviceSet` config key.
17
17
Discovery, `simctl`, and the XCTest runner resolve the leased simulator inside Simlock's set.
18
18
- For Android, the grant's `ANDROID_ADB_SERVER_PORT` selects Simlock's adb server.
@@ -26,16 +26,7 @@ Its simulators reside in a device set that Xcode does not read, and its emulator
26
26
A grant reports device access requirements in an `environment` object with `SIMLOCK_IOS_DEVICE_SET` and `ANDROID_ADB_SERVER_PORT`.
27
27
`simlock lease --export-env` prints this object for `eval`.
28
28
29
-
The first design proposed a Host inside agent-device with these responsibilities:
30
-
31
-
- Allocate through Simlock's typed client.
32
-
- Journal allocation requests.
33
-
- Fence each command with confirmed lease authority.
34
-
- Use a dedicated runtime owner for managed devices.
35
-
36
-
agent-device shipped these foundations but never activated them.
37
-
Simlock then selected direct device leases by agents.
38
-
This design needs nothing from agent-device beyond the ability to address a device in Simlock's roots.
29
+
Direct leases need nothing from agent-device beyond the ability to address a device in Simlock's roots.
39
30
agent-device already supported simulator-set scope and adb's server-port environment.
40
31
41
32
## 2. Decision
@@ -76,13 +67,6 @@ agent-device does not verify that a device is leased.
76
67
Therefore, the caller points that executor at Simlock's server.
77
68
Per-call `AndroidAdbExecutorOptions.serverPort` takes effect only if the executor honors it.
78
69
79
-
## 4. Withdrawn design
80
-
81
-
The replaced design required these components:
82
-
83
-
- A durable allocation journal reconciled through Simlock after crashes.
84
-
- Fenced lease admission with renewal across each command deadline and teardown.
85
-
- A managed runtime owner that delegates to the local family.
86
-
- Allocator-held device claims with an installation principal instead of a process principal.
70
+
## 4. Rejected alternative
87
71
88
-
If an in-process allocator returns, recover that design from git history: the ADR text before 2026-10-10, #2284, #2308, and #2312.
72
+
-**An allocator inside agent-device** would allocate devices through Simlock's typed client, keep a journal of allocation requests, and fence each command with confirmed lease authority. We rejected it because Simlock owns allocation and agents lease devices directly, so an internal allocator would duplicate Simlock's state.
Copy file name to clipboardExpand all lines: docs/adr/0033-collocation-decision-table.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Each candidate has a `move`, `merge`, or `keep` decision with rationale.
7
7
Moves use `refactor(move)` PRs.
8
8
Git history retains completed move batches.
9
9
10
-
The allocator design withdrawal removed `packages/managed-allocation` on 2026-10-10; see [ADR 0021](0021-host-simlock-managed-device-allocation.md).
10
+
The allocator design withdrawal removed `packages/managed-allocation` on 2026-10-10; see [ADR 0021](0021-simlock-leased-devices.md).
11
11
The `src/managed-device-allocation.ts` row and Batch 1 record a move that landed in #3287.
12
12
The removal of the package then deleted the moved file.
13
13
Nothing moves there now.
@@ -63,7 +63,7 @@ All its consumers occupy one zone that already owns the operations represented b
63
63
|`src/device-boot.ts`| keep | Device-selection, platforms, and daemon-server consume this boot-phase vocabulary. |
64
64
|`src/facades/device.ts`| keep | This is the published facade of the contracts package. Facades are the package boundary, not movable content. |
65
65
|`src/interaction-guarantees.ts`| keep | AGENTS.md names this declaration site for interaction dispatch paths and guarantee cells under ADR 0011. Cross-language golden tables in `contracts/fixtures/` bind it to this package. |
66
-
|`src/managed-device-allocation.ts`| move (batch 1, landed in #3287; package removed 2026-10-10) → `packages/managed-allocation`| Only managed-allocation and its dependent daemon composition consume this port and vocabulary; see [ADR 0021](0021-host-simlock-managed-device-allocation.md) §4, the withdrawn design. No other contracts file or zone imports it. Types therefore belong beside their implementing operations. |
66
+
|`src/managed-device-allocation.ts`| move (batch 1, landed in #3287; package removed 2026-10-10) → `packages/managed-allocation`| Only managed-allocation and its dependent daemon composition consume this port and vocabulary; see [ADR 0021](0021-simlock-leased-devices.md) §4, the withdrawn design. No other contracts file or zone imports it. Types therefore belong beside their implementing operations. |
67
67
|`src/wait-runtime-plan.ts`| keep | Command-registry and daemon-server share it. Both are spine zones; contracts is the only seam below them. |
|[0020 Composable Recorded Fragments (Proposed)](0020-composable-recorded-fragments.md)| lifecycle-free recorded fragment capture/composition, entry guards, fragment-local addresses/digests, staleness, and native `.ad`/Maestro composition |
25
-
|[0021 Simlock-Leased Devices Through Ordinary Local Runtimes](0021-host-simlock-managed-device-allocation.md)| operation of a Simlock-leased simulator or emulator, the reason for no agent-device allocator integration, and the withdrawn in-process Host design|
25
+
|[0021 Simlock-Leased Devices Through Ordinary Local Runtimes](0021-simlock-leased-devices.md)| operation of a Simlock-leased simulator or emulator, and the reason for no agent-device allocator integration |
26
26
|[0022 Daemon — Platform Runtime Coupling Audit and Ownership Ratchets](0022-daemon-platform-runtime-coupling.md)| daemon imports of root `platform-runtime-*` modules, the coupling ban that replaces R76 edge classification, the R75 session-authority ratchet, entry-to-platform hop routes and roles |
27
27
|[0023 End-State Entry-to-Platform Hop Trace](0023-end-state-hop-trace.md)| the definition of hop counts, ordered `press`/Android and dual-arm `snapshot`/iOS chains, per-hop roles, and the deletion test for numbers in ADR 0019 and ADR 0022 |
28
28
|[0024 Screen Recording — One Coordinator, Two Facts (Proposed)](0024-screen-recording-provable-signal.md)|`record start`/`stop` lifecycle, separate export-exists / recorder-stopped facts, backend stop-and-collect contract, coordinator recovery, the ADR 0019 §5 amendment, and the failed-finish cleanup fix |
0 commit comments