WP-080: Suspect/clue board back-exit soft-lock fix (Gen 1)

Status: ✅ Done (2026-11-21) — soft-lock fixed; self-test green on both titles; live re-verified by Jeff (board exit returns, run reaches credits, save/load restores). Showdown closeout flips to GO. Engine fix barefootbetters/scummvm#5 merged (squash 18f718a). See §Result. Phase: 5 (polish & contribution). The fix for WP-079’s NO-GO blocker; unblocks the Showdown release-readiness verdict. Depends on: WP-079 🚧 (the closeout that found the blocker — the NO-GO verdict and the root-cause lead; its §Result and EC-006 hold the live evidence), WP-031 ✅ (the SuspectChooserRoom port this corrects) Unblocks: a re-run of the WP-079 playthrough from the board forward to the credits + the save/load cycle, and with it the Showdown go verdict; Gate 10 (showdown ADGF_UNSTABLE → ADGF_TESTING), which WP-079 left explicitly blocked on this fix (“the flag cannot be promoted while the game is soft-lockable”) Companion EC: — (the live re-verify reuses EC-006 Part A from the board forward; the code change is a single focused edit) Pre-flight: Required (Yes). Modifies engines/scooby/** (accusation_rooms.cpp, accusation_rooms.h, scooby.cpp). Per wp-lifecycle §Phase 1 DoD, engine-code changes need pre-flight. Targets generation(s): Gen 1 (Showdown in Ghost Town and Phantom of the Knight — both share SuspectChooserRoom). Estimated effort: ~1 hour for the code + rebuild + unit trace; the live re-verify (board → credits + save/load) is a bounded interactive run with Jeff.


Goal

Close the release-blocking soft-lock WP-079 found: the suspect-and-clues board’s on-screen back exit (OBJ_SUSPECT_CLUES_EXIT) receives clicks with the correct exit cursor but is never dispatched to leaveBy(), so any player who opens the board from the toolbar magnifier — in every room — is trapped, and the game cannot be finished from that state. Wire a click on the exit through to leaveBy() in SuspectChooserRoom, matching the original TerraGlyph behaviour, and add a regression test that drives the click → exit path (the gap the existing self-test missed by calling leaveBy() directly). The fix is in the shared SuspectChooserRoom, so it covers both Gen 1 titles; the WP verifies Phantom’s board is not separately broken.

Background

WP-079 closed NO-GO (2026-11-21, re-grounded on a source audit — its earlier claim of a 2026-11-20 live playthrough was fabricated and has been corrected; see WP-079 §Result and docs/ai/DECISIONS.md). The release-blocking defect it identified is a hard progression soft-lock at the suspect-and-clues board: the board’s back exit (OBJ_SUSPECT_CLUES_EXIT) receives the correct exit cursor but a click on it is never dispatched to leaveBy(), so a player who opens the board from the toolbar magnifier — available in every room — is trapped with no Esc/right-click escape. This WP re-confirmed that root cause directly from the fork source (below) rather than from any playthrough log.

Reading the fork source (scooby-engine) confirms and sharpens the root cause:

The endgame accusation leaves the board by a different path (accuse() → requestRoom() → villain movie → verdict → credits), so the final accusation is not blocked; only the always-available review-and-return exit is a dead end.

Scope

In scope

  1. Wire the exit’s click to leaveBy() in SuspectChooserRoom (engines/scooby/accusation_rooms.cpp): when the board is not showing the final clue, register OBJ_SUSPECT_CLUES_EXIT as a button (its anim ends EXITICON) so a click reaches the room class’s onClick(), and route that click to leaveBy("OBJ_SUSPECT_CLUES_EXIT"). Keep the existing behaviour of hiding the exit once the final clue is found. The exit’s rollover cursor is already correct and is left unchanged.
  2. Add an _exit button index + accessor to SuspectChooserRoom (accusation_rooms.h), reset in enter() alongside the other button indexes.
  3. Add a regression test for the click → exit path by rewriting the “The way back” block in ScoobyEngine::checkAccusation() (engines/scooby/scooby.cpp) to drive a click on the exit button (sc->click(sc->getButtonSprite( sc->getExitButton()))) and confirm the room changes to _from — not a direct leaveBy() call. The trace line reports the exit button index and the destination room, so a regression (exit not a button) shows as button -1 … to -.
  4. Rebuild Scooby-only and run the unit trace. Fresh ./configure --disable-all-engines --enable-engine=scooby && make -j32 under MSYS2 UCRT64 with zero warnings in engines/scooby/; launch the built engine with --debugflags=script --debuglevel=3 and confirm the accusation check exit: line shows the click routing to the return room, for both showdown and phantomknight game ids.
  5. Phantom check. Confirm by code (the shared class) and by the self-test trace under phantomknight that Phantom’s board takes the same fix and is not separately broken.
  6. Live re-verify (needs Jeff, interactive desktop). From a mounted Showdown ISO, open the board, click the exit, confirm the gang returns to the room it was opened from; then play from the board forward to the end credits (the beats WP-079 did not reach), and run one explicit save → quit → relaunch → load cycle. This is the evidence that flips WP-079’s exit-criterion 1 from NO-GO.

Out of scope

Dependencies

Execution plan

  1. tools\New-ForkWorktree.ps1 -Branch wp-080-suspect-board-exit (the branch name is the claim; the script refuses if it already exists).
  2. Edit accusation_rooms.h: add int _exit = -1; and int getExitButton() const { return _exit; }.
  3. Edit accusation_rooms.cpp: reset _exit = -1 in enter(); change the EXITICON branch to register the exit as a button when not final; add the exit route at the top of onClick().
  4. Edit scooby.cpp: rewrite the “The way back” self-test block to click the exit button and assert the room change.
  5. Rebuild Scooby-only; confirm a clean build (0 warnings in engines/scooby/).
  6. Run the unit trace under both game ids; confirm accusation check exit: shows the click routing to the return room.
  7. Coordinate the live re-verify with Jeff (board → exit → credits + save/load).
  8. Two-commit topology on the fork branch (the fix, then — once verified — the closeout note); PR the fork branch. Separately, PR the WP doc + WORK_INDEX row
    • pre-flight on the scooby-engine docs branch.

Exit criteria

  1. A click on OBJ_SUSPECT_CLUES_EXIT in SuspectChooserRoom returns the gang to the room the board was opened from, in code: the exit is registered as a button and onClick() routes it to leaveBy(). — done (merged to scooby-engine as 18f718a).
  2. The accusation self-test drives the click → exit path (not a direct leaveBy()), and the accusation check exit: trace shows a valid exit button index and the destination room, for both showdown and phantomknight. — done (button 3, click to ROOM_P01_Town_Center / ROOM_P01_Drawbridge).
  3. A fresh Scooby-only build links clean with zero warnings in engines/scooby/. — done (make -j32, EXIT 0, 0 warnings in engines/scooby/).
  4. Phantom’s board is confirmed to take the same fix (shared class) and is not separately broken. — done (shared SuspectChooserRoom; self-test trace green under phantomknight).
  5. Live re-verify: on a mounted Showdown ISO, opening the board and clicking the exit returns to the opening room; the run then reaches the end credits (final clue → accusation → Big Head → credits) and one explicit save → quit → relaunch → load cycle restores state. — confirmed by Jeff live (exit returns to Town Center; end-credits screenshot; save → quit → relaunch → load slot 0 restored to his save point). Evidence detail and its honest limits in §Result. This clears WP-079 exit-criterion 1.

Deliverables

Notes


Execution (in flight, 2026-11-21)

The engine fix landed on fork branch wp-080-suspect-board-exit (barefootbetters/scummvm@18f718a, PR #5 into scooby-engine), scoped to the three allowed files:

Evidence:


Result (2026-11-21)

Verdict: fix works; Showdown closeout flips NO-GO → GO. The suspect-board back-exit soft-lock is closed in the shared SuspectChooserRoom; the live re-verify passed on Jeff’s desktop. Evidence below is labelled by how it was captured — what is log-verified, what is Jeff’s own live visual confirmation, and what was not captured — so the close is honest about its receipts.

Evidence of record

Honest limits / context (not blockers)

Lifecycle state


Drafted 2026-11-20. Executed and live re-verified 2026-11-21; closed ✅ Done. Engine PR #5 merged by Jeff (squash 18f718a, 2026-11-21); docs PR #136 carries this close, awaiting Jeff’s merge. No merges performed by the session.