Skip to content

fix: device-pass fixes for replay modes, room transitions, and settings - #44

Merged
prabu-openclaw merged 1 commit into
mainfrom
local/titles-plus-audio
Jul 24, 2026
Merged

fix: device-pass fixes for replay modes, room transitions, and settings#44
prabu-openclaw merged 1 commit into
mainfrom
local/titles-plus-audio

Conversation

@prabu-openclaw

Copy link
Copy Markdown
Collaborator

Findings from a device playtest on 2026-07-23, plus the test layer that would have caught the worst of them.

Supersedes #41 and #42 — this branch already contains their commits. Close them in favour of this, or merge them first and I'll rebase.

The blocker

Side contracts were uncompletable. Extraction resolved only on an explicit tap of the pad, or at the end of an enemy phase — and once the last enemy is dead there is no enemy phase. Walking the final runner onto the pad produced the objective pulse and then nothing, with no message at all, because every rejection path lives inside requestExtraction and that was never reached.

adjudicateExtractionIfEligible now runs on the move commit, beside the existing terminal/grimoire step-on handlers. It is internally guarded and idempotent.

Other fixes

  • Backtrack spawn. Re-entering a cleared room sent the squad to the room's original entry point — the far end from the door they came through. M1 room_2 → room_1 landed them at the top when the connection authors the bottom. RoomManager now uses the connection's targetSpawn in both directions, which is what BattleScene's own transition comment already specified; the two had disagreed and RoomManager won.
  • Barrier wall reappearing. A barrier dropped by removeOnFirstKill is painted into the room background art, and re-entry reloads that art pristine — so the wall returned visually while staying walk-through. The pixel patch is now replayed on room load.
  • Campaign VNs in replay modes. Gauntlet floors and side contracts ran the campaign intro and outro cutscenes — story beats for a mission the player never started. Both skipped.
  • Tutorial-tips replay was a one-way door: resetAll() had no inverse and .disabled locked the button afterward. It also misreported its state after reopening Settings, tracking @State rather than the stored flags.
  • TEAM button appeared on both the main screen and the SELECT RUN bar, wired to the same action. Main-screen copy removed.

New: backtrack patrols

Re-entering a cleared room has a 35% chance of 1–2 of the cheapest authored types. Seeded on (attempt, room, visit) so a visit cannot be re-rolled by walking out and back; capped one per room per attempt so a corridor between objectives can't be farmed; never in boss rooms. Doors re-lock until the patrol dies, matching the ReinforcementService contract. Tuning knob is backtrackPatrolChance.

Tests: 113 → 126

StepOnSemanticsTests certifies the player-input path. WP6's mission certification drives authority directly (applyRoomEntry, requestExtractionResolution), so the tap/move → intent layer had no coverage — which is exactly how contracts stayed broken with the whole suite green. These enter through moveCharacter, the call the tap handler makes.

ReplayModeCertificationTests gives gauntlet, contracts and arenas the WP6 treatment they never had (MissionCertificationMatrix.md mentions them zero times): all 20 arenas driven through the real contract path via a seed sweep, all 3 contract tiers, and 8 gauntlet floors — every run finished by walking onto the pad.

Both are mutation-checked: disabling the extraction fix fails 4 tests in the first and 3 in the second.

Validation

126/126 green locally on iPhone 17 sim. Also verified the fixes apply cleanly to main and pass there standalone, independent of #41/#42.

Not yet verified on device — that's the remaining gap, and given the bug this PR fixes was a device-only finding, worth a real playthrough before merge.

🤖 Generated with Claude Code

@prabu-openclaw
prabu-openclaw force-pushed the local/titles-plus-audio branch from 4475507 to 2ffd01d Compare July 24, 2026 01:33
Findings from a device playtest (2026-07-23), plus the test layer that
would have caught the worst of them.

Extraction resolved only on an explicit tap of the pad, or at the end of
an enemy phase -- and once the last enemy is dead there is no enemy
phase. Walking the final runner onto the pad produced the objective
pulse and nothing else, with no message, because every rejection path
lives inside requestExtraction and that was never reached. Side
contracts were therefore uncompletable. adjudicateExtractionIfEligible
now runs on the move commit alongside the terminal/grimoire step-on
handlers; it is internally guarded and idempotent.

Backtracking into a cleared room sent the squad to the room's ORIGINAL
entry point, at the far end from the door they actually came through --
M1 room_2 -> room_1 landed them at the top when the connection authors
the bottom. RoomManager now uses the connection's targetSpawn in both
directions, which is what BattleScene's own transition comment already
specified; the two had disagreed.

A barrier dropped by removeOnFirstKill is painted into the room
BACKGROUND art, and re-entry reloads that art pristine, so the wall came
back visually while staying walk-through. The pixel patch is now
replayed on room load.

Replay modes ran the campaign intro AND outro VNs -- story beats for a
mission the player never started. Both are skipped for gauntlet floors
and side contracts.

Also: the tutorial-tips replay button was a one-way door (no inverse for
resetAll, and .disabled locked it afterward), and it lied about its
state after reopening Settings because it tracked @State rather than the
stored flags. TEAM was on both the main screen and the SELECT RUN bar
wired to the same action; the main-screen copy is gone.

New: backtrack patrols. Re-entering a cleared room has a 35% chance of
1-2 of the cheapest authored types, seeded on (attempt, room, visit) so
a visit cannot be re-rolled by walking out and back, capped one per room
per attempt, never in boss rooms. Doors re-lock until the patrol dies,
matching the ReinforcementService contract.

Tests: 113 -> 126.

StepOnSemanticsTests certifies the player-input path. WP6's mission
certification drives authority directly (applyRoomEntry,
requestExtractionResolution), so the tap/move -> intent layer had no
coverage at all -- which is exactly why contracts could be broken with
the whole suite green. These enter through moveCharacter instead.

ReplayModeCertificationTests gives gauntlet, contracts and arenas the
WP6 treatment they never got (MissionCertificationMatrix.md mentions
them zero times): all 20 arenas driven through the real contract path
via seed sweep, all 3 tiers, 8 gauntlet floors -- every run finished by
walking onto the pad.

Both suites are mutation-checked: disabling the extraction fix fails 4
tests in the first and 3 in the second.

Not yet verified on device.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@prabu-openclaw
prabu-openclaw force-pushed the local/titles-plus-audio branch from 2ffd01d to b0ae2fd Compare July 24, 2026 02:19
@prabu-openclaw
prabu-openclaw merged commit 2b5060a into main Jul 24, 2026
7 checks passed
@prabu-openclaw
prabu-openclaw deleted the local/titles-plus-audio branch July 24, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant