Session Prompt — WP-085 execution (Google TV app pipeline)
Execution session. Paste this as the first message to a fresh session. Keep it leashed: no spawned sessions. Every device claim comes from a capture made in this session (the 2026-11-21 fabrication incident in DECISIONS is why).
Header
- WP: WP-085, Google TV app pipeline. Companion EC-008.
- Prompt written: 2026-11-26. Session date: fill in when run.
- Paired pre-flight: pre-flight-WP-085-2026-11-26,
verdict READY, signed against public
mainb221f4f286f0and forkff490ad9449f. - Targets generation(s): N-A for engine code. TerraGlyph is compiled in and smoke-tested with Gen 1 (Showdown).
- Targets disc(s): Beneath a Steel Sky freeware CD; Showdown (smoke test only).
- Repos: the fork, worktree
C:\claude-worktrees\scummvm-wp-085-tv-app-pipeline(branchwp-085-tv-app-pipeline, already created; this is the claim); public docsbarefootbetters/terraglyph-engine; privatebarefootbetters/scooby-engine-private. All shared checkouts: do docs work in worktrees underC:\claude-worktrees\, and stage explicit paths only.
Intent
Deliver WP-085’s four milestones on the fork branch, one commit each, each verified on the TCL 65Q77K (EC-008 Steps 1–4) before the next starts. Then document the manifest format, write §Result, and open the fork PR.
Out of scope: any Google Play upload, listing or release build signing for Play (WP-084); billing; a new library UI; the D-pad-only pointer; changing D0–D4; upstreaming; any fork path outside the scope lock.
Authority chain (read order)
C:\Users\jjensen\.claude\CLAUDE.md- wp-lifecycle §Phase 3 and §Phase 4
- The paired pre-flight, especially §Engineering calls, §Scope lock and §Risk review
- WP-085, every section
- EC-008
- Smart-TV guide: build steps 4–5,
adbover the network, install, add game data, the TV smoke test, Controls on a TV - Private:
private/commercial-strategy.md§”App name and package id candidates for WP-085” for the injected values. Never copy either into a public file, the fork, a commit message or PR text.
Pre-execution checks
- Public
mainincludesb221f4fand the paired pre-flight. If WP-085, EC-008 or the smart-TV guide changed since, stop: the READY may be stale. - The fork worktree exists on
wp-085-tv-app-pipeline, clean, HEAD at or afterff490ad9449f. Iforigin/scooby-enginemoved, re-check the pre-flight’s Android-port line citations before relying on them. - Toolchain unchanged (WSL Ubuntu,
/opt/android-sdk):platforms/android-37.0, NDK23.2.8568313, armeabi-v7aliboboe.aSHA-256399a790e…f843dd61. - TV:
adb devices -llists the TCL;getprop ro.product.cpu.abilist=armeabi-v7a,armeabi. Buildandroid-arm-v7aonly. - Peripherals (carried from the pre-flight): Jeff confirms the Bluetooth
keyboard, mouse and gamepad are paired, and
adb shell dumpsys inputshows each one connected (capture it). Stop if any is missing. - Test data:
Get-FileHash P:\games\BeneathASteelSky\bass-cd-1.2.zip=53209b9400eab6fd7fa71518b2f357c8de75cfeaa5ba57024575ab79cc974593;P:\scooby-engine\Showdown.isopresent. - The identity values:
/root/.gradle/gradle.propertiesin WSL setstvAppId,tvAppLabelandtvAppResDirfrom the private record (create it fromprivate/tv-app-identity/if it’s absent). Placeholder art is fine for test builds (Q3).
If a check fails, stop and report.
Execution rules
Scope allowlist (from the pre-flight §Scope lock):
Fork: dists/android/**
backends/platform/android/**
configure, ports.mk (only if the build needs it; say why)
Public: docs/reference/tv-package-manifest.md
docs/work-packets/WP-085-tv-app-pipeline.md
docs/execution-checklists/EC-008-tv-app-pipeline.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-085-2026-11-26.md (§Lessons learned only)
Private: private/tv-app-identity/**
private/commercial-strategy.md (only to link the identity record)
Local only, never staged: /root/.gradle/gradle.properties, the identity
res dir, build outputs, captures that show the TV’s serial or LAN address,
P:\games\**, P:\scooby-engine\**.
Forbidden: engines/terraglyph/** and every other fork path; the product
name or package id anywhere public; game data, signing keys or credentials in
any repo; creating barefootbetters/tv-test-packages without Jeff’s go;
changing D0–D4.
You MUST:
- Inject the identity (Q1).
applicationId findProperty('tvAppId') ?: "org.scummvm.scummvm"; label, icon and banner viamanifestPlaceholders, with today’s values as defaults;tvAppResDiris added tores.srcDirsonly when it’s set.namespacestaysorg.scummvm.scummvm. A build without the properties must still produce plain ScummVM. - Keep the advanced mode out of the release build (D4) with build-type
source sets: the real classes in
backends/platform/android/advanced/(debug only), a same-named stub inadvanced-stub/(release). EC-008 Step 3 capturesapkanalyzer dex packages --defined-onlyon the release APK (noorg.scummvm.scummvm.advanced) and astringsgrep of its dex for the manifest-URL sentinel (count 0). - Do the download, verify and extract in Java. Download to
getFilesDir()/packages/.staging/, refuse on SHA-256 mismatch, extract togetFilesDir()/packages/<id>/<version>/, then add through ScummVM’s own--add --path=<dir> --recursive --no-exit, restarting the ScummVM thread asonNewIntentdoes. On update, unpack beside the old version and switch the game’spathonly after verification. - Allow only data. Refuse zip entries ending
.so,.dex,.jaror.apk, files with ELF or dex magic, and any entry whose canonical path escapes the package dir (zip-slip). Load nothing from a package. - Make the downloader host-independent: any HTTPS URL from the manifest, no hard-coded host (D3).
- Check each commit: run
git diff --cached --name-onlyagainst the allowlist, and grep the staged diff for the private name and id, before every commit in every repo. - Capture every EC-008 box: a logcat excerpt, command output or screenshot. Jeff’s live confirmations are quoted as his, never paraphrased into a capture.
- Fix before moving on: a failed milestone check is fixed on the branch before the next milestone starts.
- Run the ewiki gates for the public docs with the private worktree
junctioned as
_private, checking every link and anchor you add. Remove the junction with(Get-Item _private).Delete(), never a recursive delete.
Top risks (from the pre-flight), as instructions:
- Name or id leak: grep before every commit; review PR text before opening.
- Executable download: the extractor refusals above; §Result’s code-review note
greps the fork diff for
DexClassLoader,PathClassLoader,InMemoryDexClassLoader,System.load,Runtime.execandPackageInstaller(expected none). - Missing file picker on the TCL: record it as a gap; one import route must work without a computer.
- Milestone 4’s update test is debug over debug: bump
versionCodebetween the two builds.
Session task
Outputs this session MUST produce:
- Milestone 1 (one fork commit): the app shell with its injected identity,
skyandterraglyphengines, ScummVM’s launcher in grid view; EC-008 Step 1 captured. - Milestone 2 (one fork commit, if code is needed): import routes tested on
the TCL (file picker incl. USB, cloud dialog,
adb push); BASS launches, saves, restores after reopening; EC-008 Step 2 captured. - Milestone 3 (one fork commit): the hidden advanced mode (debug build
only): manifest over HTTPS, list, download, verify, install, detect, launch,
remove (saves kept), diagnostics; the wrong-hash and zip-slip refusals;
host independence. Ask Jeff before creating
barefootbetters/tv-test-packagesand its BASS release (Q2). EC-008 Step 3 captured, including the D4 release-APK checks. - Milestone 4 (one fork commit): app update keeps games, library and saves; a game-data update installs after verification; an interrupted update leaves the old version playable; Showdown via a non-public route launches and saves. EC-008 Step 4 captured.
docs/reference/tv-package-manifest.md: the manifest format (fields: id, version, size, SHA-256, HTTPS URL; data-only rule; no host in the app).- WP-085 §Result with evidence and the code-review note; EC-008 filled in; WORK_INDEX row updated; the private identity record.
- The fork PR (
wp-085-tv-app-pipeline→scooby-engine) with the four milestone commits, plus public and private docs PRs, gates green.
Outputs this session MUST NOT produce (sprawl guard):
- A TV-styled library, a D-pad fine-pointer mode, Play listing work, billing. Log each as a one-line follow-up in EC-008 §Out-of-scope captures.
- The Cloudflare Access host for licensed data (D3 waits for licensed data).
Close ritual
- Every allowlisted file has its change or a recorded reason for none; the staged-diff checks pass in all three repos.
- WP-085 exit criteria 2–7 met with captures, or the WP stays 🚧 with what’s open in §Result.
- Fill in the pre-flight’s §Lessons learned (or write “No lessons learned”).
- Open the PRs. Merge order: public docs, then private (if its page links new public anchors), then the fork PR on Jeff’s review.
- Report to Jeff: per-milestone results, the gaps recorded, the D4 release-APK evidence, the PR links. Ask before merging.