Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .claude/skills/verify-clerk-android/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ When this machine cannot attach and there is no session to hand the files to, or

Attach the run of your own change. Run your new or changed spec on its own and attach that run, so the screenshots or the video show only what the change is about. A run of `--all` marks nothing, so `attach --video` refuses it. If you ran other committed specs too, cite that run's id in the PR.

Work in this order, with one `up` for both runs: make the branch, `git push` it when the session is remote, `up`, `run` the spec without your change when it changes something that exists, make the change, commit, `git push`, `run` the spec again, open the pull request, `attach` with the before run as `--before <run-id>`, `down`. Open the pull request after the last run, so that it is not left open without its evidence. Commit before the second `run`, so that the line `attach` writes names a commit the pull request holds. In the pull request, name the run id and the specs you ran, and say what you did not run.
Work in this order, with one `up` for both runs: make the branch, `git push` it when the session is remote, `up`, `run` the spec without your change when it changes something that exists, make the change, commit, `git push`, `run` the spec again, open the pull request as a draft with `gh pr create --draft`, `attach` with the before run as `--before <run-id>`, `down`, then `gh pr ready <n>` once the description holds the evidence tables. Open the pull request after the last run, so that it is not left open without its evidence. Open it as a draft because review bots such as CodeRabbit review a pull request when it opens or turns ready, and judge the description they read then. A pull request opened ready is reviewed before `attach` writes the evidence, and fails the device evidence check. Commit before the second `run`, so that the line `attach` writes names a commit the pull request holds. In the pull request, name the run id and the specs you ran, and say what you did not run.

On a local emulator `attach` writes the description itself, and no run needs a push. A remote session builds only the commit it was started on and later commits of the branch, so its before run comes before the push of the change. Its evidence reaches the description about a minute after `down`.
On a local emulator `attach` writes the description itself, and no run needs a push. A remote session builds only the commit it was started on and later commits of the branch, so its before run comes before the push of the change. Its evidence reaches the description about a minute after `down`, so check that `gh pr view <n> --json body` shows the `verify-evidence` block with its table, not the list of files that the first of its two writes leaves, before `gh pr ready <n>`. Its table has a `| :---:` row, and the list does not. In a Claude Code cloud session GitHub's GraphQL API is blocked, so `gh pr create`, `gh pr view`, and `gh pr ready` fail there. Open the draft with `gh api repos/clerk/clerk-android/pulls -f title='<title>' -f head=<branch> -f base=main -F draft=true -F body=@<file>`, read the description with `gh api repos/clerk/clerk-android/pulls/<n> --jq .body`, and mark it ready with `gh api -X POST repos/clerk/clerk-android/pulls/<n>/ccr/ready_for_review`.

When the change is already committed or pushed, make the before run on its base commit in this worktree, so the run lands in this checkout's `.verify/runs/`. A spec in `specs/explored/` stays through the switch, because that directory is gitignored. A committed spec of the change is not on the base, so copy it to `specs/explored/` first and change its import to `'../fixtures.ts'`.

Expand All @@ -267,8 +267,11 @@ $ e2e-tests/bin/control-clerk-android down
$ git switch <branch>
$ e2e-tests/bin/control-clerk-android up --backend remote
$ e2e-tests/bin/control-clerk-android run specs/explored/<name>.e2e.ts
$ gh pr create --draft
$ e2e-tests/bin/control-clerk-android attach <run-id> --pr <n> --screenshot <label> --before <before-run-id>
$ e2e-tests/bin/control-clerk-android down
$ timeout 600 sh -c 'until gh api repos/clerk/clerk-android/pulls/<n> --jq .body | sed -n "/<!-- verify-evidence:android -->/,/<!-- \/verify-evidence:android -->/p" | grep -q "| :---:"; do sleep 15; done'
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
$ gh pr ready <n> # in a Claude Code cloud session: gh api -X POST repos/clerk/clerk-android/pulls/<n>/ccr/ready_for_review
$ git push origin --delete <branch>-before && git branch -D <branch>-before
```

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/verify-clerk-android/references/remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The workflow publishes only when all of these hold. Otherwise it prints the reas

`attach` checks the same rules before it sends anything, and fails with the reason.

So one session does both runs: push the branch, `up`, `run` for the before run, push the change, `run` again, open the pull request, `attach` with `--before <run-id>`, `down`. Open the pull request after the last run, so that it is not left open without its evidence, which reaches the description about a minute after `down`.
So one session does both runs: push the branch, `up`, `run` for the before run, push the change, `run` again, open the pull request with `gh pr create --draft`, `attach` with `--before <run-id>`, `down`, then `gh pr ready <n>` once the description shows the evidence table. In a Claude Code cloud session, use the REST forms that `SKILL.md` gives for those `gh pr` commands. Open the pull request after the last run, so that it is not left open without its evidence, which reaches the description about a minute after `down`. It stays a draft until then so that review bots read the description with the evidence in it.

A before run is the build without the change, so its commit is often the one the branch started from, which is no commit of the pull request. The workflow therefore does not look for that commit among the commits of the pull request. It asks GitHub whether that commit is the commit of the run or a commit before it in its history, and it publishes nothing when the answer is no. After a rebase that rewrote the commit of the before run, `run` the spec again on a commit that the branch still has, and pass that run as `--before`. The workflow cannot check that the files of the before run came from a build of that commit, which is why the line says that the session reports the before run.

Expand Down
Loading