Skip to content

fix(harness): provision the TV AVD when the phone AVD is refused - #177

Merged
altaywtf merged 1 commit into
mainfrom
fix/bootstrap-avd-independent-profiles
Sep 24, 2026
Merged

altaywtf merged 1 commit into
mainfrom
fix/bootstrap-avd-independent-profiles

Conversation

@altaywtf

Copy link
Copy Markdown
Member

Refs #176

On a machine whose putio-phone AVD predates the API 37 Google Play image, scripts/bootstrap.sh exits at the phone's image-mismatch refusal before it reaches the TV profile, so putio-tv is never created and emulator.sh boot tv fails with "AVD putio-tv does not exist". Bootstrap now provisions each profile independently: a refused profile still prints its recovery command and fails the run, but the other profile is created. The harness doc also states which AVDs the harness owns, so unrelated or unloadable AVDs on the machine are expected to stay untouched.

The new fake-SDK contract case fails when provisioning stops at the first refusal and passes with this change. On an Apple Silicon Mac with a stale API 36 putio-phone, main's bootstrap exited without creating putio-tv; this branch created putio-tv (android-36;android-tv;arm64-v8a), still exited 1 with the phone recovery command, and emulator.sh boot tv --headless booted it (API 36, arm64-v8a, leanback) before stop shut it down.

The Google TV profile from #176 is not part of this change.

Copilot AI lite review requested due to automatic review settings September 24, 2026 17:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T17:28:16.424580Z 6e28663 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The change is narrowly scoped, preserves failure signaling, and is backed by a contract test that covers the reported mismatch scenario.

Review effort: Lite
Findings: None

What changed in this PR

This PR fixes a bootstrap edge case in the emulator harness: when creating the putio-phone AVD is refused due to a system-image mismatch, bootstrap now still provisions the putio-tv AVD so TV harness workflows can run even while the phone AVD requires manual recovery.

Changes:

  • Add provision_avds() to provision phone and TV AVDs independently, collecting failures and failing the run only after attempting both.
  • Update scripts/bootstrap.sh to use provision_avds (preserving non-zero exit on any refused profile).
  • Extend emulator contract tests to cover the “mismatched phone must not block TV creation” scenario and document harness AVD ownership expectations.
File Description
scripts/​test-emulator.sh Adds a contract test ensuring TV AVD creation proceeds even when phone provisioning is refused, and verifies expected recovery messaging.
scripts/​lib.sh Introduces provision_avds() that attempts phone and tv provisioning independently and reports which profiles failed.
scripts/​bootstrap.sh Switches from a sequential provisioning loop to provision_avds, ensuring TV provisioning is attempted even if phone is refused.
docs/​harness.md Clarifies bootstrap behavior on mismatched AVDs and documents which AVDs the harness owns/leaves untouched.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@altaywtf
altaywtf merged commit 8ca9323 into main Sep 24, 2026
2 checks passed
@altaywtf
altaywtf deleted the fix/bootstrap-avd-independent-profiles branch September 24, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants