WP-088: Google Play internal testing pipeline: build, sign, upload, install on a family TV

Status: ⏸ On hold (2026-12-05) until WP-144’s branch split (Jeff: “Yes, check and hold”). Step 1’s dry run and the TCL release-build launch check passed; build 1 waits so the one uploaded comes from the app’s branch after the split (§Result). Resuming needs a fresh pre-flight, since the split moves the TV build to its own branch and this script to the Classics repo. The Play part is also ⏸ blocked on the organization developer account (WP-084 D3, which waits for the corrected D&B record to reach Google, expected by about 2026-12-21). Approved 2026-11-26 (Jeff: “Approve as proposed”) and reworked onto WP-084’s account and key decisions on 2026-12-01 (Jeff: “Yes, rework and PR”); see DECISIONS. Drafted as WP-086 / EC-009 and renumbered on 2026-11-26, when those numbers went to the Hotspot Magnet research. Pre-flight READY 2026-12-01 (pre-flight-WP-088-2026-12-01; execution prompt session-WP-088-2026-12-01). Phase: 5 (polish & distribution). Depends on: WP-085 Milestone 1 ✅ (the app’s own identity, injected at build time; fork PR barefootbetters/scummvm#13); WP-104’s icon, banner and theme (in the build through the same injection); WP-084’s developer account (D3), upload key and app signing key (D4); WP-079 ✅ (the fork’s TV build path). Unblocks: WP-084 (its Play release reuses this script, the app record and the track experience), and every later Play release of a studio Android app. Companion EC: EC-011. Pre-flight required: Yes. It commits a tool script under tools/, creates the Play app record (which fixes the package id and app signing key for good), and claims a release-integrity posture. Targets generation(s): none. No engine code; TerraGlyph is compiled in and tested with Gen 1 (Showdown) data. Estimated effort: about 1 day of hands-on work once the account exists.


Goal

Prove the whole distribution path once, end to end, and leave it repeatable: source → build → sign → upload → Google Play internal testing → install → launch → play, ending with a family member installing the app from Google Play onto a Sony Bravia TV and launching a legally obtained game. A second build then reaches the same TV through the same path. This is internal testing, not a public release: no store listing goes live, and no game is bundled.

A local milestone, then three acceptances verified and tracked separately. The WP is done only when all three pass, but one failing doesn’t hide the others: an unfinished import route doesn’t make a working delivery path look broken.

Milestone / acceptance Means
Build ready (local) A reproducible, signed, verified AAB built by tools/Build-AndroidRelease.ps1
A. Pipeline The family tester installs the app from Google Play on the Bravia and it launches
B. Gameplay The tester imports legally obtained game data and a game reaches play
C. Update The tester receives and installs a later version through the same track

Background

Scope

In scope

  1. tools/Build-AndroidRelease.ps1 (PowerShell 7, drives WSL): exact fork commit in a throwaway worktree; the identity properties checked; release configure per ABI with sky and terraglyph, libpng, FreeType and --disable-cloud, each checked in config.h; version through the fork’s properties (no file edited); both ARM ABIs in one bundle; jarsigner with the upload key (password by environment variable or no-echo prompt, never on a command line or in a log), and the signing certificate checked against WP-084’s upload key; bundletool validate; package, version, ABIs and the identity assets read back from the bundle; 16 KB alignment checked; artifact, SHA-256 and ledger row in the release folder; no overwrite, no version-code reuse; non-zero exit on any failure; a -DryRun mode with a throwaway key.
  2. The runbook play-internal-testing.md: build machine setup, version codes, the per-release steps, the first-time app and track setup, the family install guide, game-data routes, GPL, troubleshooting, and the move from internal to closed to production.
  3. The Play app record, created in the organization account with the app’s private name and package id, with our app signing key enrolled by PEPK per WP-084 D4. Play’s App signing page must then show both certificates WP-084 recorded. WP-084 reuses this record.
  4. The internal testing track and a tester list.
  5. GPL for internal testing, before any tester receives a build: the exact source of that build available to the testers (the tagged fork commit, plus the private identity input the build injected; see §Notes), the license notices it ships, and the source location in the release notes. The runbook’s GPL checklist.
  6. Acceptance A (pipeline): build 1 uploaded to internal testing; the family tester opts in, installs it on the Bravia from Google Play, and it launches with its own name and banner.
  7. Acceptance B (gameplay): on the Bravia, the tester navigates with the gamepad, imports a legally obtained game by a route that works there, and the game reaches play.
  8. Acceptance C (update): build 2, with a higher version code, through the same track, installs as an update on the Bravia.

Out of scope

Decisions for Jeff

# Decision Answer
D0 How this relates to WP-084 and WP-085 Answered 2026-11-26 (“Approve as proposed”) and reworked 2026-12-01 (“Yes, rework and PR”): internal testing comes before WP-084’s public release; the account and both keys stay WP-084’s (DECISIONS)

Engineering calls (Claude’s, changeable before the first upload):

Both re-checked at the pre-flight (2026-12-01) and kept. It added four more:

Pre-flight answers (2026-12-01)

# Question Jeff’s answer
Q1 How testers get the private identity input the build injects (GPL) “Written offer, zip on request (Recommended)”: the release notes give the fork tag and say the build inputs are available from Jeff; on request he sends a zip of them as of that build
Q2 adb push with developer mode on the family Bravia, if no picker route works “Yes, dev mode is OK”
Q3 The family tester, and their Google account on the Bravia “Yes, named and on the Bravia” (named in the 1Password register)
— The organization account’s state “D&B record pending”

Dependencies

Execution

  1. Pre-flight (pre-flight-WP-088-<date>.md).
  2. EC-011 Step 1: dry run, then build 1 with the upload key (build ready). Can run before the account exists.
  3. EC-011 Step 2: app record and key enrolment, GPL items, upload, tester opt-in, install and launch on the Bravia (acceptance A).
  4. EC-011 Step 3: game import and launch (acceptance B).
  5. EC-011 Step 4: second build updates in place (acceptance C). Steps 3 and 4 are independent; a gap in one doesn’t hold the other.
  6. §Result with evidence for each acceptance; WORK_INDEX updated.

Exit criteria

Build ready (local)

  1. D0 answered (2026-11-26, reworked 2026-12-01).
  2. A signed release AAB built by the script from a recorded fork commit: ledger row, SHA-256, the upload certificate matching WP-084’s, both ABIs, 16 KB alignment, libpng and FreeType in both, no cloud (script output captured).

A. Pipeline

  1. The app record exists with the app signing certificate WP-084 recorded (Play Console’s App signing page, screenshot).
  2. GPL items in place for build 1: tagged source, the private identity input available to the testers, source location in the release notes.
  3. The AAB uploaded to the internal testing track and the release rolled out (Play Console screenshot).
  4. The family tester accepted the opt-in.
  5. The tester installed the app from Google Play on the Sony Bravia (photo or screenshot of the Play page on the TV, or Play Console’s install report).
  6. The app launches on the Bravia with its own name and banner.

B. Gameplay

  1. The tester navigates the library with the gamepad.
  2. A legally obtained game is imported, detected, and reaches play (the route used is recorded).

C. Update

  1. A second build with a higher version code installs as an update through the same track; if B passed first, the game and its saves survive it.
  2. The runbook was followed for build 2 without reconstructing anything; any gaps found are fixed in it.

Each acceptance is recorded on its own in §Result. The WP is done when all three pass. It isn’t done because the script runs or an AAB exists: criteria 3–11 need the real Play delivery and the real TV.

Risks

Risk Likelihood Impact Mitigation
No import route on the Bravia (B). On the TCL, WP-085 found no route without a computer: no system document picker, USB unreadable by path. The Play build also has no cloud saves (so no cloud import) and no advanced mode (WP-085 D4: test builds only). med high for B Record the Bravia’s facts first (EC-011 Step 2). Routes to try, in order: the system picker if this model has one; a file manager that provides a document picker; adb push with developer mode on the Bravia (allowed: pre-flight Q2). A failure is recorded for WP-085 criterion 3, and A and C go ahead
The app record fixes the package id and app signing key for good low high The pre-flight checks the package id against the private record, and the App signing page against WP-084’s certificates, before the first upload
A sideloaded build on a test TV blocks the Play install (different signature) med on the TCL, none on the Bravia low Uninstall the sideloaded app before installing from Play; the Bravia has none

Deliverables

Notes

Result

⏸ On hold, 2026-12-05. Execution opened on 2026-12-04 (execution prompt); the details and captures are in EC-011 Step 1.

Build ready: held before build 1.

A, B, C: not started (the account, and the hold).

To resume: after WP-144 Phase C (and Phase D, if the script has moved by then), re-run the pre-flight against the app’s branch and the script’s new home, then EC-011 Step 1’s build 1, close to the account’s verification. Not yet seen with the real upload key: the script’s no-echo password prompt, its certificate check passing, and the release folder and ledger being written.