
> michael-wave-ori-break-the-matrix@0.4.0 test
> node --test tests/*.test.mjs

✔ sector 1: spawn, enemies, pickups, key, relays and exit occupy reachable space (10.89426ms)
✔ sector 1: mandatory objectives are reachable without a secret wall (4.098421ms)
✔ sector 2: spawn, enemies, pickups, key, relays and exit occupy reachable space (3.154018ms)
✔ sector 2: mandatory objectives are reachable without a secret wall (1.953505ms)
✔ sector 3: spawn, enemies, pickups, key, relays and exit occupy reachable space (4.969675ms)
✔ sector 3: mandatory objectives are reachable without a secret wall (1.332656ms)
✔ raycasting is finite on cardinal axes and respects closed walls (0.881983ms)
✔ collision substeps prevent tunnelling through walls and preserve sliding (9.21901ms)
✔ doors block sight and collision until fully opening (0.993215ms)
✔ E opens faced ordinary door and golden doors require a key (3.039176ms)
✔ opening a secret counts once and does not consume key (1.235372ms)
✔ movement speed is normalized diagonally and frame deltas are bounded (8.549531ms)
✔ shots hit a visible host; liberated hosts count exactly once (4.17426ms)
✔ walls block player weapons and enemy line of sight (1.308817ms)
✔ slap is free and only works in melee range (1.397475ms)
✔ blaster respects cooldown and capacitor costs (1.043049ms)
✔ bass cone hits multiple hosts, stuns and knocks back without wall tunnelling (1.279069ms)
✔ pulse rifle emits a travelling projectile that damages a target (15.497591ms)
✔ disruptor destabilizes multiple targets and unplugger pierces (4.169788ms)
✔ charged alternate fire has a larger cost and damage (9.317903ms)
✔ all six weapons have unique names, fire rates, and energy costs (0.310938ms)
✔ captive rescue requires proximity, restores autonomy, cannot double-count (1.401657ms)
✔ enemies telegraph and damage the player (6.586657ms)
✔ ranged enemies launch readable projectiles (2.10272ms)
✔ Ori follows, auto attacks, and Q stuns with an energy cost (13.341763ms)
✔ Ori Q tags objectives without a nearby hostile (0.882622ms)
✔ resonance vision drains and then recharges (1.74638ms)
✔ R vent restores energy after a delay and respects cooldown (4.252652ms)
✔ bass drop charges from liberation, affects nearby enemies, then empties (1.606033ms)
✔ dodge has a cooldown and brief damage immunity (1.221946ms)
✔ death stops the simulation; retry restores a playable checkpoint (3.074194ms)
✔ checkpoints round trip mutations, doors, player and liberation (2.173319ms)
✔ unsupported or malformed checkpoints are rejected (1.962994ms)
✔ progression requires both relays and a key and unlocks later weapons (2.534398ms)
✔ Warden has three phases and blocks the final ending until defeated (6.465311ms)
✔ key and health pickups update the HUD model and persist progress (1.022528ms)
✔ upgrades from two Φ artifacts increase weapon damage (2.103607ms)
✔ deterministic initial simulation has matching states for matching inputs (36.948334ms)
✔ crawler phases through a thin wall into a valid landing cell (16.887999ms)
✔ browser smoke scenario passes in the same production simulation (98.804946ms)
✔ a dead player cannot replace a valid retry checkpoint (1.13529ms)
✔ Dead zone prevents resting-stick drift (9.655836ms)
✔ Radial stick preserves diagonals and caps full speed (0.378673ms)
✔ Controller settings sanitize old and invalid saves (0.46958ms)
✔ Analog movement keeps partial speed and legacy keyboard speed (0.133547ms)
✔ Diagonal analog movement cannot exceed full-stick speed (0.192954ms)
✔ Left and right sticks reach real movement and horizontal aiming (0.182842ms)
✔ Small movements still collide with map walls (0.1793ms)
✔ Keyboard and gamepad input coexist without extra speed (0.104091ms)
✔ RT fires a real weapon and holding continues automatic fire (0.134882ms)
✔ RT buffers a press near cooldown expiry (0.218082ms)
✔ LT charges and releases exactly one alternate shot (0.252251ms)
✔ A opens a real door and interacts only once per press (0.091784ms)
✔ A extracts through the real completion event before the next simulation tick (0.074565ms)
✔ All Xbox actions use the documented standard button layout (0.121445ms)
✔ Y, X, B, vision, weapon cycling and map reach real game actions (0.475051ms)
✔ Holding L3 sprints and D-pad down spends a full bass charge (2.903731ms)
✔ D-pad menu movement repeats; A confirm never repeats while held (0.097726ms)
✔ Pause or focus loss cancels held fire and charge until controls release (0.053878ms)
✔ Disconnect clears all held input; reconnect waits for neutral (1.848846ms)
✔ Multiple and sparse gamepads retain the active standard device (0.215047ms)
✔ Unmapped and blocked controllers fail safely without guessing buttons (0.086102ms)
✔ Optional rumble is limited, can be disabled, and resets on pause (0.648058ms)
✔ All twelve sectors clear through tracked poses, secrets and shared boss simulation (12183.78146ms)
✔ Tracked enemy death retries a checkpoint and completes sector one (300.83356ms)
✔ Rigid world and inverse compose through nonzero yaw and translation (2.453012ms)
✔ Left/right eye separation survives the world transform (1.636055ms)
✔ Frustum culling rejects behind-camera chunks but retains crossing chunks (0.146547ms)
✔ All twelve maps generate finite batched floors, ceilings, walls and export IR (0.096876ms)
✔ Door meshes use the shared open animation and passage threshold (0.154839ms)
✔ Atlas materials have unique bounded UV slots with insets (0.150799ms)
✔ Physical wall leaning cannot enter solid geometry or move the eye through it (0.237206ms)
✔ Physical motion cannot cross a locked door but can cross an opened door (0.09444ms)
✔ Head turn and crouch change view without changing body angle or hand aim (0.300502ms)
✔ Menus freeze movement/fire and discard physical head travel on resume (0.356055ms)
✔ Tracking discontinuity rebases safely and cancels simulation input (0.248595ms)
✔ Snap turn triggers once until neutral and smooth turn stays optional (0.174611ms)
✔ Head-relative and controller-relative movement use different references (0.10487ms)
✔ Unsafe muzzle extension is clamped at walls and at maximum reach (0.522514ms)
✔ Floor and ceiling intersections stop vertical tracked shots (0.308855ms)
✔ Walls occlude tracked targets independently of the gameplay body bearing (0.13748ms)
✔ All six weapons retain costs/cooldowns and use independent tracked aim (0.186619ms)
✔ Tracked pulse projectiles hit bodies at height and terminate at the floor (0.19359ms)
✔ Charged tracked fire uses the existing damage/energy multipliers (0.051295ms)
✔ The immersive adapter updates once with post-movement muzzle coordinates (0.044568ms)
✔ Wrist pointer actions suppress primary and alternate fire together (0.048642ms)
✔ Tracked dodge follows aim without snapping the gameplay body (0.050467ms)
✔ Old XR callbacks cannot advance a new distinct session after reentry (0.059716ms)
✔ Version-one saves resume in Classic without persisting XR pose state (0.046409ms)
✔ Comfort settings sanitize invalid values and preserve snap defaults (0.056579ms)
✔ Dynamic geometry and effects have bounded buffers and explicit overflow behavior (0.042894ms)
✔ Immersive session selects the world presenter and advances one shared frame (0.042125ms)
✔ Missing tracked right hand pauses immersive play without firing (0.038976ms)
✔ Controller removal and context loss pause or exit without stale input (0.043659ms)
✔ Failed GL compatibility disposes the partial session and allows retry (0.042263ms)
✔ Unavailable immersive entry keeps Classic usable and Arcade retry possible (0.038594ms)
✔ Deferred tracked shooting still drives Michael firing portrait feedback (0.079028ms)
✔ the campaign adds exactly six authored nightmare maps (5.612413ms)
✔ nightmare pressure, health, fire speed and damage scale rise every level (0.337461ms)
✔ new artifacts require a secret door while required rescues remain reachable (73.769688ms)
✔ Acts II and III can continue and the fourth ending is final (13.632278ms)
✔ nightmare shortcut unlocks weapons without claiming unearned artifacts (1.662491ms)
✔ new-sector saves round trip and mismatched map identifiers are rejected (4.978723ms)
✔ nightmare volleys lead actual movement while original volleys retain direct aim (3.830859ms)
✔ new enemies reposition and resist repeated weapon stuns without reducing Ori stun (1.810516ms)
✔ all twelve sectors clear using ordinary movement, weapons, abilities, doors and pickups (7682.559928ms)
✔ v0.1.0 tests remain byte-for-byte unchanged (54.798081ms)
✔ v0.2 sector 1: content reachable and key obtainable before locked doors (21.827306ms)
✔ v0.2 sector 2: content reachable and key obtainable before locked doors (5.595601ms)
✔ v0.2 sector 3: content reachable and key obtainable before locked doors (4.796128ms)
✔ v0.2 sector 4: content reachable and key obtainable before locked doors (3.159274ms)
✔ v0.2 sector 5: content reachable and key obtainable before locked doors (9.902989ms)
✔ v0.2 sector 6: content reachable and key obtainable before locked doors (3.380398ms)
✔ v0.2 sector 7: content reachable and key obtainable before locked doors (2.109593ms)
✔ v0.2 sector 8: content reachable and key obtainable before locked doors (7.469123ms)
✔ v0.2 sector 9: content reachable and key obtainable before locked doors (1.860601ms)
✔ v0.2 sector 10: content reachable and key obtainable before locked doors (18.261684ms)
✔ v0.2 sector 11: content reachable and key obtainable before locked doors (6.413465ms)
✔ v0.2 sector 12: content reachable and key obtainable before locked doors (9.459764ms)
✔ Act II increases encounter count and individual enemy strength (2.138092ms)
✔ original Warden ending offers Act II while final ending cannot advance (2.997176ms)
✔ an actual v0.1.0 checkpoint migrates and retains state (26.050587ms)
✔ a click just before cooldown expiry buffers exactly one shot (9.496105ms)
✔ expired click buffers never fire later (5.236948ms)
✔ wall impacts and hit reactions are emitted without gore (6.845627ms)
✔ Ori assistance has its own visible effect and source attribution (9.469899ms)
✔ danger warnings interrupt banter and remain rate limited (10.192735ms)
✔ Michael and Ori exchange lines in deterministic order (29.974188ms)
✔ movement against a wall produces no footsteps or walking bob (2.905857ms)
✔ navigation route respects golden access gates until a key is held (6.10951ms)
✔ archive signs can be read by facing and interacting (1.030459ms)
✔ fallback keyboard codes work when browser code is absent (0.687441ms)
✔ pointer capture rejects overlapping attempts (0.815177ms)
✔ denied capture switches to fallback without pausing play (0.200616ms)
✔ a capture timeout enables an explicit retry (0.327325ms)
✔ Escape from a real lock pauses; intentional release does not (0.176052ms)
✔ all six sectors clear through traversal, combat and interactions (2210.373522ms)
✔ live enemy attacks cause death, and retry permits a complete traversal (458.95188ms)
✔ render-only door rays can see behind an opening panel without changing collision (1.936891ms)
✔ Warden health phases update even while Ori holds a stun (5.436632ms)
✔ default pointer timer adapters clean up a denied request (3.574626ms)
✔ Ori stun prevents crawler phasing until the stun expires (2.909164ms)
✔ Matrix composition preserves an identity transform (8.670253ms)
✔ A screen is placed in front of the initial head pose (0.415153ms)
✔ Recenter ignores pitch and keeps the arcade screen upright (0.159051ms)
✔ Controller rays hit the panel in texture coordinates (0.135115ms)
✔ Rays behind, parallel to, or pointing away from a panel do not select (0.447388ms)
✔ Quest Touch thumbsticks map separately from Xbox navigator pads (0.312035ms)
✔ Quest triggers fire and charge; grip controls interact and Ori (1.239579ms)
✔ Quest face buttons and stick clicks expose the documented actions (0.13589ms)
✔ Generic xr-standard input keeps trigger/grip controls without guessing faces (0.393574ms)
✔ Losing a Touch controller cancels held fire until neutral (0.278241ms)
✔ Unavailable WebXR reports a fallback without requesting a session (0.344111ms)
✔ Session initialization makes GL compatible before allocating GPU objects (0.430209ms)
✔ Local-floor rejection falls back to local reference space (1.014583ms)
✔ Permission denial leaves VR inactive and permits another attempt (0.091858ms)
✔ Overlapping VR entry attempts request only one session (0.595754ms)
✔ Each XR frame advances once and renders both eye views (0.107045ms)
✔ Tracking loss and hidden headset visibility pause without simulation (0.057044ms)
✔ Recenter changes the anchored screen only on explicit request (0.059208ms)
✔ Pointed UI actions suppress a simultaneous game shot (0.044112ms)
✔ Exit and stale XR callbacks cannot restart or advance the game (0.062594ms)
ℹ tests 162
ℹ suites 0
ℹ pass 162
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 12820.619473
