diff --git a/.claude/skills/verify-clerk-android/SKILL.md b/.claude/skills/verify-clerk-android/SKILL.md index 5b8f5a7b9..35abf406a 100644 --- a/.claude/skills/verify-clerk-android/SKILL.md +++ b/.claude/skills/verify-clerk-android/SKILL.md @@ -1,11 +1,11 @@ --- name: verify-clerk-android -description: Drive the clerk-android SDK UI (AuthView, UserButton, UserProfileView, OrganizationSwitcher, session tasks) in the :e2e host app on an Android emulator against a real Clerk development instance that the CLI creates and deletes, and capture video, screenshots, and the app log as evidence. Use it to prove any change to source/api, source/ui, or the :e2e host works before calling it done, to reproduce a UI bug, or to run the golden regression specs. +description: Drive the clerk-android SDK UI (AuthView, UserButton, UserProfileView, OrganizationSwitcher, session tasks) in the :e2e host app on an Android emulator, on this machine or on a CI runner, against a real Clerk development instance that the CLI creates and deletes, and capture video, screenshots, and the app log as evidence. Use it to prove any change to source/api, source/ui, or the :e2e host works before calling it done, to reproduce a UI bug, or to run the golden regression specs. --- # verify-clerk-android -`e2e-tests/bin/control-clerk-android` is a control CLI over [e2e](https://github.com/tester-army/e2e). It builds the debug APK of `:e2e`, the test app that this file calls the host, boots an emulator, creates one Clerk application for the worktree, seeds `+clerk_test` users, runs specs, and keeps the evidence. +`e2e-tests/bin/control-clerk-android` is a control CLI over [e2e](https://github.com/tester-army/e2e). It builds the debug APK of `:e2e`, the test app that this file calls the host, boots an emulator, creates one Clerk application for the worktree, seeds `+clerk_test` users, runs specs, and keeps the evidence. The emulator runs on this machine when this machine can run it, and on a CI runner when it cannot. The CLI chooses and says which, and every verb, spec, and evidence file is the same either way. The tests are an ordinary e2e project. `e2e.config.ts` and `specs/` run under `npx e2e run` when the environment names a device, a build of the test app, and a development instance's keys. The CLI sits on top: it makes those three for a run and keeps the evidence. [The package README](../../../e2e-tests/README.md) has the commands for a run by hand and what such a run leaves out. @@ -24,6 +24,8 @@ A machine needs these once: The first `up` writes the `Clerk_Verify_Pixel` AVD when the machine has none. An AVD you already have is never changed. +A machine that cannot run the emulator, such as one with no SDK or a Linux machine with no KVM, needs only Node 24 (24.8 or newer), the credential, and access to GitHub. The CLI then borrows an emulator on a CI runner, as the end of this section describes. + ```console $ npm ci --prefix e2e-tests # once per worktree $ e2e-tests/bin/control-clerk-android doctor @@ -49,6 +51,20 @@ The CLI drives only the lane emulators it boots. Any other emulator on a lane po Each worktree runs its own agent-device daemon from its own `node_modules`, with state under `.verify/agent-device/`, and `down` stops it. +When this machine cannot run the emulator, `up` borrows one on a GitHub Actions runner. The runner session builds a pushed commit, never your working tree, so the loop is commit, push, `up`. This `up` forces the runner with `--backend remote`. Its first line, one of its `wait` lines, and its last line: + +```console +$ git commit -am "..." && git push +$ e2e-tests/bin/control-clerk-android up --backend remote +backend remote forced by --backend remote +wait run has waited 14s, now for the tunnel on ubuntu-24.04 +device Clerk_Verify_Pixel on ubuntu-24.04 remote leased by this worktree installed android-cba5fdb5c161 +``` + +With no flag, the first line gives the reason instead, such as `backend remote local is out: there is no /dev/kvm, so this machine has no hardware virtualization for the emulator; the device runs on a CI runner (ubuntu-24.04 unless --runner names another), started through verify-remote.yml on clerk/clerk-android`. + +A session runs on a free GitHub-hosted runner. Allow about ten minutes for the first `up` on a runner, most of that the first Gradle build. `--runner blacksmith-4vcpu-ubuntu-2404` on `up` leases a Blacksmith runner instead, which is billed by the minute. A session holds its runner until it stops, so run `down` as soon as you are done. `--backend local` or `--backend remote` forces the choice, and `--runner