Skip to content

Commit 160b44a

Browse files
mikepitreclaude
andcommitted
docs(expo): document borrowed devices in the verify skill
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dfc7d6b commit 160b44a

8 files changed

Lines changed: 145 additions & 32 deletions

File tree

‎.claude/skills/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ relevant.
4444

4545
## Skills in this repo
4646

47-
| Skill | Use it for |
48-
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
49-
| `clerk-monorepo` | Day-to-day work in the monorepo: setup, build/test loops, the package map, changesets, commits, PRs, breaking-change checks. |
50-
| `mosaic` | Mosaic flow UI: authoring machines, controllers, and views, and migrating a legacy component into the split (with parity verification). |
51-
| `verify-clerk-expo` | Proving a `@clerk/expo` change on an iOS simulator or Android emulator, with video and app state as evidence. |
47+
| Skill | Use it for |
48+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
49+
| `clerk-monorepo` | Day-to-day work in the monorepo: setup, build/test loops, the package map, changesets, commits, PRs, breaking-change checks. |
50+
| `mosaic` | Mosaic flow UI: authoring machines, controllers, and views, and migrating a legacy component into the split (with parity verification). |
51+
| `verify-clerk-expo` | Proving a `@clerk/expo` change on an iOS simulator or Android emulator, local or borrowed on a CI runner, with video and app state as evidence. |

‎.claude/skills/verify-clerk-expo/SKILL.md‎

Lines changed: 38 additions & 16 deletions
Large diffs are not rendered by default.

‎.claude/skills/verify-clerk-expo/features/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# @clerk/expo verification map
22

3-
This directory is the maintained source for verifying the user-facing behavior of `@clerk/expo` through the `expo-native` fixture app in `integration/templates/expo-native`. The fixture runs as a Debug dev client that loads its JS, and `packages/expo` with it, from a local Metro server. Read this index before driving the app, then use the matching feature file as the recipe. Every recipe runs through `.claude/skills/verify-clerk-expo/bin/control-clerk-expo` and the golden specs under `specs/golden/<feature>/`.
3+
This directory is the maintained source for verifying the user-facing behavior of `@clerk/expo` through the `expo-native` fixture app in `integration/templates/expo-native`. On a local device the fixture runs as a Debug dev client that loads its JS, and `packages/expo` with it, from a local Metro server. On a borrowed device it runs as a standalone Release build of a pushed commit, with the JS embedded. Read this index before driving the app, then use the matching feature file as the recipe. Every recipe runs through `.claude/skills/verify-clerk-expo/bin/control-clerk-expo` and the golden specs under `specs/golden/<feature>/`.
44

55
## Baseline preconditions
66

77
- Run commands from the root of a clerk/javascript worktree. Run `pnpm install` and `npm ci --prefix .claude/skills/verify-clerk-expo` once there. Paths that start with `.verify/` or `specs/` are inside the skill directory.
8-
- Run `.claude/skills/verify-clerk-expo/bin/control-clerk-expo doctor --platform ios` (or `android`) first. Every check is `ok` except `build` before the first `.claude/skills/verify-clerk-expo/bin/control-clerk-expo up`.
8+
- Run `.claude/skills/verify-clerk-expo/bin/control-clerk-expo doctor --platform ios` (or `android`) first. Every check is `ok` except `build` before the first `.claude/skills/verify-clerk-expo/bin/control-clerk-expo up`. On a machine that cannot run the device, `doctor --backend remote` checks the borrowed-device path, and the session builds a pushed commit, so commit and push before `up` and before a `run` that follows an edit.
99
- `up` needs a credential for creating throwaway Clerk applications: `CLERK_PLATFORM_API_KEY` or `CLERK_PLATFORM_API_KEY_FILE`, a cloud environment's credential, or a 1Password reference the machine holds outside the repo. `doctor` says which one it found and prints one fix line when there is none. Do not read or print the key.
10-
- The CLI drives only its own lane devices. On iOS that is `verify-ios-<n>`, cloned from `Clerk Verify Template iOS`. On Android it is `Clerk_Verify_Pixel` booted `-read-only` as `emulator-5560` or `emulator-5562`. Never drive a simulator or emulator the CLI did not create, or a device another worktree holds.
10+
- The CLI drives only devices it owns: a local lane, or a simulator or emulator it borrowed on a CI runner. On iOS a lane is `verify-ios-<n>`, cloned from `Clerk Verify Template iOS`. On Android it is `Clerk_Verify_Pixel` booted `-read-only` as `emulator-5560` or `emulator-5562`. Never drive a simulator or emulator the CLI did not create, or a device another worktree holds.
1111
- Every launch gets a new `verifyStorageScope`, so no spec inherits a session from another spec.
1212

1313
## Test users and sign-in
@@ -50,11 +50,11 @@ Rules:
5050

5151
## Proof and skip reporting
5252

53-
- A proof is a passing `.claude/skills/verify-clerk-expo/bin/control-clerk-expo run` whose run directory holds `video.mp4`, `screenshots/`, `states.jsonl`, `state.json`, `app.log`, and `e2e/report.json`. `states.jsonl` is the state proof on both platforms. On Android `app.log` also carries the `[verify]` console lines. On iOS it carries only the app's native log lines, and the JS console lines, a JS change's own log lines included, are in `.verify/runtime/metro-<port>.log`. Read the run's whole window there by `runId`, as `references/freshness.md` describes.
53+
- A proof is a passing `.claude/skills/verify-clerk-expo/bin/control-clerk-expo run` whose run directory holds `video.mp4`, `screenshots/`, `states.jsonl`, `state.json`, `app.log`, and `e2e/report.json`. `states.jsonl` is the state proof on both platforms. On Android `app.log` also carries the `[verify]` console lines. On a local iOS device it carries only the app's native log lines, and the JS console lines, a JS change's own log lines included, are in `.verify/runtime/metro-<port>.log`. Read the run's whole window there by `runId`, as `references/freshness.md` describes. On a borrowed iOS device there are no JS console lines anywhere and no Metro log, so a JS change is proven from `states.jsonl` and a screenshot.
5454
- Name the run id, the platform, and the specs in the PR. Attach with `.claude/skills/verify-clerk-expo/bin/control-clerk-expo attach <run-id> --pr <n>`.
5555
- Four specs carry `form-entry`: `custom-flow-sign-in/complete`, `custom-flow-sign-up/request-code`, `custom-flow-sign-up/complete`, and `native-auth-view/complete`. None has a recorded passing run. Report a skipped one as skipped with the reason the CLI prints, `skipped by --skip form-entry`, and never as verified through a ticket launch.
5656
- `custom-flow-sign-in/request-code` and `native-auth-view/request-code` (iOS) type no code or password, so `--skip form-entry` still runs them and they prove their flow up to the code screen. Sign-up has no such spec.
57-
- A spec limited to one platform reports as skipped on the other. Say which platform each proof ran on.
57+
- A spec limited to one platform reports as skipped on the other. Say which platform, and local or borrowed device, each proof ran on.
5858

5959
## Feature entry contract
6060

‎.claude/skills/verify-clerk-expo/features/native-js-sync.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Preconditions:
2222

2323
## Gotchas
2424

25-
- The `Sign out` row is at the bottom of the profile. On a small simulator it can be below the fold. The lane device shows it without scrolling.
25+
- The `Sign out` row is at the bottom of the profile. On a small simulator it can be below the fold. The devices the CLI leases show it without scrolling.
2626
- A sign-out that only clears the native session leaves `signedIn` true in JS. That is the bug this feature guards against.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Devices
1+
# Local devices
22

3-
Read this when a lane fails to lease or boot, when you need a lane's UDID or serial, or when you call `agent-device` yourself.
3+
Read this when a local lane fails to lease or boot, when you need a lane's UDID or serial, or when you call `agent-device` yourself.
44

55
## Lanes
66

@@ -9,6 +9,8 @@ Read this when a lane fails to lease or boot, when you need a lane's UDID or ser
99
- The machine holds four iOS and two Android lanes, across all agents. When all are taken, `up` and `run` fail with `POOL_FULL`. While `--wait <seconds>` waits, the CLI prints one `wait` line naming the lanes in use.
1010
- Before leasing, `up` and `run` release lanes whose claiming process is gone and whose worktree no longer exists, and print a `reap` line for each.
1111

12+
A remote device is not a lane: see [remote.md](remote.md).
13+
1214
## The agent-device daemon
1315

1416
Each worktree runs its own agent-device daemon from `.claude/skills/verify-clerk-expo/node_modules/.bin/agent-device`, with state under `.claude/skills/verify-clerk-expo/.verify/agent-device/`. A daemon shared across worktrees breaks every worktree once the worktree that started it is removed. The CLI sets `AGENT_DEVICE_STATE_DIR` for e2e and for every `agent-device` call, and `down` stops the daemon. If you call `agent-device` yourself, set `AGENT_DEVICE_STATE_DIR` to that directory. `down --dry-run` shows the daemon's pid in its `would stop` line. Never print `daemon.json` in the state directory: it holds the daemon's auth token.

‎.claude/skills/verify-clerk-expo/references/freshness.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How a change reaches the app
22

3-
Read this when a run launches old code, when `up` or `run` fails with `NOT_READY` about a stale `dist`, or when you change something other than `packages/expo/src`. Terms: the watch build is `tsdown --watch` in `packages/expo`, which keeps `packages/expo/dist` current. `dist` is a package's build output, and Metro bundles the app from it.
3+
Read this when a local run launches old code, when `up` or `run` fails with `NOT_READY` about a stale `dist`, or when you change something other than `packages/expo/src`. Terms: the watch build is `tsdown --watch` in `packages/expo`, which keeps `packages/expo/dist` current. `dist` is a package's build output, and Metro bundles the app from it.
44

55
## What forces a native rebuild
66

@@ -33,6 +33,10 @@ Fast Refresh stays on. When you save a JS change while an app from an earlier ru
3333

3434
The check dates a Metro revision it has not seen before by the second it was built. If two edits land within the same second, or an edit is reverted while Metro's watcher is still behind, the check can, rarely, launch a bundle one edit older than `dist`. Touching files cannot force a newer revision, because Metro skips modules whose transform key did not change. When a JS proof matters, look for your change's own log line in this run's window.
3535

36+
## A remote lease has none of this
37+
38+
A remote lease runs a standalone Release build with the JS embedded, so there is no watch build, no Metro, and none of the three checks. Its build key also covers the JS inputs, and a JS edit reaches the app by commit, push, `run`. See [remote.md](remote.md).
39+
3640
## Troubleshooting
3741

3842
- A machine behind an HTTPS debugging proxy such as Proxyman needs the proxy's CA trusted by `Clerk Verify Template iOS` before lanes are cloned from it. `doctor` reports it as `proxy-trust` and prints the fix.

0 commit comments

Comments
 (0)