EC-016: Hotspot Magnet navigation core — run sheet
Paired WP: WP-106 Purpose: Run WP-106 in a fixed order, recording each step’s outcome as it’s done. Status: done (2026-12-01).
Pre-flight
- WP-106 is 📝 Drafted on
main, and nobody else holds it. Checked 2026-12-01 in the docs repo and the fork: no PR, branch or worktree other than the merged draft. - pre-flight-WP-106-2026-12-01:
the pin
1cb2dd945a, the files, the call site (terraglyph.cpp:138-158) and the risks. Verdict READY. - Fork worktree
C:\claude-worktrees\scummvm-wp-106-hotspot-magnet-core, branchwp-106-hotspot-magnet-core, pushed as the claim. Built out of tree inbuild-tgwith--enable-engine=terraglyph.C:\dev\scummvmwas untouched. - The baseline: both titles’ self-test at the pin, logs kept local.
Step 1 — The core (time-box: 2:00)
HotspotMagnet::Direction,navigate()andisGeometricConnected()as in Appendix B, plusgeometricChoice()and, after the review,readingOrder().- §5.1 steps 1–7 in order.
- §5.5’s no-selection rule.
- §5.8’s check and reading order.
- Integers only. The 0–16383 assert is in development builds only, after the review.
Outcome: written by hand from §5’s text, in hotspot_magnet.{h,cpp}.
Step 2 — The self-test check (time-box: 1:30)
- Appendix C transcribed: 264 expectations, compared with the plan’s tables by a script before the build (0 differences).
- Each run three ways, plus C9’s ten “5.1 alone” cells: 802, logged as 802.
isGeometricConnected()on C1–C14, and on C9 with its stranded target first: 15 checks.- The property test: 20,000 layouts screened, every one compared with an independent search. The 11 fallback layouts and 200 others are checked in full, and the empty list is checked. The seed, the counts and the time are logged.
- The timing at 54 targets, the average and the slowest press.
- Wired in last among the script checks.
Outcome: magnet_check.cpp. The review added four targeted cases (the
tie on major, reading order’s rows), and log lines for the connectivity and
targeted checks.
Step 3 — Build, self-test, PR (time-box: 1:00)
- Build clean, with no new warnings.
randomis a macro in ScummVM’s build, so the generator isrng. - Self-test on both titles: every magnet check passes. Every existing check line matches the baseline, apart from run-to-run randomness.
git grep:navigate()is called only from the check.- Timing on Windows (debug build): about 60 µs a press, the slowest 1 ms. The Pi isn’t set up for this packet; that deviation from §5.7 is recorded, and packet 11 measures it.
- Fork PR #61. The style checker isn’t on main yet (open PR #209), and
the fork has no CI. The gate was the self-test and a cold review. Merged
as
837ca576da.
Outcome: merged.
Step 4 — Records and close (time-box: 0:30)
- Plan: §11 packet 4 ✅, §5.7 measured, Appendix B with the two additions, §14.3, and a revision-history row.
- WP-106 §Result.
- WORK_INDEX row ✅, and the
tv-dpadnote. - The strict wiki build passes.
Outcome: closed.
Definition of done
Every step’s outcome is recorded, every WP-106 exit criterion is met with its evidence, and the fork PR is merged.
Out-of-scope captures
- The first baseline run stopped late. The self-test script waited for the log to go quiet, but the game logs a tick line every second, so it never did. It now stops on the last check’s line. Script local; noted for whoever runs the self-test next.