Pre-Flight — WP-106 — 2026-12-01
Filled-in copy of docs/reference/pre-flight for WP-106. Verdict at the bottom.
Pre-flighted and executed in one session, at Jeff’s “Yes, run it” (2026-12-01). EC-016 records each step’s outcome.
Header
- WP:
WP-106 - Title: Hotspot Magnet navigation core:
navigate()and its self-test - Pre-flight date:
2026-12-01 - Targets generation(s): none for the core. The self-test runs inside a Gen 1 game run but reads no room.
- Targets disc(s): Showdown and Phantom, for the self-test runs only
Pre-flight intent
Validating readiness for
WP-106. Verdict only; the execution follows in the same session.
Dependency check
| Prereq | Status in WORK_INDEX |
Notes |
|---|---|---|
| WP-091 | ✅ Done (2026-11-28) | §5’s rules, §5.8’s guarantee, and Appendix C’s examples, which are this packet’s specification |
| WP-089 | ✅ Done (2026-11-27) | The core’s contract (§4.3) and its declarations (Appendix B) |
| H1–H24 | Decided (2026-11-26 to 28) | H17–H24 recorded in PR #264. The core uses H17, H18, H19, H20, H21 (repeat as a press), H22 (distinct points as a precondition), H23 and H24 |
Repo + disc state
- Nobody else holds WP-106. No open or closed PR in the docs repo or
the fork (
-R barefootbetters/scummvm) names it other than the merged draft (#271), and no branch or worktree in either does. - The docs branch is the claim:
docs/wp-106-hotspot-magnet-core-exec, claim commit pushed, inC:\claude-worktrees\scooby-wp106-execfromorigin/main @ 19dda15. - The fork worktree:
tools/New-ForkWorktree.ps1 -Branch wp-106-hotspot-magnet-core, atC:\claude-worktrees\scummvm-wp-106-hotspot-magnet-core, fromorigin/scooby-engine @ 1cb2dd945a(the pin). The branch is pushed as the fork-side claim.C:\dev\scummvmis untouched. - The build: out of tree in the worktree’s
build-tg, configured from the MSYS2 UCRT64 shell with../configure --disable-all-engines --enable-engine=terraglyph. The script’s hint saysscooby; the fix is in open PR #211. It’s a debug build (-g, no optimization flags), so the timing it measures is a pessimistic bound. The baseline build has two warnings, both outsideengines/terraglyph(gob/dataio.cpp:238,audio/mac/halestorm.cpp:266). -
The discs, mounted read-only:
Showdown: C:\pcloud\scooby-engine\Scooby Doo Showdown in Ghost Town.iso -> L:\scooby SHA-256 698CAEA433A7FCE9E1F2C9C74EFEE2CCC6FDF4E44091F93552B4B20E495652A8 Phantom: C:\pcloud\scooby-engine\Scooby Doo Phantom of the Knight.iso -> M:\scooby SHA-256 E70345A3A5A1E65510BDFFBC40C63322D020C568D0C402051D87AAF7725719ED - The self-test runs from the UCRT64 shell with a config per title
(
enable_unsupported_game_warning=false,engineid=terraglyph, game idsshowdownandphantomknight),--debuglevel=11and--logfile. A run ends once the last check’s lines are in the log and it has stopped growing. The configs and logs are kept local, in the session’s scratchpad. - The baseline: both titles’ self-test logs at the pin, before any change, for the comparison of exit criterion 6.
What the code has today (fork 1cb2dd945a)
- Where the script checks run.
TerraglyphEngine::run()calls them in one block when thescriptchannel is at level 3 (terraglyph.cpp:138-158), the last beingcheckDebugTools(). Each is aTerraglyphEnginemember, declared interraglyph.hwith its file named in a comment, and logs its findings withdebugC(3, kDebugScript, ...). The packets compare those lines with text written before the run, rather than asserting. - The hotspot record.
Graphics::HotspotInfois a point, a name and a type (graphics/hotspot_renderer.h:51-60), unchanged since WP-086. - Random numbers.
Common::RandomSource(name)withsetSeed()gives a fixed sequence (common/random.h). - Nothing else in TerraGlyph navigates between hotspots.
git grepforHotspotMagnetandgetHotspotPositionsinengines/terraglyphfinds nothing.
Drift since the draft’s pin (55c8b6b32ae3)
29 merges. None touches anything this packet builds on. One bears on later Hotspot Magnet packets and is recorded for them:
- WP-113 (fork #38,
e2d74564a9) gave TerraGlyph its own game keymap,terraglyph-default.- It’s ScummVM’s default actions without up, down, left and right.
- Left click is also on
JOY_CENTER, the remote’s OK. - It’s live on the TCL: the D-pad moves the Virtual Mouse in a game, and OK clicks.
So TerraGlyph’s input with Hotspot Assist off is no longer ScummVM’s default keymap (plan E27, §6.4). It’s this keymap, and H16’s
terraglyph-defaultalready exists in a different shape. WP-113’s docs PR (#287) already corrected the plan’s §6.4, which says packet 6 builds on that keymap. Nothing in this packet changes. - The other merges are Phantom’s rooms (WP-108–112, 114–117, 120–129), the TV app’s reskin and package work (WP-104, WP-096), the debug tools and their ImGui panel (WP-130, 131), and the grid thumbnails (WP-132). They bear on packet 5’s audit, which recounts at its own pin.
Scope lock
Fork, staged by name:
engines/terraglyph/hotspot_magnet.h
engines/terraglyph/hotspot_magnet.cpp
engines/terraglyph/magnet_check.cpp
engines/terraglyph/module.mk (the two objects)
engines/terraglyph/terraglyph.h (the check's declaration)
engines/terraglyph/terraglyph.cpp (the check's call)
One commit, with the TERRAGLYPH: prefix.
This repo:
docs/reference/pre-flight-WP-106-2026-12-01.md
docs/work-packets/WP-106-hotspot-magnet-core.md
docs/execution-checklists/EC-016-hotspot-magnet-core.md
docs/work-packets/WORK_INDEX.md
docs/reference/hotspot-magnet-plan.md
dashboard.json
Forbidden: game data; anything outside engines/terraglyph/ in the fork;
docs/formats/**.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| A transcription slip in Appendix C’s 264 expectations | med | high | A script reads the plan’s tables and the C++ tables as text and compares them cell by cell before the build |
| A rule turns out ambiguous in C++ | low | high | Stop and raise it to Jeff as a plan correction; don’t choose in code (WP-106 out of scope) |
The property test is slow in a debug build. A press graph through navigate() is O(16n³) |
med | low | Screen with isGeometricConnected() alone (O(4n²)), and check in full only the layouts found plus 150 others. The run’s time is logged |
| Debug-build timing overstates a press’s cost | high | low | Report it as an upper bound. The 1 ms bar is checked against it, and a release build or the Pi gives the real figure |
| Order dependence, a tie broken by list position | low | high | Ties go by (major, y, x) only; every case is also run with the list reversed |
| Self-test drift from unrelated checks between the baseline and the change | low | med | Both runs use the same pin and binary build tree; the comparison ignores the new magnet lines only |
| ScummVM upstream creep | low | med | The core is new files in engines/terraglyph/; no shared file changes (H23 keeps the tests out of test/module.mk) |
| A copyright leak from logs or extracted data | low | high | Logs and configs stay in the scratchpad; the scope lock is checked with git diff --name-only before each commit |
Verdict
- READY TO EXECUTE. Every section above carries concrete content, and there are no blockers.
Reviewer: Claude (session), at Jeff’s direction Date: 2026-12-01