WP-087: Phantom closeout — full playthrough and release readiness (Gen 1)

Status: 📝 Drafted (2026-11-26) · pre-flight READY (2026-11-30, pre-flight-WP-087-2026-11-30; updated 2026-12-01 at fork 1b5db3fc40, the eleventh played check landed); 🚧 executing since 2026-12-01 (fork branch wp-087-phantom-closeout); run done 2026-12-02 on fork c1f2825762. ✅ Done — GO (Jeff, 2026-12-02); the flag is fork PR barefootbetters/scummvm#67, merged by Jeff on 2026-12-02 (6725e6e288). Numbering: WP-086 is held twice by parallel drafts (the Hotspot Magnet research on docs/wp-086-hotspot-magnet-research, and a Play internal-testing draft in another worktree), and both also use EC-009. This WP takes WP-087 and EC-010 to stay clear of both (wp-lifecycle §Supersession check). Phase: 5 (polish & contribution). It also meets the Phase 3 success criterion for Phantom (01-VISION §Phase 3). Depends on: every Phantom game class ported: the Phantom room-class audit’s rooms, WP-057 ✅ … WP-083 ✅ (the last, the Wizard’s Rule Room, landed 2026-11-22), and with them the Gen 1 chain WP-014 ✅ … WP-056 ✅; WP-079 ✅ (Showdown’s closeout, the model this follows); WP-080 ✅ (the suspect-board fix, shared with Phantom). Landed since the draft and run on by this WP, not prerequisites: the original’s games ported from the decompile (WP-090, WP-092–095, WP-097, WP-098), the rooms played through the engine’s mouse or event path (WP-099–103, WP-108–112, WP-114–117, WP-119–122, WP-124, WP-125, WP-127–129), and WP-126 (a player’s save rewritten while it loads). By the packets’ own count, one of the 11 played checks that click through a class or script function is still to come; it has no packet yet, and it isn’t a prerequisite (pre-flight §Dependency check) Unblocks: Phantom shipping in the fork at ADGF_TESTING, and in any packaged edition that carries it Companion EC: EC-010 (the run sheet) Pre-flight: Required (Yes). This WP claims “Phantom (Gen 1) is release-ready”, exercises engines/terraglyph/** through a full run, and on a GO changes the fork’s detection flag for phantomknight (wp-lifecycle §Phase 1 DoD). Targets generation(s): Gen 1 (Phantom of the Knight) only. Estimated effort: 1–2 days. Most of it is the live run, which needs a person at the engine window.


Goal

Prove Scooby-Doo! Phantom of the Knight is complete and release-ready as a Gen 1 TerraGlyph title in the fork. That means one run from an unmodified disc to the end credits with no missing assets, fatal errors or progression blockers; save and load working; and each merge-blocking acceptance gate checked for Phantom. The output is a go/no-go verdict backed by labelled evidence, and a gap list. On a GO, phantomknight moves from ADGF_UNSTABLE to ADGF_TESTING and the wiki-page draft stops calling it “in development”.

Background

Every class in Phantom’s room factory now has a port. The audit found 52 of its 53 rooms with a class of their own (two classes shared), ten of them already answered by the classes built for Showdown. WP-057 to WP-083 ported the rest, in the audit’s suggested order, finishing with ROOM_P30_WFR. One room, ROOM_P26_Castle_Balcony, has a class that overrides nothing; one, ROOM_Cheat, is a developer room and is not ported.

What stands between “every class ported” and “Phantom is finished” is what stood in front of Showdown at WP-079:

  1. No start-to-credits run. Each Phantom WP checked its own rooms against an independent reference trace and the self-test. The audit’s own limit applies: it checks that a ported room has a class, not that the class overrides every slot the original’s does, and the suggested order “isn’t from a play-through” (audit §Suggested order). A missing slot, a bad hand-off between rooms or a dead end shows up only on a real run.
  2. The ten shared classes were traced on Showdown, not Phantom. The title, menus, Sign In, Options, Credits, the suspect chooser, Big Head and the ghost spot run on Phantom with code traced in Showdown’s binary. Only the ghost spot (WP-056) and the suspect board (WP-080) were compared on Phantom (audit §Not covered). The ending is the riskiest of these: it runs the shared accusation, Big Head and credits on Phantom’s story values.
  3. The release gates and flag. Showdown’s gate walk (WP-079, re-run under WP-082) covered the engine as a whole, but gates 3 (detection) and 10 (the flag) are per title, and phantomknight is still ADGF_UNSTABLE. The wiki-page draft still lists Phantom as “In development — room port in progress”.
  4. One known deferral. WP-083 left out a transition-movie variant: leaving the Wizard’s Rule Room without the wizard’s clue sets movie 0xb, which the engine’s leaving() hook does not expose. The destination and every gameplay contract are the same either way (WP-083 §One deferral). (Resolved 2026-11-27 by WP-094, which ports the variant with the room’s original game. The run checks the exit plays it; the gap-list line says “none — passes” or names what differs.)
  5. The save written after a load. WP-126 (2026-11-30) stopped the room shown during a load from rewriting the save the load has open. It closed without anyone seeing a later room’s write after a load, on either title. Step 2 of the run checks it on Phantom.

Since the draft. The played packets (2026-11-28 to 11-30) put a self-test behind every EC-010 beat except the ghost spot, the castle balcony and the ending, each against the decompile and through the engine’s mouse or event path; several found and fixed gaps on the way. They narrow what the run has to find. They don’t replace it: each check starts its room from a seeded state, none goes through the backend’s own input, and none has played the suspect chooser, Big Head or the credits on Phantom (pre-flight §Coverage).

On evidence. WP-079’s first §Result reported a live run that never happened (DECISIONS 2026-11-21). This WP labels every piece of evidence by its source, and nothing in it is claimed without one (see §Notes).

Scope

In scope

Part A — the playthrough.

  1. Boot Phantom in the fork from an unmodified disc mount, start a new game through Sign In, and play the story to the end credits. Follow the beat spine in EC-010 Step 1, which is the audit’s order: the drawbridge and town → the souvenir shop → the gardener’s house, garden and plaque → the room of doors and its rooms (throne room, dining room and Maria, kitchen and Ewan, kitchen storage, king’s armory) → the arenas and Brad → the passages, treasury, gallery and Knights of the Snack Table → the maze → upstairs and the Wizard’s Rule Room → the final clue, the accusation, Big Head and the credits.
  2. At each beat, record the room, its opening, the puzzle, the item or clue gained and the exit, with an evidence label (EC-010). Log any missing asset, wrong or missing scene, stuck exit, lost item or clue, crash or assertion as a one-line gap, and keep playing.
  3. Confirm the win condition fires on Phantom: the final clue opens the accusation (movie 55, WP-071), the wizard’s clue arms it (WP-081/WP-083), the right suspect is revealed through Big Head, and the credits roll to their end.
  4. Run save and load: save before a room change, quit the engine, relaunch, load, and confirm the room, inventory and progression restore (02-SCUMMVM-INTEGRATION §8). Then enter a new game room and confirm the save is written again (the player <name> saved in slot <n> line and the file’s time), and load once more to see the newer state: the write after a load that WP-126 left unchecked.
  5. Record whether leaving the Wizard’s Rule Room without the clue plays movie 0xb, which WP-094 ported.

Part B — the release gates, for Phantom.

  1. Walk the ten merge-blocking gates (02-SCUMMVM-INTEGRATION §Acceptance gates) against the fork’s current scooby-engine tip and record pass or fail with evidence. Re-run each mechanical check (gates 1, 2, 3, 4, 5, 6, 7, 9); do not quote WP-079 or WP-082. Gate 8 is re-assessed too: the engine’s files have changed a great deal since WP-082 (WP-090 onward), so its assessment no longer stands on its own.
  2. Gate 3 on Phantom: --detect on the mounted disc returns terraglyph:phantomknight, the Showdown disc still returns showdown, and an unrelated folder returns nothing. Record Phantom’s per-variant MD5s from detection_tables.h with the full-file SHA-256 locks from tools/exes/README.

Part C — verdict and, on a GO, release.

  1. Write the go/no-go verdict and the gap list in §Result, each gap tagged with the WP that owns its fix, or “none — passes”.
  2. On a GO only: in the run’s fork worktree (wp-087-phantom-closeout), change phantomknight from ADGF_UNSTABLE to ADGF_TESTING in engines/terraglyph/detection_tables.h, build, re-run gate 10, and open the fork PR. Update the wiki-page draft’s Phantom row, known limitations and MD5 table to match.

Out of scope

Dependencies

Execution plan

Follow EC-010: a fresh build → gate 3 and boot → the run, beat by beat → the save and load cycle → the gate walk → the verdict and gap list → on a GO, the flag PR and the wiki-page update. A run that hits a hard progression blocker stops there: the blocker is the top gap, the WP stays 🚧, and the blocker’s fix WP is the next step.

Exit criteria

  1. A run from a mounted, unmodified Phantom disc reaches the end credits with no missing asset, fatal error, assertion or progression blocker, and EC-010’s beat table is filled in with an evidence label on every row. A row with no evidence stays ☐ and the criterion is not met.
  2. The win condition is shown end to end on Phantom: final clue → accusation → the right suspect through Big Head → credits to the end.
  3. Save before a room change, relaunch, load, and the state restores; the profile read line is captured in a log, or the row says it is a live visual confirmation.
  4. Each of the ten gates is recorded pass or fail with evidence for Phantom, and every mechanical check was re-run in this WP.
  5. Phantom’s per-variant MD5s and SHA-256 locks are recorded in EC-010 and the wiki-page draft.
  6. A written go/no-go verdict and a gap list, each item tagged with the WP that owns its fix (or “none — passes”). The movie 0xb exit (WP-083’s deferral, ported by WP-094) has a line in the gap list either way.
  7. On a GO: phantomknight is ADGF_TESTING in a merged fork PR, and the wiki-page draft’s Phantom entries are updated. On a NO-GO: this criterion is “n/a — NO-GO”, and the WP stays 🚧 until the blockers’ WPs land and the run is redone.

Deliverables

Notes

Result

Verdict: GO (Jeff, 2026-12-02), on fork c1f2825762. No progression blocker. Jeff played an unmodified Phantom disc from Sign In to the end of the credits. Save and load restore the room and progression, including the save written after a load that WP-126 left open. Every mechanical gate passes. Three gaps came out of the run, each with its own WP, and none stops a player from finishing. On Jeff’s GO, the flag (gate 10) is fork PR barefootbetters/scummvm#67: commit 8cb9617318 on the fork tip 37b75bf77e. That tip carries #66 (WP-107), which landed after the live run; on it the build, detection, gate 10 and the self-test were re-run, all clean, but it wasn’t played live. Shipping Phantom in a packaged edition stays Jeff’s call.

Every claim below is labelled in EC-010. Logs are in C:\pcloud\scooby-engine\verification\wp-087-2026-12-01\, outside the repo:

Gap list

# Gap Evidence Blocks? Owner
1 Knights of the Snack Table: the pointer is hidden below row 100, so Shaggy is steered blind live — Jeff; source kst_rooms.cpp:57, :740: the original does the same (0x45EDAC) No: the round was served and the room left (run1.log) WP-140 (Jeff’s call: keep it visible)
2 Wizard’s Rule Room: the bottles don’t take a live player’s clicks live — Jeff; log run1.log 20:32:55–20:34:13, five phrases missed No: losing returns to the bedroom and the wizard’s clue is still given WP-141
3 Mermaid’s Cavern: OBJ_P21_MERMAID_HOTSPOT2’s animation runs but doesn’t show live — Jeff; log run1.log 20:38:03 No: a decoration WP-142
4 The movie 0xb exit (WP-083’s deferral, ported by WP-094) log run1.log: Playing movie (11): 234 frames on leaving the WFR with no clue owned — none — passes
5 Gate 8, style source: clang-format drift 155/165 files, no worse than upstream’s engines; the conventions’ checks are clean No WP-082 (the upstream review)
6 Gate 10, ADGF_UNSTABLE source detection_tables.h:78; ADGF_TESTING at 8cb9617318 It’s the release flag itself this WP: fork PR #67

Not exercised in the live runs. These are coverage notes, not defects:

The self-test logs the same 18 KST and Pie Noon data warnings (kst_rooms.cpp:88, :144, :192) on both commits; they weren’t investigated here.

Exit criteria

# Criterion Status Evidence
1 A run to the end credits, no missing asset, fatal error or progression blocker; the beat table labelled ✅ Met live — Jeff “reached the credits, Big Head showed Ewan.”, “I played the game”; log run1.log 19:51–20:45, the game is over for J. Every row is labelled; beat 21 (ghost spot) stays ☐ with its log label, because no ghost came
2 The win condition end to end: final clue → accusation → Big Head → credits ✅ Met log run1.log: suspects: BRAD accused, wrong; movie 15, big head: Treasury.730A_ … then ROOM_Credits, credits: EWAN's movie 47; live — Jeff, Big Head showed Ewan, the villain drawn for the game. The right-accusation verdict (720) wasn’t seen
3 Save, relaunch, load, the state restores; profile read logged ✅ Met log run3.log–run5.log: profile read: StartRoom ROOM_P04_Town; after a load, profile saved … StartRoom ROOM_P05_Gardeners_House and the slot file’s time moves; the next load reads ROOM_P05_Gardeners_House; live — Jeff at each step
4 The ten gates recorded, each mechanical check re-run here ✅ Met EC-010 Step 3, on 1b5db3fc40 and again on c1f2825762; gate 10 ✗ until the flag
5 MD5s and SHA-256 locks in EC-010 and the wiki-page draft ✅ Met EC-010 Step 3’s per-variant table; scummvm-wiki-scooby.md’s MD5 table, and its pointer to the locks in tools/exes/README
6 A written verdict and gap list, the 0xb exit on it ✅ Met above
7 On a GO, ADGF_TESTING in a merged fork PR and the wiki draft updated ✅ Met GO given by Jeff on 2026-12-02; fork PR barefootbetters/scummvm#67 merged by Jeff on 2026-12-02 (6725e6e288); the wiki draft’s Phantom row, limitations, ADGF lines and detect note updated