# Playable Movement Finality and Phase Two Closure

Verification date: 2026-09-23. **PASS — play-13 Movement finality and the required
Phase Two closure verification are complete.**

## Contract and authority

Fresh browser Room setup explicitly starts **gridlokt-play-13**. The remaining
identifiers are `gridlokt-play-action-13`, `gridlokt-play-scenario-13`,
`gridlokt-play-replay-13`, `gridlokt-play-observation-13`, and fingerprint prefix
`play-13:fnv1a32:`. `STATE_KEYS13` is exactly `STATE_KEYS12`. No preview, pending
Movement, undo stack or additional physical zone was added to authoritative state.
API defaults and play-1 through play-12 retain their original contracts, canonical
bytes, fingerprints and legal actions. Imports never migrate.

The existing `move` action records actor, expected revision and the exact route,
with `{ x, y, aidId }` at each declared-aid landing. State plus actor and revision
bind the source; the final step determines the destination. `end-movement` records
the authoritative Stay decision. `warp` retains its exact `roomId`, and
`travel-permanent-warp` retains exact source/destination Warp IDs, destination and
approach route. All use action version 13. Extra source, destination, preview,
undo, token, discard, winner or turn-result metadata rejects where unsupported.

There is one existing Movement dispatcher. It validates current state, exact
actor/phase/revision, every step, printed edges, occupancy, obstacles, color stops,
Rooms, eligibility, Warp connections and every declared physical aid before
publishing one cloned-state transition. Current Center lifecycle and topology
changed by Bomb, Move-a-Room, Shovel or Hammer use the same authority. It never
accepts a preview as proof of legality. Invalid actions preserve the entire input
state and submitted action.

`createMovementPreview` dry-runs that dispatcher and returns an independent,
deeply frozen proposal with the exact action, source/destination, used aid IDs and
kinds, and public consequences. It returns no opponent hand or future deck.
Creating, replacing or dropping the proposal changes no revision, fingerprint,
replay entry, pawn, token, declaration, Trap, hand, deck, discard or board zone.
Tunnels retain their established Utility timing; no new Movement effect was added.

Confirmed Movement and Stay are final. Used aids discard once; unused cards remain
held and declarations expire. Stay leaves the pawn in place. Ordinary Room warp
and paired Warp travel end the turn; normal passage through a hub never activates
a link. Tokens are awarded on committed entry. A fourth-token Final placement
interruption occurs after the pawn, token and aid costs are committed; placement
never reopens Movement. Eligible Final Room entry wins immediately and all later
actions reject. Pending consecutive Traps resolve at the established normal-turn
boundary. There is no inverse, resume, restore-aid or pop-replay-action API.

## Browser planning and controls

During Movement, select a destination, inspect its full route and aid identities,
choose an alternative aid cost, build individual legal steps, cancel, or preview
Stay. The finite suggestions provide one canonical route per destination/used-aid
set. They do not enumerate infinitely many geometric walks. The step builder
supports other legal routes and revisits, including loops, by validating each
complete prefix and possible extension through shared authority.

The actual pawn stays in its authoritative location; a separate gold dashed
**PREVIEW** marker labels the proposed destination. **Cancel Preview**, another
destination, another suggested route, and **Remove last preview step** affect only
local presentation. **Confirm Movement · final**, **Confirm Stay · end turn**,
**Confirm Room warp · final**, and **Confirm linked travel · final** commit the
exact displayed action. Linked travel can use the currently built approach route.
Concise guidance explains that the preview can change and confirmation is final.

Replacing controls capture state identity, expected revision, UI generation,
actor, version, starting coordinate and the canonical state fingerprint. The
proposal freezes exact destination, route and aid identities. Handlers reject
older previews, detached/reattached nodes, rerenders, revised states, same-revision
replacement states, in-place geometry/obstacle/pawn changes and replay inspection.
Confirmation rechecks through the engine. Double activation cannot reuse the old
control. After keyboard confirmation, focus announces the new player/interruption
on the turn heading; repeated Enter or Space does not activate another phase.
IDs remain inert text/data, including hostile imported aid identifiers.

After confirmation, preview controls disappear and the authoritative outcome and
used aids render. Replay describes the confirmed route from its pre-action state,
hides private hands and locks live commitments. Development scenario import is
explicit diagnostic replacement; replay navigation is read-only inspection.
Neither is gameplay undo, and returning from inspection restores the existing
live state rather than a historical replay checkpoint.

## Persistence, closure audit and complete game

Scenarios, fingerprints, replay initial states and deeply frozen independent
observations contain only authority. Preview creation and cancellation never
serialize. Only confirmed actions append to a replay; imports and replay validation
recompute exact steps, physical aid identities, token awards, placement, Warp
completion, victory, turn advancement and Trap skips. Supplied derived outcomes or
unknown preview fields reject. Snapshots establish present consistency, not an
authenticated historical route. Fingerprints detect divergence, not forgery.

The [closure audit](movement-finality-evidence/closure-audit.json) contains **28
bounded feature recordings**, all conserving 80 regular Paths, one distinct Center
and 50 Utilities at every recorded state. They exercise all 15 Utility kinds:
Wall, Pit, Hook, Bridge, straight/corner Tunnel, Warp, Jump Boots, Bomb, Booby-Trap,
Drill, Shovel, Hammer, Switch and Move-a-Room. The recordings also cover ordinary
Path/Utility draws, chosen excess discards, regular Path placement, full recycling,
Center's universal lifecycle and second destruction, ordered Switch fourth tokens,
mandatory placement, chosen cleanup, hub passage, linked travel, aided Movement,
Stay and consecutive Traps. These diagnostic starting layouts do not claim
historical construction reachability.

Separately, the [complete-game replay](movement-finality-evidence/complete-game-replay.json)
begins from independently validated completed construction and preserves its exact
**72-action construction prefix**. The fixed cooperative demonstration policy
submits only authoritative actions: production Room setup, four Room/pawn
placements, normal turns, ordinary Movement, regular token collection, one
mandatory Final placement and immediate Final Room victory. Its **291 Phase Two
actions** end with exactly one winner, **Player 3** (index 2). All intermediate
states validate and conserve all stock. Initial Utility shuffle uses **49 samples**.
The demonstration policy is local evidence code, not a changed research policy or
production Phase Two AI.

Two fresh generations produce identical canonical bytes (**458,102 bytes**,
excluding the artifact's final newline). Independent replay parsing and a separate
action-by-action execution from the validated construction agree on:

- Final fingerprint: **`play-13:fnv1a32:b3bf5fb4`**.
- Canonical replay identity: **`sha256:285e1c49b6be0ae4161af52bca6a4d133e203f6ea859d2314eeb0d08932e27be`**.

The complete game does not claim to use every Utility or recycling boundary in
one history; the separate feature recordings exercise those cases. This is a
descriptive closure audit, not exhaustive game-tree correctness. The
**no-legal-Room case remains intentionally deferred** under the earlier ruling.
No loss, draw, placement exception, relocation or take-back was invented.

## Executed verification

The [evidence index](movement-finality-evidence/README.md) links exact commands,
raw logs and artifacts; the [machine-readable summary](movement-finality-evidence/verification-summary.json)
records final results.

| Check                                                   | Actual result                                                   |
| ------------------------------------------------------- | --------------------------------------------------------------- |
| Existing regression before new suites                   | 1,194 pass; 17 opt-in browser groups skipped                    |
| New Movement domain suite                               | **60 pass**, zero failures                                      |
| New persistence suite                                   | **36 pass**, zero failures                                      |
| Both new non-browser suites                             | **96 pass**, zero failures                                      |
| `npm test`                                              | **1,290 pass**, zero failures; 18 opt-in browser groups skipped |
| New browser group plus updated fresh-game Utility group | **45 pass**, zero failures/skips                                |
| All 18 browser groups, explicitly sequential            | **313 pass**, zero failures/skips: 34 new and 279 prior         |
| `npm run check`                                         | All **96 JavaScript files** pass syntax; formatting passes      |
| Both evidence scripts                                   | Separate syntax and formatting checks pass                      |
| Independent Movement graph enumeration                  | **64 layouts, 211 matched commitments**                         |
| Captured play-12 historical comparison                  | **212 exact artifacts: 110 scenarios, 102 replays**             |
| New bounded feature comparison with captured play-12    | **28 recordings**, identical physical outcomes                  |
| Frozen research verification                            | **60 raw runs**, unchanged identity                             |

Focused checks include Boots/Hook/Bridge/Drill/mixed-aid proposals, multiple
geometric routes and aid costs, a legal loop, unused declarations, unvisited and
fourth-token Rooms, mandatory placement, immediate victory, both Warp forms,
universal movement, consecutive Traps, replay divergence, opaque IDs, privacy,
immutable rejection and real earlier Shovel/Hammer/Move-a-Room invalidation.
No prior gameplay assertion was removed or weakened.

The [captured comparison](movement-finality-evidence/captured-legacy-comparison.json)
executes the pre-edit play-12 engine/data alongside current source. All 212
historical top-level artifacts match exact canonical bytes, fingerprints and legal
actions. The [independent graph enumeration](movement-finality-evidence/independent-enumeration.json)
constructs edges from printed geometry, declared aid identities, obstacle kinds,
ownership and stops without production movement search helpers. It matches all
211 offered destination/aid-set commitments. Earlier play-6 cleanup literals remain
`play-6:fnv1a32:0f73f99b`, `play-6:fnv1a32:c45c32d9`, and
`play-6:fnv1a32:186d06f7`. The play-12 full Center lifecycle retains
`play-12:fnv1a32:0618f385` and its original bytes.

The frozen research artifact verifies the unchanged identity
`sha256:1378a04ca5da5eaaf935665919d42896afe5e3773cab7a12197368201edf527f`.
No research source, policy, seed or result changed.

Initial failures remain in evidence. A new Room-warp domain test passed the entire
query result instead of the exact `roomId` action field; it now constructs the
supported action. Persistence tests initially used the wrong observation-version
property and attempted another validated observation after deliberately corrupting
the source for an independence probe; the second observation now occurs before
that corruption. The feature generator initially omitted the exact Trap card ID.
The first full browser sweep found an existing fresh-game test expecting immediate
Stay; it now verifies unchanged authority after preview, then explicitly confirms
before its original turn-advance assertion. No gameplay check was weakened.

Browser scope is local headless **Chrome 153.0.8010.53**, desktop **1440 × 900**,
and emulated phones **390 × 844 / 375 × 667**, scale 1. New checks use native mouse,
focused Enter/Space, a native CDP touch confirmation, real file-input changes and
downloads, plus explicitly labeled direct retained-handler probes. Phone cases use
mouse at emulated dimensions; prior gesture suites also exercise CDP touch.
Six desktop/phone screenshots were visually inspected. New-group error collection
reports no application runtime exceptions, console errors or failed resources.
Physical devices, native OS pickers, other engines, screen readers and unaided
Tab navigation are not certified.

## Files and preservation

Production edits are limited to `js/phase-two.js`, `js/phase-two-data.js`,
`js/phase-two-ui.js` and the Movement planning controls in `game.html`. Current
documentation changes are `README.md`, `index.html` and `docs/rules-engine.md`.
Two existing data tests add only supported/latest-version expectations;
`tests/browser-utility-rulings.test.js` updates fresh setup to play-13 and explicitly
confirms the new Stay preview while retaining the original final-state assertion.
New tests are the Movement fixture, domain, persistence and browser files. This
report and its indexed evidence directory are new.

All **1,718 prior preservation hashes** matched before editing. The
[baseline](movement-finality-evidence/baseline.json) includes that record itself,
covering **1,719 starting files**. The final
[preservation record](movement-finality-evidence/preservation.json) accounts for
**1,709 unchanged, ten intentionally changed, none missing**. It records every
addition and hashes additions except its own self-referential content; exclusions
are `node_modules`, `.DS_Store` and `.git`. Original snapshots and patches are local
to this milestone. Older browser groups write new outputs into its `prior-*`
directories. Preservation is finalized after verification and documentation.

`js/game.js`, construction `js/rules.js`, all earlier reports/evidence, CSS,
artwork, research, dependencies/lockfile and deployment configuration remain
byte-identical. No Git repository was initialized or used. Nothing was committed,
pushed, published, deployed, trained or tuned. No Utility or Center rule changed.

## Try it

Run `python3 -m http.server 8000` from the project root and open
`http://localhost:8000/game.html`. Fresh construction followed by **Place Rooms**
starts play-13. Use **Development → Import Scenario** for immediate examples:

- [Alternative Hooks](movement-finality-evidence/movement-alternatives.json):
  preview (4, 3), choose route 1 or 2, inspect its exact card, cancel or confirm.
- [Geometric routes](movement-finality-evidence/movement-loop.json): choose
  **Build route step by step**, then (7, 8) → (7, 9), or (6, 9) → (7, 9).
  Remove local steps, change the route, or confirm the displayed route.
- [Declared Drill and Stay](movement-finality-evidence/movement-stay.json):
  choose **Preview Stay**, cancel or replace it with (4, 4), or explicitly confirm
  Stay. Only confirmation expires the unused declaration.
- [Fourth token](movement-finality-evidence/movement-fourth.json): preview
  (4, 4), confirm, then place Final Room. The original Movement stays committed.
- [Linked Warp](movement-finality-evidence/movement-linked-warp.json): preview
  linked travel, cancel or confirm; confirmation transfers and ends the turn.
- [Immediate victory](movement-finality-evidence/movement-victory.json): preview
  (4, 4), then confirm to enter Final Room and end the game.

Use **Import Replay** for the complete-game artifact above. Replay controls inspect
its history without replacing a confirmed live position with an earlier one.
