fix(review-host): give the reviewer a diff to review, and stop paging on expired credentials
Found by driving the app on a simulator as the reviewer sees it, after #7199.
The demo workspaces had no diff
The listing's promo text is "Start work, follow it live, and review the diff from your phone" — and all five demo workspaces showed nothing to review. Two independent causes:
- Nothing committed. The worktrees were rebuilt as bare branches off
mainduring the GCP move, losing the agent-made changes that produced the App Store screenshots. Each branch now carries one small change matching its name. - The base could not resolve at all.
getDefaultBranchNamereadsrefs/remotes/origin/HEAD;resolveBaseComparisonthen falls back toorigin/<default>. The demo repos are created bygit initinsetup.sh, so they have neither ref —listCommitsreturned[]regardless of what was committed. They were clones ofsuperset-sh/acme-demobefore this box was rebuilt, which is why it never showed up.
setup.sh now fabricates origin/main and origin/HEAD locally. There is no remote to fetch from and nothing tries to — the upstream stays a local branch, a path resolveBaseComparison already handles (remote = ".", fetchTarget: null).
check.sh gained an assertion that every demo workspace has a diff. It has now been empty twice for different reasons, and it is a listing mismatch rather than a cosmetic gap.
check.sh could not tell "box is down" from "I can't ask"
Every probe runs through gcloud. When the refresh token expired mid-session, instances describe returned nothing and the check reported "instance is 'missing', not RUNNING" — which trips the automation's @-mention. It would have paged someone about a perfectly healthy box.
It now exits 2 with INCONCLUSIVE: gcloud cannot authenticate on this machine, and the automation prompt knows exit 2 means the check could not run, reports it without the mention, and never claims an unreachable host it never reached.
Verified
All five workspaces return a commit through git.listCommits — the app's own call — and the full check passes:
instance: RUNNING
host-service: 1.26.0 (host a5b47ded…)
version: current with 1.26.0
relay: sees the host online
procedures: all 31 the app calls are present
worktrees: every workspace has one on disk
demo set: matches the App Store screenshots
diffs: every demo workspace has one
OK
Not addressed on purpose: the PR viewer stays unreachable in the App Review org. The chip's list comes from githubInstallations in the database, but the detail view calls host github.getPullRequestDetail, which is Octokit against live GitHub — so seeding rows produces a chip that opens onto an error, worse than today's clean empty state. The listing promises diff review, not PR review, and check.sh still probes all seven github.* host procedures by name.
https://claude.ai/code/session_0126YNrKGh5P6h9a2S9j1YAj
Summary by cubic
Fixes the App Store review host so demo workspaces have a diff to review and expired gcloud credentials no longer page someone about a healthy box. Both demo workspaces are now clones of the public superset-sh/acme-demo and superset-sh/acme-ios-demo repos, which restores the open PRs whose chips are the only route to the diff.
setup.shclones both demo repos instead ofgit init-ing them; the origin-URL guard re-clones hosts running the old fabricated repos.- The host reads
GH_TOKENfrom/etc/superset-review-host.env, andcheck.shfails when that token is rejected or expired; the README's rotation command pipes it over stdin to keep it out of shell history and box logs. check.shasserts every demo workspace has a diff and both demo projects have a linked pull request.- Workspace IDs that aren't UUIDs are skipped, and skipping any fails the check instead of hiding a workspace.
check.shexits 2 withINCONCLUSIVEwhengcloudcannot authenticate instead of reporting a healthy instance as missing.- Removes the vendored
demo/copy and its biome exclusion.
Summary by CodeRabbit
-
New Features
- Added automated review-host checks for authentication, workspace commits, linked pull requests, available diffs, relay health, and version status.
- Demo workspaces now validate repository origins, fetch updates, and recover from outdated or incorrect repository setups.
- Added configuration support for GitHub access used during pull-request review.
-
Documentation
- Documented review-host infrastructure, operations, updates, rollback procedures, monitoring, and GitHub token management.
- Documented health-check outcomes, including unavailable authentication, missing pull requests, empty diffs, and missing or expired GitHub access.