EC-017: Hotspot Magnet TerraGlyph provider — run sheet
Paired WP: WP-107 Purpose: Run WP-107 in a fixed order, recording each step’s outcome as it’s done. Status: run 2026-12-01; the character targets added 2026-12-02 (H25). Every step is done. Jeff accepted the covered targets and empty rooms as listed on 2026-12-04 (WP-107 §Result).
Pre-flight
- WP-106 is ✅ in WORK_INDEX. WP-107 is 📝 Drafted on
main, and nobody else holds it. - Write
docs/reference/pre-flight-WP-107-<date>.md. It records the fork pin, the files and the override recount, and settles every point of WP-107’s “For the pre-flight”:- the run state;
- the openings;
- the toolbar;
- the runtime.
- Create a fork worktree with
tools/New-ForkWorktree.ps1, building with--enable-engine=terraglyph. - Before any fork change, run the self-test on both titles at the pin and keep the logs as the baseline.
Step 1 — Geometry (time-box: 2:00)
Room::getHitBox(): the polygon box, or the union of the cels.- The point search and the cache:
- centre first, then 4 px rings;
- the point is on screen and hit-tests to the sprite;
- each cached point is re-checked at every rebuild.
Outcome: Room::getHitBox() gives the polygon box or the cels’ union. The
search tries the centre, then 4 px rings, row by row. It caches each point by
step and re-checks it with one hitTest() at every rebuild. The listing finds
no point that misses its target and none off screen.
Step 2 — The filter and the hooks (time-box: 2:00)
- §4.6’s rules 1–5, with H7’s kinds, the click gate, and toolbar sprites that have a click index.
- The three target hooks on
RoomClass:addNavTargets(),isNavTargetValid()andnavTargetAt(). No other hook is declared. ButtonRoomand Wizard’s Rule implement them.
Outcome: §4.6’s rules 1–5, in buildMagnetTargets(). Toolbar sprites are
known by their click index (Inventory::getToolbarIndex()), so the hit
blockers and other engine sprites are left out. The three hooks are on
RoomClass, and no other. ButtonRoom, the drawbridge (from the audit) and
Wizard’s Rule implement them.
Step 3 — The click audit (time-box: 3:00)
- Re-grep
bool click(int sprite) overrideat the pin and record the count. It was 32 in 28 headers at55c8b6b32ae3. - Give each override one of WP-107 item 6’s four verdicts. Add the hook for each “hook added”, add a §6.8 row for each cursor-mode room, and raise each “Jeff decides” to Jeff.
- The table goes in WP-107’s §Result as each verdict is made.
Outcome: 32 overrides in 28 headers at 837ca576da, the same headers as
at the draft’s pin. Verdicts: A 8, B 3 (the drawbridge added), C 6, D 15. The
D rows are classes that give a character click a meaning, 11 of them
progress. They were raised to Jeff in WP-107’s §Result, and he decided on
2026-12-02 that all 15 add their characters (H25). The hooks are in fork
#66, so the verdicts are A 8, B 18, C 6. No new §6.8 row is needed. The drawbridge’s row is added, and Sign In’s and Wizard’s Rule’s are
updated.
Step 4 — One target per interaction, and the entry points (time-box: 1:30)
- Merge class targets with room sprites, and toolbar sprites by click index.
- Resolve other collisions in list order by the next grid point. The moved point still hit-tests, stays on screen, and makes no new collision.
listTargets(), thegetHotspotPositions()andhotspotDirty()overrides,targetAt(), and thecurrentdecision of §5.5. The last two go in Appendix B as additions.
Outcome: a class target on a sprite the room lists merges into it. The
toolbar gives one target per click index, the front sprite that has a point.
A collision takes the next ring point that’s free. targetAt() and magnetCurrent() are recorded in Appendix B,
with hotspotDirty()’s pure read.
Step 5 — The checks (time-box: 3:30)
- The listing hook (§12.7) for every room of both titles, after the opening. It covers every failure condition and list of WP-107 item 9, plus the overrides’ asserts.
- The
currentdecision’s cases (WP-107 item 10). - The per-room check (§5.8):
- the states: as started, and with the toolbar open where it can open;
- the press graph and strong connectivity;
- the fallback rooms named;
- the two orders, by identity;
- the no-selection grid with edges;
- the pass and failure reports.
- Check the listing for the menu rooms’ buttons and Wizard’s Rule’s six bottles.
- Each unpointed sprite and each empty list gets its reason. Ask Jeff to decide each.
- Run on both titles. Fix the provider for each failure the rules explain; raise any they don’t to Jeff.
Outcome: checkMagnetRooms(), on both titles:
- 122 rooms and 173 states, with 0 failures;
- 147 listed states pass reachability, and none needs the fallback;
- 5,090
currentcases pass, and so do thehotspotDirty()cases; - with the character targets (#66), the check also holds each item a
class target answers and enters seven rooms a second time with their
characters placed: 188 states, 162 listed, 5,505
currentcases, 0 failures. All 18 character targets are listed, 17 with a point; Brad’s box is behind the armour pile; - the menus list their buttons, and Wizard’s Rule lists six bottles.
15 unpointed targets (covered by a door, the throne or Scooby) and the empty rooms are listed with their reasons (18 unpointed with the character targets). Jeff accepted them as listed (2026-12-04). A cold review’s fixes are in the second commit.
Step 6 — Build, PR, records (time-box: 1:00)
- Build clean. Self-test on both titles: the new checks pass, and every existing result matches the baseline.
- No change in play: no cursor moves, nothing new draws, and no input path changes.
- The fork PR against
scooby-engine, with the style check if it’s on main. Merged by hand after CI passes, and the merge commit recorded. - Plan:
- §11 packet 5 ✅;
- §5.8’s fallback rooms;
- §6.8’s new rows;
- Appendix B’s additions;
- a revision-history row.
- WP-107 §Result (with the audit and the room results), WORK_INDEX ✅,
and the
tv-dpadnote. The strict wiki build passes.
Outcome: clean build with no new warnings. Every existing check line
matches the baseline, except lines that vary between any two runs. Nothing
outside the check calls the provider. Fork #62 merged as dcf2630b21. The
style check isn’t on main (PR #209). Records updated; the strict wiki build
passes. Fork #66 (the character targets) merged as 37b75bf77e, checked
against a baseline at its pin, c1f2825762, the same way.
Definition of done
Every step’s outcome is recorded, every WP-107 exit criterion is met with its evidence, and the fork PR is merged.
Out-of-scope captures
MazeMapRoom::click()(maze_rooms.cpp:407-409) readsgetObjectName(sprite)before checkingsprite < 0, so a click on empty space in the maze map indexes sprite −1. Found by reading, not run; its own fix.