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-* on main; no branch naming 087 or phantom-closeout in either repository; no open PR in barefootbetters/terraglyph-engine or barefootbetters/scummvm names 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); fork barefootbetters/scummvm scooby-engine @ e1dd7bea63 (the WP-129 merge, PR #54). Read through gh api; nothing was built or run, and C:\dev\scummvm was not touched.


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:

  1. 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-0xB exit variant), WP-095 (the wizard’s skull), WP-097 (the hedge maze ride), WP-098 (the arena pile check’s flake).
  2. 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):

(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

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):

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. The ghost spot and the castle balcony in passing, and Scrappy’s hints and the snack box in Phantom’s rooms.
  6. 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

  1. Decide when the run happens: now, on the fork as it stands (e1dd7bea63 or later), or after the eleventh played check lands.
  2. 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.
  3. 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.
  4. 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.
  5. 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

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:

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.

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)