Skip to content

VR: report XR readiness without the debug server - #746

Merged
mstan merged 2 commits into
RetroPortingToolKit:masterfrom
FractalEngineer:vr-pr/08-production-readiness
Oct 23, 2026
Merged

mstan merged 2 commits into
RetroPortingToolKit:masterfrom
FractalEngineer:vr-pr/08-production-readiness

Conversation

@FractalEngineer

@FractalEngineer FractalEngineer commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #745. This branch is stacked on the corrected projective replay.

Production startup inspection currently depends on the heavyweight debug server and TCP.

Current behavior

Debug-free builds have no compact machine-readable confirmation that the requested save load settled and the current XR session submitted a real frame.

Desired behavior

A production build can atomically publish one receipt per XR session after the requested load succeeds and that session submits a frame. Failed loads cannot appear successful, and a later XR session resets readiness.

Changes

  • Publishes through a same-directory temporary followed by atomic replacement; an existing destination is refused at process start.
  • Adds XR session-generation fields so readiness is bound to a submission from the current session.
  • Waits for the requested PSX_LOAD_SLOT outcome and a later current-session submission; failed loads publish ready:false.
  • Starts a fresh load lifecycle for every game/XR session and rebinds the current execution request, so a previous success cannot authorize a reboot.
  • Reports write/close failures without exposing partial JSON.
  • Keeps the opt-in production performance counters separate from the readiness receipt.

Validation

The complete production runtime builds with debug tools off. Atomic replacement and focused OpenXR/PGXP/render tests pass. The readiness state-machine test covers success, XR re-init, reboot with stale success, pending/failed reboot loads, recovery, and refused requests. A headless malformed-load control writes ready:false.

@FractalEngineer
FractalEngineer marked this pull request as ready for review October 22, 2026 20:12

@mstan mstan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful opt-in production diagnostics, but this stack is blocked by #744 and #745. Independently, the claimed atomic/fresh readiness receipt is not implemented: openxr_ready_report_tick fopen(path, wb) truncates an existing destination and exposes partial JSON while writing. It also latches done for the process rather than the session. Please use a same-directory temporary file plus atomic publication, refuse/reliably invalidate a stale requested destination, check write/close failures, and reset the readiness request on session reboot. Bind readiness to a real submission from the current session after the requested current-build load completes; a stale or failed load must not appear successful. The older slot-2 fixture being rejected is acceptable under owner policy and is not itself a blocker. The lightweight perf counters can remain separate from this receipt fix. Tracking: beads-ek8k.

@FractalEngineer
FractalEngineer force-pushed the vr-pr/08-production-readiness branch 2 times, most recently from 2496d74 to 5c68581 Compare October 22, 2026 22:18
@FractalEngineer
FractalEngineer requested a review from mstan October 22, 2026 22:27
@mstan

mstan commented Oct 22, 2026

Copy link
Copy Markdown
Member

Re-reviewed 5c68581. Same-directory atomic publication, existing-destination refusal, and explicit invalid/refused-load reporting address substantial feedback. One session-lifetime issue remains: when session_generation changes, the reporter resets only published_for_session and submission counters. Its static load_resolved, load_status and generation floor, plus g_openxr_ready_load_error, survive the next session_reboot, which stages PSX_LOAD_SLOT again. After a successful first-session load, a second-session pending/failed load can therefore be ignored and the previous last_ok can authorize ready:true once a new XR submission arrives. Reset/rebind the load lifecycle to the current execution/XR session and qualify success->reboot->pending/failure/success sequences. Please exercise the actual readiness decision state machine, not just the atomic-file helper. This is current-session correctness; rejection of an older savestate remains acceptable. Keeping this head held; #744/#745's revised fixes are being reconsidered separately. Tracking: beads-ek8k.

@FractalEngineer
FractalEngineer force-pushed the vr-pr/08-production-readiness branch from 5c68581 to ebca6c5 Compare October 22, 2026 22:54
@mstan

mstan commented Oct 23, 2026

Copy link
Copy Markdown
Member

Re-reviewed ebca6c5. The execution-bound request sequence / generation floor and session rebind address the stale-success issue I reported. The tests now exercise successful load -> reboot -> pending/failure -> recovery, plus refusal and XR session re-init, through the actual readiness decision helper. Those tests and the atomic file fixture pass both standalone and in the combined current-master build. The remaining ordinary title smoke batch is underway. No HMD rendering qualification is claimed here; this PR is an opt-in production receipt, with truthful current-session load status required within that path. Tracking: beads-kgof.

@mstan mstan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author execution generation/request sequence/status floor and session rebind address stale readiness success. Actual readiness-helper tests cover success->reboot->pending/failure->recovery, refusal and XR session reinit; atomic file publication passes. The production receipt is elective; truthful current-session status within it is unconditional. This is not headset rendering qualification.

One bounded muted OpenGL boot/progression/visual smoke passed for Tomba, Tomba 2, Ape Escape and Mega Man X6. Tomba 2 reached its title screen after the opening FMV at native aspect; its unsupported widescreen package remains disabled. Supported debug quit returned exit 0 for all four; this is not extended gameplay, normal-teardown or native-card-write qualification.

Combined integration 9ee1a8c63996cc91e4068aa27f100d407ab1ac0e includes #710/#723/#736/#737/#746; #736 remains held for residency policy. Six focused native checks and the GL fixture passed. This evidence qualifies the reviewed heads as a compatible subset, not an exact final-master-tree claim. Tracking: beads-kgof.

…comp into fix/held-746-20261022

# Conflicts:
#	runtime/src/main.cpp

@mstan mstan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author execution generation/request sequence/status floor and session rebind address stale readiness success. Actual readiness-helper tests cover success->reboot->pending/failure->recovery, refusal and XR session reinit; atomic file publication passes. The production receipt is elective; truthful current-session status within it is unconditional. This is not headset rendering qualification.

One bounded muted OpenGL boot/progression/visual smoke passed for Tomba, Tomba 2, Ape Escape and Mega Man X6. Tomba 2 reached its title screen after the opening FMV at native aspect; its unsupported widescreen package remains disabled. Supported debug quit returned exit 0 for all four; this is not extended gameplay, normal-teardown or native-card-write qualification.

Combined integration 9ee1a8c63996cc91e4068aa27f100d407ab1ac0e includes #710/#723/#736/#737/#746; #736 remains held for residency policy. Six focused native checks and the GL fixture passed. This evidence qualifies the reviewed heads as a compatible subset, not an exact final-master-tree claim. Tracking: beads-kgof.

@mstan
mstan merged commit 31df2e1 into RetroPortingToolKit:master Oct 23, 2026
1 check passed
@FractalEngineer
FractalEngineer deleted the vr-pr/08-production-readiness branch October 23, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants