Pre-Flight — WP-087 — 2026-11-30
Filled-in copy of docs/reference/pre-flight for WP-087 (Phantom closeout). Modelled on WP-079’s, the Showdown closeout WP-087 copies. Verdict at the bottom.
Jeff asked for this pre-flight on 2026-11-30, as the next milestone after the run of Phantom “played” packets. Claim check, 2026-11-30: no
pre-flight-WP-087-*onmain; no branch naming087orphantom-closeoutin either repository; no open PR inbarefootbetters/terraglyph-engineorbarefootbetters/scummvmnames WP-087 or EC-010 (open docs PRs: #325, #324, #279, #211, #209; open fork PRs: #33, #12; none of them touch it). This is the first pre-flight for WP-087.State on which this gate was run: docs
main@9cc89c4(the WP-129 merge record); forkbarefootbetters/scummvmscooby-engine@e1dd7bea63(the WP-129 merge, PR #54). Read throughgh api; nothing was built or run, andC:\dev\scummvmwas not touched.
Header
- WP:
WP-087 - Title: Phantom closeout — full playthrough and release readiness (Gen 1)
- Pre-flight date:
2026-11-30 - Targets generation(s): Gen 1 (Phantom of the Knight) only
- Targets disc(s): Phantom (and Showdown, for gate 3’s negative case)
Pre-flight intent
Validating readiness for
WP-087. Not implementing, not editing engine code, not changing the detection flag, not running the playthrough. Verdict only.
Like WP-079, this is a verification WP. It builds and runs engines/terraglyph/** and walks the gates, but edits no fork code, with one exception: on a GO, Part C changes phantomknight’s flag in its own fork PR. Every defect the run finds spins out to its own WP.
Dependency check
Read from WORK_INDEX and the packets themselves on main @ 9cc89c4, not from WP-087’s 2026-11-26 text.
WP-087’s declared prerequisites:
| Prereq | Status in WORK_INDEX |
Notes |
|---|---|---|
| WP-014 … WP-056 | ✅ Done | The Gen 1 chain and every Showdown class, ten of them shared with Phantom. |
| WP-057 … WP-083 | ✅ Done | Every Phantom class in the audit, the last (WP-083, the Wizard’s Rule Room) on 2026-11-22. |
| WP-079 | ✅ Done | Showdown’s closeout, the model. |
| WP-080 | ✅ Done | The suspect-board back-exit fix, shared. |
What landed after WP-087 was drafted (2026-11-26). Two kinds of Phantom packet, all ✅ and merged in the fork by 2026-11-30:
- The original’s games and rooms, ported from the decompile and checked through the engine’s tick, after Jeff asked for packets whose notes left the feel to live play to be searched (WP-094 §Background): WP-090 (the KST serving game), WP-092 (the well’s Jester), WP-093 (the fountain piranha), WP-094 (the Wizard’s Rule Room game, which also ports WP-083’s movie-
0xBexit variant), WP-095 (the wizard’s skull), WP-097 (the hedge maze ride), WP-098 (the arena pile check’s flake). - The rooms “played”, each through the engine’s mouse and tick or, from WP-116 on, its own event path (
handleEvent()), against the decompile: WP-099–103, WP-108–112, WP-114–117, WP-119–122, WP-124, WP-125, WP-127–129.
Shared engine packets that also changed the tree Phantom runs on: WP-105 (the clang warnings), WP-113 (the TV remote’s D-pad and OK in a game), WP-116 (handleEvent(), RoomClass::setsCursor()), WP-118 (D-pad focus in the launcher and menus), WP-123 (pointer speed per game), and WP-126 (a player’s save rewritten while it loads; §Risk review).
Is the chain complete? For room classes, yes, as WP-087 already said. For the played checks, one is left by the packets’ own count. WP-117 calls itself the first “of the 11 checks that click through a class or script function”, and WP-129 (merged 2026-11-30) the tenth. No document on main names the eleventh, and no packet, branch or PR exists for it. On the fork tip, two Phantom checks still drive a click directly, not through the event path (my reading of the check files; the eleventh’s identity is an inference):
wizards_check.cpp:174: the skull puzzle’s skulls throughclickClickable()(WP-095’s section);wfr_check.cpp:193: the Wizard’s Rule Room’s bottles through the room class’sclick()(WP-094’s section).
(maze_interior_check.cpp:345 also calls click() on the well’s Jester, but inside a branch the check expects never to run: he isn’t placed before the yellow ball.)
Open or 📝 Phantom packets WP-087 must wait for: none. Every Phantom row in the index is ✅. The open and drafted rows (WP-011, WP-084, WP-085, WP-104, WP-106, WP-107, and the WP-130/131 debug-panel draft in docs PR #324) are TV, Hotspot Magnet, tooling or Case File work. WP-087 doesn’t depend on any of them.
Rule check: every declared prerequisite is ✅. The eleventh check is not a declared dependency, and its absence doesn’t block a run; whether to wait for it is a sequencing call for Jeff (§Verdict). Pass.
Repo + disc state
- Docs repo. This pre-flight is written in worktree
C:\claude-worktrees\scooby-engine\wp-079-showdown-closeout-1980a7on branchclaude/wp-087-preflight-1ca281, cut fromorigin/main@9cc89c4, clean at start. - Fork tip.
scooby-engine@e1dd7bea635cc58a26198080f30c647cafa44b07. The pinc553503d9d(WP-010) is its merge base with the tip (GitHub compare:ahead, 991 commits ahead, 0 behind). The engine directory holds 158 files, 27 of them*_check.cpp. phantomknightdetection entry (engines/terraglyph/detection_tables.h:71–78at the tip):AD_ENTRY3s("Scooby.exe", "c36473c3…aee8", 483377, "TGIFILE.ART", "a0c28dd3…d919", 114386944, "object.ini", "aafe695a…1c6c", 28788), flagADGF_UNSTABLE. Both Showdown entries (English, and the Norwegian one added since WP-079) areADGF_TESTING. Gate 10 is expected ✗ until Part C.-
The Phantom disc, checked against the locks.
C:\pcloud\scooby-engine\Scooby Doo Phantom of the Knight.iso(621,656,064 bytes) was mounted read-only for this check (driveE:,phantom.cdpresent), hashed and dismounted. All three files matchdetection_tables.hand tools/exes/README:File Size MD5 (first 5000 bytes) SHA-256 Scooby.exe483,377 c36473c3204c10d75eebf0241e35aee8619EA6871A2FD305CA30814C438F9552DB85FDADB65AD7BE5B82A1656AF807EDTGIFILE.ART114,386,944 a0c28dd3e75241794cb19481496bd919AC24E9AE88CD7D15B1137ADBAA331FD987D8CE54B94A5A808042665BA012BF04object.ini28,788 aafe695ae3f6c2db91858661e28e1c6c67B9EF7967B1EDEB7331D3D41F9EFABC326F4740A6C8D7A8781965CFE9D67870This is a pre-flight check of the image, not EC-010’s run-time record; the run mounts it again and confirms it there. The Showdown image (636,268,544 bytes) is present for gate 3’s negative case.
- No disc is mounted now. The run mounts Phantom (and Showdown for gate 3) itself; the drive letter is whatever Windows gives, so EC-010 records it rather than assuming
G:. - Build and run location: a fork worktree, not
C:\dev\scummvm. WP-087’s Dependencies named the base checkout. That checkout is shared and other sessions switch it, which is whytools/New-ForkWorktree.ps1exists. The run usestools/New-ForkWorktree.ps1 -Branch wp-087-phantom-closeout. The branch is the claim, and on a GO the flag commit lands on it for the fork PR. WP-087 and EC-010 are corrected to say so. - Clean build against the pin. Not done here, by design, as at WP-079: it is gate 1 and EC-010’s first execution step.
Coverage: what the played packets show, and what only a live run can
Every beat in EC-010 Step 1 now has a self-test behind it except the ending and two pass-through rooms. All of this is self-test evidence (the headless check against the decompile or an independent reference), plus the per-room live — session spot checks some packets recorded. None of it is a start-to-credits run.
| EC-010 beat | Ported | Played / re-checked | Self-test shows |
|---|---|---|---|
| 1 Drawbridge → Town | WP-057 | WP-117 | the flags through handleEvent(); the bridge and the way out |
| 2 Souvenir shop | WP-058 | WP-115 | the tokens, the bottle, the cursor through a scene’s hold |
| 3 Gardener’s house, garden, plaque | WP-060 | WP-112 | the crest order and the way to the garden |
| 4 Room of doors + Jester | WP-061 | WP-119 | the door, the Jester’s balls, talk and clue |
| 5 Throne room | WP-062 | WP-120 | Jane, the duster, the ruby from the toolbar |
| 6 Dining room + Maria | WP-063, WP-064 | WP-121, WP-122 | the trays, MariaPuzzle, her clue and burger |
| 7 Kitchen + Ewan | WP-065, WP-066 | WP-124, WP-125 | the quiz to EwanPuzzle; the grease into the bottle |
| 8 Kitchen storage | WP-067 | WP-114 | the screwdriver, the shield, movies 62–64 |
| 9 King’s armory + slide | WP-068 | WP-111 | the duster; the full bottle into the slide |
| 10 Arenas + Brad | WP-069, WP-070 | WP-098, WP-128, WP-129 | the grindstone and pile; Brad’s pieces on the press |
| 11 Passages, storage, treasury | WP-071 | WP-127 | the wall of fire, the rope, the Princess’s final clue and movie 55 |
| 12 Gallery + mirror room | WP-072 | WP-110 | the mirror, the red ball, the snack gate |
| 13 Knights of the Snack Table | WP-073 | WP-090, WP-116 | the serving game to the quota |
| 14 Hedge maze + map | WP-074 | WP-097 | the original’s ride; the map’s markers |
| 15 Maze centre, fountain, well | WP-075 | WP-092, WP-093, WP-103, WP-108, WP-109 | the fountain and piranha, the well and Jester, the yellow ball |
| 16 Below the balcony | WP-076 | WP-099 | the shears, the vines, the blue ball |
| 17 Wizard’s skull + library | WP-077 | WP-095, WP-102 | the combination (movie 61) and the skulls through the tick; the library through the mouse |
| 18 Princess’s bedroom + cavern | WP-078 | WP-100 | the spell book; the cavern’s lines |
| 19 Wizard’s bedroom + veranda | WP-081 | WP-101 | the wizard, the scroll, his clue arming the accusation |
| 20 Wizard’s Rule Room | WP-083 | WP-094 | the original’s game on the song’s clock; the movie-0xB exit |
| 21 Ghost spot(s) | WP-056 | — | the pan and the town it lands in, traced on Phantom, never played |
| 22 Castle balcony | base class | — | nothing of its own to check |
| 23–25 Accusation, Big Head, credits | WP-031, WP-030 (shared) | — | traced on Showdown only; on Phantom, only the hand-off into movie 55 (WP-127) and the arming (WP-101) |
What only the live run can show (WP-087 Background items 1–2 still hold):
- The hand-offs in the game’s own order. Each check sets up its own room from a seeded state. No check carries one player’s inventory, clues and flags from the drawbridge to the credits.
- The ending on Phantom’s values. The suspect chooser, the accusation, Big Head’s reveal of this game’s suspect and the credits run shared classes traced on Showdown. No Phantom packet has played them.
- The real mouse. The checks feed
handleEvent()or set the mouse fields themselves; none goes through the backend’s own input. This matters most for the skull and the Wizard’s Rule Room bottles (above), still clicked directly in their checks. - What the eye and ear judge: a missing or wrong cel, a scene out of sync, music that doesn’t change, a cursor that doesn’t come back. The checks compare logs, not the screen.
- The ghost spot and the castle balcony in passing, and Scrappy’s hints and the snack box in Phantom’s rooms.
- Save and load across a relaunch on Phantom (next section).
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
The save written after a load (WP-126). WP-126 stopped a room shown during a load from rewriting the save the load has open (_loadingSave, profile.cpp:371–373; the skip at terraglyph.cpp:1631). It closed with criteria 2 (second half) and 4 not run: nobody has seen a later room’s save write after a load, or a new player’s first room write, since the change. By source, the flag is set and cleared around the one Engine::loadGameState() call, so the next game room should write as before. That is a reading, not a run. All of WP-126’s runs were on Showdown; none were on Phantom. |
low | high | If the write didn’t come back, a player would load, play on, and lose everything since the load without a message. EC-010 Step 2 now checks it: after the load, enter a new game room and see player <name> saved in slot <n> in the log and the slot file’s time change, then quit and load again to see the newer state. This is the check WP-126 left for “Jeff’s next play”; the run makes it on Phantom. |
The fork tip moves during the run. Played packets land several a day, and the eleventh is still to come. A run on e1dd7bea63 and a GO flag PR on a later tip would no longer be the same tree. |
med | med | Gate 1 records the commit the run builds. The GO flag PR is cut from that commit’s branch (wp-087-phantom-closeout). If the tip has moved by then, the merge is a fast-forward of unrelated packets, and gates 1–9 are re-run on the merged tip before gate 10. Jeff may instead wait for the eleventh check (§Verdict). |
Gate 8 taken on stale ground. WP-087 lets gate 8 take WP-082’s style assessment “unless the engine’s files have changed since”. They have: WP-090 onward rewrote rooms, added check sections, handleEvent() and the WP-126 guard. |
high | low | Gate 8 is re-assessed in the run, not quoted. WP-087 and EC-010 are corrected to say so. |
| Disc conflation. Both Gen 1 images get mounted for gate 3. | med | high | EC-010 records the drive and Scooby.exe’s SHA-256 before play, and gate 3’s --detect confirms terraglyph:phantomknight on the path the run uses. |
| Playthrough sprawl. A stuck exit invites a fix. | high | med | EC-010’s rule holds: one-line gap, keep playing; only a hard blocker stops the run. |
| A fabricated or second-hand live claim. WP-079’s first §Result reported a run that never happened (DECISIONS 2026-11-21). | low | high | Every row carries an evidence label. A session records Jeff’s observations as his, in his words, and claims no run it didn’t drive or watch. This pre-flight claims none. |
| Copyright leak. A capture or save staged by accident. | low | high | Captures outside this repo; git diff --cached --name-only against the scope lock before each commit. |
Scope lock
This repo, for the execution (docs only):
docs/work-packets/WP-087-phantom-closeout.md (§Result: verdict, gap list, exit criteria)
docs/execution-checklists/EC-010-phantom-playthrough.md (the filled-in run sheet and gate table)
docs/reference/scummvm-wiki-scooby.md (GO only: Phantom's row, limitations, ADGF lines)
docs/work-packets/WORK_INDEX.md (WP-087's row)
dashboard.json (the phantom-port area, at close)
The fork, GO only: engines/terraglyph/detection_tables.h, the one flag on the phantomknight entry, on branch wp-087-phantom-closeout.
Forbidden: any other fork change (a defect is its own WP); anything from the disc; docs/formats/**.
This pre-flight’s own PR touches this file, WP-087, EC-010 and WP-087’s WORK_INDEX row.
What Jeff does himself
- Decide when the run happens: now, on the fork as it stands (
e1dd7bea63or later), or after the eleventh played check lands. - Be at the engine window for Part A, or watch a session drive it under computer use. From a freshly mounted, unmodified Phantom disc: Sign In as a new player, then play to the end credits through EC-010’s 25 beats. A session can drive the build, the gates and the logs; whether a beat looked and sounded right is his to say, and it is recorded as live — Jeff.
- Save and load (EC-010 Step 2):
- save before a room change;
- quit the engine and relaunch it;
- load, and say whether the room, inventory and progress came back;
- enter one new game room, and quit and load again. This is the later room’s write that WP-126 left open.
- The ending: confirm that the final clue opens the accusation, Big Head reveals the right suspect for this game, and the credits roll to their end.
- On a GO: merge the fork flag PR and the docs PR. Shipping Phantom in a packaged edition stays his separate call (WP-087 §Notes).
Verdict
- READY TO EXECUTE
- NOT READY
Rationale. Every declared prerequisite is ✅, and no open or 📝 Phantom packet stands in front of WP-087. The fork tip e1dd7bea63 has the pin c553503d9d as its merge base, and phantomknight is present and ADGF_UNSTABLE as WP-087 expects. The Phantom image matches all three detection MD5s and SHA-256 locks. Since the draft, the played packets have put a self-test behind every beat but the ending, the ghost spot and the castle balcony. That narrows what the live run has to find; it doesn’t replace the run. The stale parts of WP-087 and EC-010 are corrected in this PR:
- the dependencies;
- WP-083’s deferral, resolved by WP-094;
- gate 8;
- the build location;
- the ghost spot’s destination;
- the post-load save write.
Two things are left to the run, by design. The clean build is gate 1. The later room’s save write after a load is checked in EC-010 Step 2, which needs the live session.
One sequencing call for Jeff. The packets’ own count says one played check is still to come, likely the skull’s or the bottles’ direct click. It isn’t a dependency, and nothing in it blocks a run. But if it changes engine code, the closeout will have run on an older tree than the one the flag ships on, and gates 1–9 get re-run. Waiting for it costs one more packet (WP-129 was estimated at two hours); running now costs a re-walk of the mechanical gates if the tip moves.
A READY authorizes opening the WP-087 execution session (EC-010). It does not authorize the flag change, which waits for a GO, or any other fork edit.
Prepared by: Claude (WP-087 pre-flight session) Date: 2026-11-30
Update, 2026-12-01: the sequencing call answered, the tip moved
The record above is left as it was run. This adds what changed before execution opened.
- Jeff’s call (2026-12-01): the bottles first, then the closeout.
- The eleventh played check landed:
WP-133, fork PR
#60, merged as
1b5db3fc40.- The bottles needed no change.
- Its live run found that a phrase’s first beat danced the last phrase’s
dance, so the wizard vanished on the song’s first beat. That’s fixed in
wfr_rooms.cpp. - The wizard’s skull (
wizards_check.cpp:174) still clicks its class directly. WP-133 counted the bottles as the eleventh and left the skull out of scope.
- The fork tip moved from
e1dd7bea63to1b5db3fc40. These PRs merged in between: - Rechecked on
1b5db3fc40throughgh api:- the pin
c553503d9dis still the merge base (1007 commits ahead, 0 behind); phantomknightis stillADGF_UNSTABLE.
- the pin
-
Docs
mainis now6124c49, the WP-133 merge. - For the live run’s eye: #58 and #59 change which sprite draws in front in several Phantom rooms (the gallery, the KST, the maze and its interior, the WFR, and the wizard’s rooms). The self-tests compare logs, not the screen, so the run is the first check of the new order by eye. Jeff says whether anything is drawn in front of what it shouldn’t be.
The verdict stands: READY. Gate 1 builds 1b5db3fc40 or later and records
the commit. The tree no longer waits on a played check.
After execution — lessons learned
(to be filled in at WP-087 close)