Xenon 2

Autopilot · write-up

Level 4 full native validation, 28 September 2026

xenondoc/LEVEL4_FULL_VALIDATION_20260928.MD · 8 KB · updated 2026-10-01

The resident C autopilot completed Level 4 in one uninterrupted run, from the Level 3 shop checkpoint to playable Level 5. It lost no lives and the monitor found no stalls. It did take three real hits for 24 shield points in total. Two health purchases in the final shop restored shields to 39; the final shield value therefore does not mean the gameplay was damage-free.

Recording and method

  • Events: E:/xenon_runs/level4-full-20260928-r89.validation/level4-full-20260928-r89.x2events
  • Original AVI: E:/xenon_runs/level4-full-20260928-r89.validation/level4-full-20260928-r89-original.avi
  • Sprite AVI: E:/xenon_runs/level4-full-20260928-r89.validation/level4-full-20260928-r89-sprite.avi
  • Checkpoints, manifest, native incident log, and final snapshot are in the recording's .validation directory. The Level 4 trace is E:/xenon_runs/level4-full-20260928-r89-trace.log.

The official xenon_tools/hatari_dev.ps1 wrapper rebuilt Hatari and the native replay DLL before launch. validate_campaign.py native-run started from xenon_tools/run_logs/native-level3-visible-20260914/end.sav, with visible Hatari, native C control, both AVI streams, 150-frame checkpoints, --continue-after-life-loss, and --stop-at-level 5. The event stream covers frames 62580–75350 without a gap. Level 4 starts at 62620; Level 5 starts at 75032 and its first playable frame stops the run at 75349. Every sampled frame reports native C input ownership. The validator reports no cleanup error. Both finalized AVIs index successfully and their final images decode; the original and sprite streams contain 44,109 and 44,104 indexed frames, respectively. Video is aligned by recorded VBL, not equal AVI frame numbers.

Incidents

Frame Shield Finding
64256 39→39 The monitor flagged a collision callback when Health Power 1 #561729 was collected at full shields. This is not shield damage.
66261 39→35 Directional projectile #569499 ($4180) from secondary first-boss head #565565 clipped the ship near the upper-right side. Original frame.
70965 35→19 Scripted sine-moving swarm enemy #584287 ($0E1E) rose along the left edge and struck the ship as it moved down-right. C had marked the preceding candidates as unsafe but still applied that escape. Original frame.
72780 19→15 Directional projectile #591683 ($4180) clipped the stationary ship at the final-boss left Side Shot station, screen (60,41). C repeatedly reported an unverified body-contact forecast while holding that station. Original frame.

There were no lost lives. The first boss's fixed heads were gone by 66171, the secondary head by 66727, and the main head by 69557. Its health fell from 175 to zero after the handover; the former post-satellite stall did not recur. The final boss's main head was last active at 73725. All 20 cash drops it released were inferred collected by the pickup audit.

The first-boss predictor check around the 66261 hit sampled 14 forecasts, 2,240 exact chain positions and 794 scheduled projectile positions. Chain position error was zero, projectile error at most two pixels, and there were no uncovered chain collision hulls. That focused check found no trajectory error; it does not prove that the selected maneuver was avoidable from the ship's already constrained upper-right position.

Pickups and shops

The audit inferred collection of Temporary Shield #560602 at 63921, Health Power 1 #561729 at 64256, Side Shot #565839 at 65512, and Zapper

585756 at 71303. Recorded $CC8=170 at 63921 confirms shield activation.

Rear Shot #583177 and #583415 were intentionally allowed to expire at 70770 and 70797, preserving Side Shot. No other equipment pickup was missed.

The audit inferred 75 cash pickups collected and 49 missed. Six of the missed cash items came within three pixels of the player's collision bounds; twenty came within sixteen pixels. The audit cannot establish whether a safe detour existed for each one. All 20 final-boss cash drops were collected. The complete pickup audit gives each item's identity, closest frame, closest gap, and inferred outcome.

The first Level 4 shop opened at 69672 with 2,150 cash. At 70224, the pilot spent 2,000 to upgrade Side Shot from power 0 to 1, leaving 150.

First-boss cash accounting

The ten first-boss cash sprites are separated by the central solid wall. The pickup audit's missed label means a sprite left the screen, not that its value was lost. In the full r95 run, one drop was physically collected: cash was 1,200 before the shop and 2,150 when it opened, a 950-credit increase. In the focused r96 run, three drops were physically collected: cash was 1,350 before the shop and again 2,150 when it opened, an 800-credit increase. Both runs started the shower with 1,150 cash and therefore received the same 1,000 total payout. The experimental chase changed the route and later enemy encounters without increasing the shop budget, so it was removed. The normal Level 4 route remains in use after this boss. The final shop opened at 73791 with 6,700 cash. The pilot bought Health Power for 500 twice, restoring shields 15→35 at 74330 and 35→39 at 74604; bought another Laser for 4,000 at 74449; and upgraded Side Shot from power 1 to 2 for 1,000 at 74540. It left with 700 cash. The existing equipment-only shop report shows the Laser and Side Shot changes but omits these two health purchases; their cost and shield changes are visible in the raw recording.

Reproduce

$env:XAP_LEVEL4_TRACE_FILE='E:/xenon_runs/level4-full-trace.log'
python xenon_tools/validate_campaign.py native-run level4-full-check `
  --output-root E:/xenon_runs `
  --resume xenon_tools/run_logs/native-level3-visible-20260914/end.sav `
  --build-directory out/build/codex-validate --build --port 6903 `
  --frames 30000 --checkpoint-interval 150 `
  --continue-after-life-loss --stop-at-level 5

The baseline's largest safety failure was frame 70965: the ship moved into a known nearby body for 16 damage when no candidate was verified. The follow-up run below verifies that this hit no longer occurs.

Follow-up continuous C validation

The final, visible run used the official build wrapper, the same starting snapshot, both AVI streams, and 150-frame checkpoints. Its recording is E:/xenon_runs/level4-full-20260928-r106.validation/level4-full-20260928-r106.x2events; the paired files are level4-full-20260928-r106-original.avi and level4-full-20260928-r106-sprite.avi in that directory. It covered frames 62580–73127, reached playable Level 5, and lost no lives. The only shield loss was the already known 39→35 projectile hit at 66261. The former 70965 body collision and later final-boss projectile hit did not recur.

Input, shield, lives, scroll, score, and shop state were identical to the successful r95 run through frame 70802. The first difference at 70803 is the intentional Level 4 main-head firing-station change. The head was last active at 71571, versus 71675 in r95, and the final shop opened with the same 7,000 cash. The improvement is 104 frames; the head is still hit intermittently while the pilot dodges its tongue. No other encounter logic was changed for this follow-up. The first-boss cash chase was removed after the accounting experiment described above.

Both AVIs were finalized normally. ffprobe indexed 35,310 original and 35,304 sprite video frames without a container error. Their frame counts differ because each stream is aligned by recorded VBL rather than equal AVI indices.