Skip to content

Commit 47f4f67

Browse files
mikepitreclaude
andcommitted
ci(repo): launch the app once before the first device spec on iOS
The first spec after the simulator boots failed its first attempt in three of four runs on the hosted Mac, each time differently: a launch over 30 seconds, a first tap that focused nothing, a two minute timeout. The iOS job now launches the app once through the skill's screen verb before the specs, so no spec pays for the cold start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c548da5 commit 47f4f67

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ For a remote device, `down` ends the runner job and waits for it to finish, and
255255
- `npm test --prefix .claude/skills/verify-clerk-expo` runs the CLI's unit tests, with no network, key, or device. `npm run typecheck --prefix .claude/skills/verify-clerk-expo` runs `tsc`. The `Verify Skill Tests` job in `.github/workflows/ci.yml` runs both on Linux when a pull request changes the skill, the fixture, or a package the fixture links.
256256
- `src/core/`, `src/platform/ios/`, `src/platform/android/`, `specs/fixtures.ts`, `testing/`, and every test but `test/host.test.ts`, `test/remote-host.test.ts`, `test/freshness.test.ts`, and `test/native-build.test.ts` are shared with the clerk-ios and clerk-android verification skills. Change them there first, then copy them here, and never edit them here. `doctor`'s `core-drift` check fails when a file under `src/core/` differs from `src/core/MANIFEST`. Do not rewrite the manifest here to make it pass.
257257
- `src/host.ts`, `src/fixture.ts`, `src/native-build.ts`, and `src/freshness.ts` are this repository's own: the screens, the build of the fixture, the native build that CI keeps between runs, the Metro ports, and the check that Metro serves current JS. `specs/native.ts` holds the per-platform locators for the native views.
258-
- `.github/workflows/verify-device-specs.yml` runs `up --backend local`, `run --all --retries 1 --github-report`, and `down` on a runner for each platform, so the device is on the runner itself and no remote session starts. A test that fails and then passes on its one retry is `flaky` there and does not fail the job. Each job writes its results to the job summary. On a pull request it also posts one comment per platform and updates that comment on later runs, and for that the job's token may write pull request comments. It runs for a pull request that is not a draft, and a draft gets a notice instead. The runners are GitHub-hosted, `macos-26` and `ubuntu-24.04`, and the repository variables `VERIFY_CI_RUNNER_IOS` and `VERIFY_CI_RUNNER_ANDROID` name other labels. It sets `VERIFY_LOCAL_BUILD=standalone`, which makes a local lease build the Release app with the JS embedded and start no Metro, and `VERIFY_NATIVE_CACHE`, which keeps the native build between runs ([freshness.md](references/freshness.md)). The Platform API key comes from the `MOBILE_VERIFICATION_PLATFORM_API_KEY` repository secret. It uploads each run's `run.json`, video, screenshots, and e2e's `report.json`, `junit.xml`, summary, and failure pages for three days, and only when the run is sealed with no secret found in it.
258+
- `.github/workflows/verify-device-specs.yml` runs `up --backend local`, `run --all --retries 1 --github-report`, and `down` on a runner for each platform, so the device is on the runner itself and no remote session starts. A test that fails and then passes on its one retry is `flaky` there and does not fail the job. On iOS the job launches the app once before the first spec, because the first launch on a simulator that has just booted is slow enough to fail whichever spec runs first. Each job writes its results to the job summary. On a pull request it also posts one comment per platform and updates that comment on later runs, and for that the job's token may write pull request comments. It runs for a pull request that is not a draft, and a draft gets a notice instead. The runners are GitHub-hosted, `macos-26` and `ubuntu-24.04`, and the repository variables `VERIFY_CI_RUNNER_IOS` and `VERIFY_CI_RUNNER_ANDROID` name other labels. It sets `VERIFY_LOCAL_BUILD=standalone`, which makes a local lease build the Release app with the JS embedded and start no Metro, and `VERIFY_NATIVE_CACHE`, which keeps the native build between runs ([freshness.md](references/freshness.md)). The Platform API key comes from the `MOBILE_VERIFICATION_PLATFORM_API_KEY` repository secret. It uploads each run's `run.json`, video, screenshots, and e2e's `report.json`, `junit.xml`, summary, and failure pages for three days, and only when the run is sealed with no secret found in it.
259259
- `src/platform/session-device.ts` holds the steps that a remote session runs on its device, `.github/workflows/verify-remote.yml` is the workflow that the session runs in, and `src/core/remote/` is the code on both ends of it. The runner installs this skill with `npm ci` and uses the same `node_modules/.bin/agent-device` as a Mac does.
260260
- To call `agent-device` yourself, use `node_modules/.bin/agent-device` in the skill directory with `AGENT_DEVICE_STATE_DIR=.claude/skills/verify-clerk-expo/.verify/agent-device`. Each worktree runs its own daemon from there, and `down` stops it. Never print `.verify/agent-device/daemon.json`, because it holds the daemon's auth token.
261261
- `features/` is the feature map. Start with `features/README.md`, and update a feature file in the same PR as a change to the behavior it maps.

‎.github/workflows/verify-device-specs.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ jobs:
250250
"$SKILL/node_modules/.bin/agent-device" prepare ios-runner --platform ios --udid "$udid" --timeout 900000 \
251251
|| echo "::warning::prepare ios-runner failed; the first spec pays for it"
252252
253+
- name: Launch the app once before the first spec
254+
if: matrix.platform == 'ios'
255+
timeout-minutes: 5
256+
run: |
257+
"$CLI" screen --platform ios > /dev/null || echo "::warning::the first launch failed here; the first spec pays for the cold start"
258+
253259
- name: Run the golden specs
254260
timeout-minutes: 30
255261
env:

0 commit comments

Comments
 (0)