Xenon 2

Autopilot · write-up

Level 2 wall-lip repair and full-level validation — 2026-10-02

xenondoc/LEVEL2_CORRIDOR_STALL_20261002.MD · 10 KB · updated 2026-10-03

Result

The C pilot escapes the stall around world (138,4138) / tile row 259. Both the earlier-checkpoint probe and the full-level run pass this lip without a monitor-reported wall stall. The full-level validation reaches Level 3, but is not a clean gameplay pass: there are 17 shield-hit events and two lost lives. No changes were committed automatically.

Root cause and local repair

The span connector calls for retreat to approximately (140,4148) before crossing right. Ordinary corridor pacing replaced that connector's X with the preferred right lane and installed screen band [144,164]. At screen Y=176, the corridor guard then reversed or cancelled the evaluator's Down input. The extra local dodge pass also clamps Down to Up at the bottom edge. This prevented the short camera backscroll needed to clear the lip.

The new xap_level2_corridor_retreat identifies a corridor waypoint below the player only in Level 2 world Y [4096,4208]. During that connector leg:

  • Preserve the connector's actual X/Y, prefer its vertical leg and suspend the ordinary screen band. Do not force an early crossing to the right lane.
  • Reevaluate the native maneuver on every observation instead of reusing a retained stationary suffix.
  • Let the evaluated connector pass the corridor guard. If the complete maneuver is verified, do not run the additional edge-clamped dodge pass; clear its obsolete retained dodge state. Unverified maneuvers still use the local hazard arbitration.
  • Resume normal corridor pacing when the next waypoint no longer calls for that retreat. There is no frame-number or fixed-duration trigger.

The Cannon model is unchanged. The already pending restriction of the September 23 dodge/neutral-retention changes to active boss encounters is retained; it is documented in FULL_NATIVE_CAMPAIGN_20261001.MD.

Builds and checks

Both outputs were rebuilt with the official script:

powershell -NoProfile -ExecutionPolicy Bypass -File xenon_tools/hatari_dev.ps1 build-kernel
powershell -NoProfile -ExecutionPolicy Bypass -File xenon_tools/hatari_dev.ps1 build -BuildType Release

The new retained-dogleg regression test fails against the old HEAD DLL (premature Down-Right instead of Down) and passes against the updated DLL. It also checks that normal band pacing resumes after reaching the retreat waypoint. The regression plus native driver/session suite passes 22 tests.

Reevaluating identical historical C observations changes only three of the 3547 r18 observations, all at the corridor lip (9095–9097). All 1530 three-eye-arena observations are unchanged. All 814 observations in the archived spider recording are unchanged. This confirms local code scope; it does not establish identical later gameplay after escaping a stall.

Recordings

All gameplay uses resident C control in visible Release Hatari, fast-forward, validate_campaign.py native-run, both AVIs, Level 2 tracing, and periodic checkpoints with a minimum interval of 150 frames. Python launches and audits; it does not choose per-frame controls.

Alias Recording Coverage
Focused E:/xenon_runs/level2-lip-retreat-20261002-r149.validation/level2-lip-retreat-20261002-r149.x2events Starts from r147 checkpoint f8622-periodic.sav; passes the lip and continues to 10033. Four later projectile hits at 9002, 9255, 9257 and 9448; no life loss.
Full A E:/xenon_runs/level2-full-lip-retreat-20261002-r150.validation/level2-full-lip-retreat-20261002-r150.x2events Starts at Level 2 entry, frame 7912; initial life-loss stop at 10478.
Full B E:/xenon_runs/level2-full-lip-retreat-20261002-r150-part2.validation/level2-full-lip-retreat-20261002-r150-part2.x2events Continues the same paused emulator from 10478; defeats both bosses, visits both shops and stops on playable Level 3 at 18200 (last captured frame 18201).

Full A starts from:

E:/xenon_runs/full-campaign-native-release-20261001-r136.validation/checkpoints/f7912-periodic.sav

Full B is a continuation after death, not an independent clean checkpoint trial. The validator restarts the resident pilot from the current RAM state and captures its own start.sav/start.ram. Level 2 trace for both parts:

E:/xenon_runs/level2-full-lip-retreat-20261002-r150.trace

In Full A, the ship is initially held around (138,4138) through the incoming volley, starts the retreat around 8924 and has left the trapped position by approximately 8930. The two hits at 8904 and 8912 remain unresolved despite removal of the persistent navigation stall.

Full-level incidents

Every filename is given above under its recording alias. Damage attribution comes from emulator collision events, not proximity in a Python drawing.

Recording Frame Shield change Description
Full A 8904 39 → 35 Directional projectile #17256 hits while the ship is held below the lip at (138,4138).
Full A 8912 35 → 31 Directional projectile #17285 hits at the same held position before retreat becomes usable.
Full A 8956 31 → 27 Directional projectile #17451 hits during the departure from the lip at (200,4104).
Full A 9847 27 → 23 Directional projectile #21101 hits in the eye approach at (185,3232).
Full A 10440 23 → 15 Scripted worm segment #23588 hits during the three-eye encounter at (65,2679).
Full A 10445 15 → 7 Scripted worm segment #23582 hits near the left arena wall at (21,2654).
Full A 10449 7 → 0 Scripted worm follower #23585 delivers the final shield damage at (30,2639).
Full A 10466 Life lost The three-eye worm collision sequence costs the first life.
Full B 13638 39 → 35 Directional projectile #33439 hits after the first shop at (92,2407).
Full B 13711 35 → 27 Scripted periodic-swarm body #33645 hits beside the right wall at (284,2306).
Full B 13716 27 → 19 Scripted periodic-swarm body #33646 hits at (284,2296).
Full B 13719 19 → 11 Scripted periodic-swarm body #33647 hits at (284,2298).
Full B 13723 11 → 3 Scripted periodic-swarm body #33648 hits at (284,2294).
Full B 13727 3 → 0 Scripted periodic-swarm body #33649 exhausts the shield at (284,2290).
Full B 13744 Life lost The post-shop swarm collision sequence costs the second life; this is not the three-eye boss.
Full B 14062 39 → 35 Directional projectile #34912 hits after respawn at (85,2409).
Full B 14074 35 → 31 Directional projectile #34954 hits at (116,2401).
Full B 14155 31 → 23 Scripted periodic-swarm body #35174 hits at (261,2290).
Full B 15722 39 → 31 Scripted sine-swarm body #41787 hits in the lower passage at (204,810).

No wall stall is reported in either full-level part. Defeating the bosses and reaching Level 3 does not make these shield/life losses acceptable. The separate follow-ups are the first-eye worm encounter and the right-wall swarm trap immediately after Shop 1; they must be evaluated from earlier checkpoints with this campaign's equipment before changing their tactics.

The source audit and exact September 23 kernel comparison are documented in LEVEL2_LIFE_LOSS_ANALYSIS_20261002.MD. Both fatal control sequences also occur in historical C when replaying the same observations. The first is an unsafe transfer override; the second is an ordinary formation hold outside the Level 2 hazard-escape regions.

Pickups and shops

The observational pickup audit reports:

Recording Retirement frame Pickup Result
Full A 8895 HEALTH POWER 1 #17082 Missed; closest gap 18 pixels at 8892, before the first damage event.
Full A 10015 POWERUP #21755 Likely collected; retires beside the ship after intercept.
Full B 14680 Zapper #37527 Likely collected; retires beside the ship.
Full B 15013 HEALTH POWER 1 #38828 Likely collected; shield recovers before the later passage.
Full B 15055 Side Shot #38917 Collected; retirement beside the ship and installed loadout agree.

No missed weapon-attachment pickup is reported. The first shop at 12532–13410 makes no purchases, preserving 1350 cash and Double Shot, Cannon and Rear Shot. The second shop at 16863–17836 buys Laser at 17457, spending 4000 of 4400 cash. Its exiting loadout is Double Shot, Cannon, Laser and Side Shot. No Rear Shot is bought in either shop.

Detailed audits and shop outputs:

  • work/level2-lip-retreat-r149-audit.json
  • work/level2-full-lip-retreat-r150-audit.json
  • work/level2-full-lip-retreat-r150-part2-audit.json
  • work/level2-full-lip-retreat-r150-shops.md
  • work/level2-full-lip-retreat-r150-part2-shops.md

Pickup retirement alone is not an explicit collection event; attachment loadout and shield changes provide independent confirmation where available.

Recording integrity

All paired AVIs finalized without cleanup errors. Focused AVIs each contain 5646 frames, Full A each contains 9652 and Full B each contains 24998. RIFF sizes cover each file, VBL tags are contiguous, and first/last images decode at 640×400. The completed validation emulator was closed.

Reproduction

Use a fresh name/output folder, from the repository root:

$env:XAP_LEVEL2_TRACE_FILE='E:/xenon_runs/level2-lip-repeat.trace'
powershell -NoProfile -ExecutionPolicy Bypass -File xenon_tools/hatari_dev.ps1 run -BuildType Release -Snapshot E:/xenon_runs/full-campaign-native-release-20261001-r136.validation/checkpoints/f7912-periodic.sav -ControlPort 6903 -NoWinConsole
python xenon_tools/validate_campaign.py native-run level2-lip-repeat --connect --output-root E:/xenon_runs --port 6903 --build-type Release --fast-forward --checkpoint-interval 150 --stop-at-level 3 --continue-after-life-loss --continue-after-stall

The separate visible official launch omits the Windows console so console selection cannot freeze the emulator. --connect captures the actual start state; do not combine it with --resume. Both C binaries must be current.