Pre-Flight — WP-022 — 2026-11-14

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

Written before engine code, on Jeff’s “continue” after PR #57 merged. The session that wrote WP-021 was told that this session is taking movies, so the two don’t overlap.


Pre-flight intent

Validating readiness for WP-022. Verdict only.

Dependency check

Prereq Status in WORK_INDEX Locked on Notes
WP-019 ✅ Done 2026-11-14 Sounds stop before a movie, as in the original.
WP-020 ✅ Done 2026-11-14 The walk-off ends with the movie id and the next room.

Repo + disc state

Doc-vs-tree cross-check

Scope lock

Allowed paths (this repo):

docs/02-SCUMMVM-INTEGRATION.md   (§7 implementation notes)
docs/formats/scooby-exe.md       (movie functions)
docs/work-packets/WP-022-movies.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-022-2026-11-14.md

Fork: engines/scooby/**, staged by name.

Risk review

Risk Likelihood Impact Mitigation
Decoded pixels differ between decoders (YUV-to-RGB rounding). high low Compare mean colour within a tolerance, not exact MD5s. A wrong decode is far off.
The skip keys are untraced. certain low Escape, Space and a click stand in; documented as a stand-in.
Decoding 98 movies to the end is slow. med low It is a level-3 check only, run once per title.

Verdict

Prepared by: Claude (WP-001 session, continuing), on Jeff’s “continue” of 2026-11-14 Date: 2026-11-14


After execution — lessons learned

Lesson: a second decoder makes a reference even where pixels can’t match. ffmpeg decodes Bink independently. Exact frames differ by YUV-to-RGB rounding, but frame counts, lengths and mean colours pin down a correct decode: 98 movies agree, with no colour more than 2 levels apart.

Lesson: test damaged input, even through an upstream decoder. A truncated movie hung Video::BinkDecoder inside a call, where no watchdog in the engine loop could reach it. The fix was a cheap header check before opening, confirmed against all 98 genuine files first.

Lesson: count from the listing, not from memory. The first draft said 43 and 58 movies; the census says 42 and 56. Corrected before commit.

Scope note: the lock held. One fork commit, staged by name. The scratch game folder was deleted, and the ISOs were dismounted. The other session confirmed it wasn’t working on movies before this WP started.