Session Prompt — WP-145 execution (Get and Update tiles in the TV library)

Execution session. Paste this as the first message to a fresh session. It claims WP-145, writes its pre-flight, builds the change across the fork, the engine repo and the private repo, runs the exit criteria on the TCL, and opens the PRs. Keep it leashed: no spawned sessions. Every claim about what the TV showed comes from a capture this session made (a screenshot, logcat, a file pulled over adb) or from Jeff’s own words (DECISIONS 2026-11-21).

Intent

When the test build starts, it reads the tester’s beta manifest in the background:

All of this is in the debug build only. The release build keeps the stub and changes nothing.

Out of scope:

Authority chain (read order)

  1. C:\Users\jjensen\.claude\CLAUDE.md
  2. wp-lifecycle §Phase 2–4 and steps 5–13
  3. WP-145, every section. Its §Background maps the code at b59ea35fd8. Since then nothing under gui/, backends/ or dists/ has changed, through 38ec347633, so its line numbers hold:
    • gui/launcher.cpp:1787–1842: LauncherGrid::updateListing builds GridItemInfos and _domains in step.
    • gui/widgets/grid.h:51–78: GridItemInfo, with no tile kind.
    • gui/widgets/grid.cpp:72–235: GridItemWidget::drawWidget. Lines :197–210 draw the band with a hard-coded _("Play") in two places.
    • backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java:1242 and :1368: both TestFeatures.beforeScummVMStart calls. Find which one is onCreate’s before you hook in next to it.
    • advanced/.../PackagesActivity.java:234: loadManifest().
    • advanced/.../PackageStore.java:
      • :225: fetchManifest.
      • :71: Progress.onProgress(String).
      • :1068: writeJson.
      • :829: pending.json.
      • applyPending.
    • advanced/.../PackageManifest.java:112: compareVersions.
    • jni-android.cpp: :568–580 is JNI::setCurrentGame, and :816 is its FIND_METHOD. Follow that recipe, with jni-android.h:102 and :163, and ScummVM.java:129.
    • dists/android/build.gradle:170–176: advanced/ goes into debug and advanced-stub/ into release.
  4. tv-package-manifest: the format, “Unknown fields are ignored”, resume and verify.
  5. WP-139 §Result: the Worker, the 404 on a revoked key, criterion 7 (no key anywhere), and the admin scripts.
  6. WP-137 and WP-138: the band, and the grouping that Get tiles must join.
  7. Smart-TV guide: the WSL build (libpng is needed for the grid), adb over the network from Windows, and the TCL’s build record.
  8. Private: beta-data/README.md, beta-data/tools/Publish-BetaGame.ps1, Set-BetaTester.ps1, and beta-data/manifest/beta.json.

Pre-execution checks

If any check fails, stop and report.

Execution rules

Scope allowlist. Put it in the pre-flight §Scope lock:

fork:    gui/launcher.cpp, gui/launcher.h          (only if needed)
         gui/widgets/grid.cpp, gui/widgets/grid.h
         backends/platform/android/advanced/**
         backends/platform/android/advanced-stub/**
         backends/platform/android/org/scummvm/scummvm/ScummVM.java
         backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
         backends/platform/android/jni-android.cpp, jni-android.h
public:  docs/reference/pre-flight-WP-145-<date>.md
         docs/reference/tv-package-manifest.md
         docs/work-packets/WP-145-tv-get-tiles.md
         docs/work-packets/WORK_INDEX.md
         tools/packages/*.json, tools/packages/README.md
         tools/New-GamePackage.ps1
private: beta-data/tools/Publish-BetaGame.ps1
         beta-data/manifest/beta.json
         beta-data/README.md                       (only if the tool's usage changes)

Anything else in gui/ or backends/, or dists/android/**, has to be named in the pre-flight with a reason before you touch it.

External actions WP-145 authorizes. WP-145 names each of these, so nothing else is created or changed on the live host:

Forbidden:

You MUST:

Top risks:

Session task

Follow WP-145 §Execution:

  1. Claim and set up the worktrees, as in the checks above.
  2. Write pre-flight-WP-145-<date>.md and commit it. It holds:
    • the dependency check: WP-085, WP-096, WP-137, WP-138 and WP-139 are ✅;
    • the state of all three repos and the TV, with the backups’ hashes;
    • the release-check baseline;
    • the scope lock;
    • the engineering calls above, and D2 with Jeff’s answer;
    • the risks;
    • the verdict.
  3. Add the manifest fields. Change tv-package-manifest.md, the two Gen 1 file lists and New-GamePackage.ps1. Then add Publish-BetaGame.ps1’s metadata-only path (private). Then republish: BASS by hand, then Showdown and Phantom through the tool. Fetch the manifest with Jeff’s key and show the three entries carry engineid/gameid. Quote the fetch with <key>.
  4. Java:
    • the launch-time fetch hook and its stub;
    • available.json (no URLs; a 404 deletes it; a network failure keeps it);
    • the one-package install screen;
    • numeric Progress.
  5. C++: the tile kind, updateListing, the Get/Update band, the tray’s Update, and the tickle check on available.json’s modified time.
  6. JNI: installPackage(id) across ScummVM.java, MyScummVM, _MID_ and FIND_METHOD, the JNI:: wrapper and jni-android.h.
  7. Build: the debug and release APKs in WSL, plus the Windows target. Install the debug APK with install -r.
  8. Run exit criteria 1–10 on the TCL, in WP-145’s order. Run criterion 6 (revoke) last but one, and restore the tester before criterion 7.
  9. Commit the fork change as ANDROID: … or GUI: … subjects, one per layer: Java, C++ and JNI. Open the fork PR against scooby-engine. Open the private PR. Never merge either; Jeff merges.
  10. Close the WP in the docs:
    • WP-145 §Result: the engineering calls, D2’s answer, each criterion with its evidence, the PR links, and what was published or changed on the host;
    • the exit criteria ticked;
    • the WORK_INDEX row ✅, or 🚧 if a PR or a criterion is open;
    • the pre-flight’s §Lessons learned.

    Open the docs PR.

Close ritual

WP-145 goes ✅ only when all ten exit criteria are met with evidence and Jeff has merged the fork and private PRs. Until then it stays 🚧, and §Result says what’s left.

Report back with the three PR links first. Then say what wasn’t checked, and what is left on the live host: the test BASS version, and the tester’s state.

Restore the TV to the build Jeff wants on it, and say which one is installed. Remove the fork and private worktrees only after Jeff’s merges (state MERGED).