feat(harness): add opt-in Google TV emulator profile - #178
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The updated contract test adds a non-portable grep pattern and the shared profile/image mapping should fail fast for unknown profiles to avoid confusing harness failures.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds an opt-in “Google TV” emulator profile to the harness toolchain so contributors can reuse a consistent Google TV launcher / Play-surface environment (without changing the default phone+Android TV bootstrap or prove.sh’s existing putio-tv target).
Changes:
- Extend harness profile plumbing to support a new
google-tvprofile (putio-google-tv) with profile-specific recovery instructions. - Update bootstrap to optionally install/provision the Google TV system image/AVD only when
--google-tvis provided. - Expand emulator contract tests and docs to cover opt-in provisioning, recovery messaging, and headless boot/stop behavior for Google TV.
| File | Description |
|---|---|
| scripts/test-emulator.sh | Adds contract coverage for Google TV opt-in behavior, recovery messaging, and headless boot/stop without phone readiness checks. |
| scripts/lib.sh | Introduces GOOGLE_TV_AVD, google_tv_image(), profile routing for google-tv, and profile-specific bootstrap recovery command selection. |
| scripts/emulator.sh | Accepts google-tv profile for create/boot/stop/delete and improves missing-image guidance to point at profile-appropriate bootstrap. |
| scripts/bootstrap.sh | Adds --google-tv flag to optionally install the Google TV system image and provision the Google TV AVD. |
| docs/harness.md | Documents the opt-in Google TV AVD, how to provision/boot/stop it, and clarifies harness-owned AVDs. |
| AGENTS.md | Notes that --google-tv adds the opt-in Google TV image + AVD during bootstrap. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.



The harness only offered the
android-tvimage, so Google TV launcher and Play-surface behaviour had no reusable emulator. Closes #176, whose other acceptance items landed in #177.scripts/bootstrap.sh --google-tvinstallssystem-images;android-36;google-tv;<arch>and provisions aputio-google-tvAVD (tv_1080p).scripts/emulator.shaccepts agoogle-tvprofile forcreate,boot,stop, anddelete. Recovery messages for this profile point atscripts/bootstrap.sh --google-tv. Plainscripts/bootstrap.shbehaves as before and neither downloads the image nor creates the AVD.prove.shstill usesputio-tv.scripts/test-emulator.shcovers the pinned image, the missing-image error, default provisioning skipping Google TV, opt-in provisioning, the mismatch recovery command, and headless boot/stop without the phone readiness checks. It fails with the profile code reverted.Local proof on Apple Silicon:
scripts/bootstrap.sh --google-tvinstalled the arm64 image, left the existing phone and TV AVDs alone, and createdputio-google-tv.scripts/emulator.sh boot google-tv --headlessbooted it in 25s. The emulator reported API 36 andandroid.software.leanback_only, andcom.google.android.apps.tv.launcherxresolved as home.scripts/emulator.sh stop google-tvthen shut it down.