Pre-Flight — WP-078 — 2026-11-19

Filled-in copy of docs/reference/pre-flight for WP-078. Verdict at the bottom.

Nothing on main, in the fork or in an open PR touches ROOM_P29_Princess_Bedroom or ROOM_P21_Mermaids_Cavern (checked 2026-11-19: no WP-078 packet, no wp-078 branch local or on origin before the claim; the fork’s scooby-engine is at 43f1989815 with WP-077 / PR #3 merged).


Pre-flight intent

Validating readiness for WP-078. Not implementing, not editing engine code, not annotating Ghidra. Verdict only.

Dependency check

The second sub-bullet of the Phantom audit’s group 8, Upstairs pairs the Princess’s bedroom (which yields OBJ_INV_SPELL_BOOK, the spell book the wizard’s library consumes) with the Mermaid’s cavern (a single event override). Neither depends on a sibling Upstairs room’s code: the library that consumes the spell book (WP-077) is already merged, but the bedroom yields the book regardless of the library.

Prereq Status in WORK_INDEX Locked on Notes
WP-018 ✅ Done 2026-11-14 Hotspots and exits: the bedroom’s and cavern’s hotspots.
WP-021 ✅ Done 2026-11-14 Clickables: the bedroom’s hotspot and the placed spell book answer a click.
WP-023 ✅ Done 2026-11-14 The inventory: OBJ_INV_SPELL_BOOK (addItem / hasItem).
WP-057 ✅ Done 2026-11-16 Phantom’s new game and first room — the fixed-flag block these rooms read.

Rule check: every prereq is ✅ Done. Phase ordering holds — this is a Phase 4 (game-logic) room port on top of the resource and front-end lanes already closed.

Repo + disc state

Scope lock

Allowed paths (this repo):

docs/formats/scooby-exe.md                       (the Princess's bedroom and Mermaid's cavern)
docs/work-packets/WP-078-princess-bedroom.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-078-2026-11-19.md

Fork: engines/scooby/**, staged by name. New files for the packet’s room group and its check; a factory line and include in room_class.cpp, the two module.mk entries, and the check’s declaration (scooby.h) and call (chase_check.cpp). No edit to a sibling room expected: WP-077’s library already consumes OBJ_INV_SPELL_BOOK. Both rooms already have their room_setup entry (music + opening) — no room_setup edit. If the trace surfaces a one-line hook into a sibling class, it is staged by name and called out at execution, not silently widened.

Forbidden: game data from the discs (copyright — never commit); engines/scooby/** beyond the files above; ScummVM upstream paths outside engines/scooby/.

Risk review

Risk Likelihood Impact Mitigation
Ghidra’s underscored labels mask the dotted clip names (the WP-074/075 trap). med medium Probe the voice lines by prefix (Sound::hasClipPrefix), keep exact findClip for flat sfx ids. A found 0 on a name that is right is the tell. The bedroom’s clips are Princess_Bedroom.280_ / 280A_ / 280XA_ / Daphne_Takes_Book; the cavern’s opening is Mermaids_Cavern.340_.
The spell-book “take” guard (bedroom event reads a game-struct field and a virtual call before queuing the take). med medium Resolve the compared field and the virtual by decompiling; reproduce the guard faithfully, or state it as always-true in-room and note the simplification. Anchor any game flag on the function that touches it, not list order (the WP-076 trap).
The Mermaid cavern’s event sets a bare character mode (0x11) with no voice line. low low Reproduce the three-character mode set faithfully; the check verifies the class builds, its hotspot name, and the character-mode effect — not a clip that does not exist. Do not invent a line.
Shared misreading (reference and engine encode the same wrong trace). low medium Two sessions trace both classes independently (the WP-073–077 move) and agree before the check is trusted. The second trace is given raw addresses only, not a resolved flag/offset map.
Generation / disc conflation. low medium Every claim is Gen 1 Phantom; Showdown has neither room and the check asserts it prints so.

Verdict

Prepared by: Claude (WP-078 session, drafting + execution in one) Date: 2026-11-19


After execution — lessons learned