handoff: VSync/event-wedge fixes + iterate 2.A–2.BC research notes

Source changes (dormant parity infra, retained from iterate 2.AI/2.AO):
- xenia-kernel/exports.rs: nt_create_event manual_reset polarity +
  related event wiring
- xenia-gpu/mmio_region.rs: D1MODE_VBLANK_VLINE_STATUS hardcode parity

Also lands the audit-runs/ analysis notes (.md/.txt/.json digests) for the
iterate 2.x VSync/0x10e8/0x1004 wedge investigation. Raw trace dumps
(.jsonl/.gz/.csv/.stdout) and agent worktrees (.claude/) are gitignored as
regenerable local artifacts — see memory + HANDOFF for the running findings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-06-05 07:19:08 +02:00
parent acd1656753
commit ef93a4fa14
620 changed files with 108303 additions and 1 deletions

View File

@@ -0,0 +1,50 @@
# Phase C+13 re-validation (cold-vs-cold)
## Cache-wipe protocol (per C+12 reading-error #33)
Both canary storage roots wiped (binary-dir under wine + Linux-build
fallback) before each cold canary run; ours's persistent
`~/.local/share/xenia-rs/cache` wiped between each cold ours run.
Step-by-step:
1. Backup canary's binary-dir cache to `/tmp/canary-bindir-cache-backup.tar.gz`
(4.7 MB, pre-existing oracle preserved).
2. Wipe:
- `find ~/.local/share/xenia-rs/cache -mindepth 1 -delete`
- `find ~/.local/share/Xenia/cache -mindepth 1 -delete` (was already empty)
- `find xenia-canary/build-cross/bin/Windows/Debug/cache -mindepth 1 -delete`
3. Rename ours binary: `cp target/release/xenia-rs target/release/xrs-c13`.
4. Rename canary binary: `cp xenia_canary.exe xc-c13.exe`.
5. 3× cold ours runs with cache wiped before each:
- `find ~/.local/share/xenia-rs/cache -mindepth 1 -delete`
- `./target/release/xrs-c13 check --stable-digest -n 50000000 --out <digest>.json "<ISO>"`
- All three digests bit-identical: `e1dfcb1559f987b35012a7f2dc6d93f5`.
6. Cold ours run with event log:
- `./target/release/xrs-c13 exec --phase-a-event-log /tmp/ours-cold-c13-1.jsonl -n 50000000 "<ISO>"`.
7. Cold canary run (background; killed via `wineserver -k` after
reaching ~6.5 M total events, ~250k tid=6):
- `cd xenia-canary/build-cross/bin/Windows/Debug && /usr/bin/wine ./xc-c13.exe --mute=true --phase_a_event_log_path=/tmp/canary-cold-c13.jsonl "<ISO>"`.
8. Truncate canary jsonl per-tid (tid=6 cap 250k, others 20k cap).
9. Diff: `python3 xenia-rs/tools/diff-events/diff_events.py --canary <truncated> --ours <ours-cold-c13-1.jsonl> --out /tmp/diff-c13.md`.
10. Restore canary's binary-dir cache from backup.
11. Re-run Phase B snapshot to confirm `image_loaded_sha256` unchanged.
## Gate matrix
| gate | result | notes |
|---|---|---|
| Build (`cargo build --release`) | PASS | 1 unrelated `dead_code` warning, no errors |
| Kernel tests (177 → 181) | PASS | 4 new C+13 tests, all pass |
| Full workspace tests | PASS | all crates green (verified via `cargo test --release` summary) |
| Determinism — 3× cold stable-digest | PASS | `e1dfcb1559f987b35012a7f2dc6d93f5` (all 3) |
| Stable digest changed vs C+12 baseline | EXPECTED | `ad4f74ee…``e1dfcb15…` (imports -57, instructions +5) — the fix flips the synth-success branch to NOT_FOUND, shedding a kernel.call/return pair per masked probe |
| Phase B `image_loaded_sha256` unchanged | PASS | `ea8d160e9369328a5b922258a92113efb8d7ce3e1a5c12cc521e375985c91c18` |
| Cold-vs-cold main matched prefix | PASS | **103,862 → 104,574 (+712)** on main chain |
| Sister-chain regression check | PASS | all 5 sister chains unchanged (matched-prefix unchanged) |
| Canary's binary-dir cache restored | PASS | 23-file oracle re-extracted from backup |
## Failure analysis (Reading-error #23 guard)
The main chain ADVANCED, did not regress. Sister chains all
preserved. The fix is monotone-positive for the diff metric.