The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 16:00 UTC
fix(scripts): iOS scenarios prepare the dev client before leasing a device (#36456)
Julius Marminge committed
Nov 13, 2026 at 16:26 UTC
44fefbcbc478511666aed4b94b897ad45bceca82
2 files changed
+16
-3
docs/operations/scenarios.md
+3
-2
@@ -178,8 +178,9 @@ test(
178
);
179
```
180
181
-`t3.project` and `t3.thread` are the same. `t3.open()` installs the dev client for the checkout's
182
-native fingerprint, loads it from Metro, and pairs it with the scenario's server. `device` is
181
+`t3.project` and `t3.thread` are the same. The run fetches or builds the dev client for the
182
+checkout's native fingerprint before it leases a device; `t3.open()` installs it, loads it from
183
+Metro, and pairs it with the scenario's server. `device` is
184
e2e's [device fixture](https://e2e.com/docs/mobile#the-device-fixture) for system actions.
185
186
The run leases an iPhone 18 Pro from the Simlock pool, so it needs `SIMLOCK_AGENT_DEVICE_URL`
scripts/e2e.config.ts
+13
-1
@@ -86,6 +86,15 @@ const simlock = (device: string): DeviceProvider => {
86
const daemon = yield* connect(request.env);
87
const client = createAgentDeviceClient(daemon);
88
const platform = request.platform === "android" ? "android" : "ios";
89
+ // A cache miss builds the dev client, which outlasts a test and can outlast a lease.
90
+ request.log(`preparing the ${platform} dev client`);
91
+ yield* run(
92
+ resolved.node,
93
+ ["scripts/mobile-native-client.ts", "ensure", platform, "--prepare"],
94
+ {
95
+ cwd: APP_DIR,
96
+ },
97
+ );
98
const scope = { tenant: "t3-scenarios", runId: `${request.runId}-${request.slot}` };
99
// Simlock takes the lease id from the caller: 32 hex characters.
100
const leaseId = (yield* (yield* SecureRandom.SecureRandom).uuidV4()).replaceAll("-", "");
@@ -121,7 +130,10 @@ const simlock = (device: string): DeviceProvider => {
130
return {
131
name: "simlock",
132
acquire: (request) =>
124
- acquire(request).pipe(Effect.provide(NodeCrypto.layer), Effect.runPromise),
133
+ acquire(request).pipe(
134
+ Effect.provide([NodeCrypto.layer, NodeServices.layer]),
135
+ Effect.runPromise,
136
+ ),
137
release: (lease, context) =>
138
connect(context.env).pipe(
139
Effect.flatMap((daemon) =>