Pre-Flight — WP-130 — 2026-11-30

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

Drafted and executed by one session, after Jeff approved the packet’s decisions and said “Execute WP-130” (2026-11-30). Checked at claim time: no wp-130 branch in either repository, and no PR naming WP-130 but the drafting PR #324 (merged). The claim branches were pushed before anything else.


Dependency check

Prereq Status in WORK_INDEX Notes
WP-116 ✅ Done handleEvent(), the event path the script verbs feed.
WP-026 ✅ Done The profile’s [Game] section and its setters.
WP-031 ✅ Done giveClue() (clues.cpp).

Rule check: every prereq is ✅ Done.

Repo + disc state

What the code has (read at 34d2c0dc80)

The overlay’s cost

Not measured before the code (measured in the run: 145 ms for a full pass, so it samples every second point; see the packet’s Result). A full pass is 307,200 hitTest() calls, each walking the draw list with a cel-cache lookup per sprite under the point. It’s timed in the first run (the check line and the Debug: hits pass line carry the milliseconds). It runs only when the room is drawn with the overlay on, never with it off. If a pass is too slow for 36 ticks a second, it samples every second pixel.

Scope lock

This repo: docs/work-packets/WP-130-debug-tools.md, this file, WORK_INDEX.md.

Fork, engines/terraglyph/: debug_tools.{h,cpp}, debug_tools_check.cpp (new); console.{h,cpp}; room.h (the kind enum public, getKind(), getHitType()); clues.cpp (isSuspect()); terraglyph.{h,cpp} (the operations’ declarations, the script verbs, the overlay in drawRoom(), the check call); module.mk. Staged by name.

Risk review

Risk Likelihood Impact Mitigation
Expectations shaped by the run. med high Expected lines written from the setters’ code before the first run; say which were wrong.
The check changing what later checks see. low high It runs last, after checkAllMovies(), and ends with newGameForCheck(). Compare the rest of the log with the WP-129 run.
The overlay too slow to play with. med low Timed on the first run; fall back to sampling every second pixel.
A setter bypassing the engine’s path. low med Exit criterion 3: a search of console.cpp and runTestScript() for direct setter calls.

Verdict

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