fix(scripts): align verify-world PlayParity defaults and A/B spike gates (#151) #307

Manually merged
github merged 1 commit from github-bot/gh-307 into gh-pr/307/base 2026-12-02 08:54:48 +00:00 AGit
Owner

@⁠RUIZ-Enrique-25002136 on GitHub · 2026-12-02 08:33 UTC · original
RUIZ-Enrique-25002136:fix/verify-world-play-parity → main · +91 −16 · 3 files · 1 commits · merged 2026-12-02 08:49 UTC

Summary

Closes the remaining parity and A/B regression gate gaps tracked in #151 between scripts/verify-world.ps1, scripts/analyze-world-run.py, and the launcher defaults in apps/victory/src/play.rs.

Fixes #151

AI-Ready Context & Change Map

For downstream coding/review agents, here is the exact scope, symbol mapping, and invariant set of this PR:

  1. scripts/verify-world.ps1 — apps/victory/src/play.rs Environment Parity

    • Base $envVars block (scripts/verify-world.ps1:115-118):
      • Changed VICTORY_AMBIENT_AIR from '1.5' to '1' (matches apps/victory/src/play.rs:102).
      • Added VICTORY_BVH_MISS = '1' (matches apps/victory/src/play.rs:104; automatically ignored by the shader translator when VICTORY_BVH_BUILDER=1).
    • FrameGen / LowVram / PlayParity block (scripts/verify-world.ps1:167-193):
      • Captured $frameGenActive = $FrameGen -and $DlssMode -ne 'off' -and (Test-Path $slDir) so downstream checks know whether Streamline Frame Generation is actually active rather than merely requested.
      • Inside if ($LowVram -or $PlayParity):
        • Ungated VICTORY_TEXTURE_CATCHUP = '0' and VICTORY_TEXTURE_STAGE_MS = '16' from $LowVram so if ($Console -eq 'series-x') applies them under -PlayParity alone as well (matches apps/victory/src/play.rs:435-440).
        • Always set VICTORY_DSTORAGE_STAGING_MB = '64' (matches apps/victory/src/play.rs:444).
        • Always set VICTORY_SLOT_EVICT_PERCENT (84 if $frameGenActive, 85 if $is4k, else 86) and VICTORY_SLOT_EVICT_LOW_PERCENT (78 if $frameGenActive or $is4k, else 80) to match apps/victory/src/play.rs:427-434.
        • Set VICTORY_TEXTURE_ROOM_PERCENT = '88' whenever $is4k -or -not $frameGenActive (preserving '86' when $frameGenActive is active at non-4K, matching apps/victory/src/play.rs:388-396, 424-426).
        • Preserved VICTORY_CARD_BUFFERS_MB, VICTORY_CARD_WINDOWS_MB, VICTORY_CARD_ROOM_FOR_TARGETS_MB, and the -RayTracing overrides (VICTORY_RT_MEMORY_MB = '768', VICTORY_BVH_FAULTS_ALL = '8192').
  2. scripts/analyze-world-run.py — A/B Spike & Unsettled Flush Gates

    • A/B Pipeline drops non-regression (scripts/analyze-world-run.py:810-824):
      • Retained the median gate (perf["median_dropped_no_pipeline"] <= b_drop + 10.0).
      • Added a peak-spike gate when "max_dropped_no_pipeline" is present in baseline["performance"]: max_limit = max(int(b_drop_max * 1.25), b_drop_max + 20), requiring perf["max_dropped_no_pipeline"] <= max_limit. Falls back to the median-only check for older baseline JSONs that lack max_dropped_no_pipeline.
    • A/B Decoration bake sources non-regression (scripts/analyze-world-run.py:841-876):
      • Added flush_unsettled_events (settled=false in flushed deferred texture stand-ins before decoration bake) to the gate (bakes_latest["flush_unsettled_events"] <= b_unsettled) whenever "flush_unsettled_events" exists in baseline["bakes"].
      • Added an elif has_unsettled_check branch so regressions in flush_unsettled_events are still caught even when bakes == 0 in either run (decoration bakes' sources not yet emitted).
      • Preserved backwards compatibility when "flush_unsettled_events" is absent from older baseline JSONs.
  3. scripts/test_analyze_world_run.py — Unit Test Coverage

    • Added AnalyzeWorldRunTests.test_ab_pipeline_drop_spike_and_unsettled_bake_flush_gates covering:
      • Pass behavior when baseline and current match.
      • Detection of a single-window max_dropped_no_pipeline spike (10 -> 50) even when median_dropped_no_pipeline remains 10.0.
      • Detection of an extra settled=false flush event (flush_unsettled_events) both with and without decoration bakes' sources lines.

Rig Specs Tested On

  • CPU: Linux workstation (automated unit/policy verification only; no local Windows/Direct3D 12 runtime)
  • GPU & VRAM: N/A (not executed against a live GPU runtime)
  • System RAM: N/A
  • OS & GPU Driver: Linux (x86_64) — Windows verify-world.ps1 live execution and Windows CI checks deferred to GitHub Actions (windows-latest) / maintainer run

Run Settings & Profile

  • Build & Commit SHA: script/test changes on top of origin/main (c7d3102)
  • Console Profile & Internal Resolution / Scale: N/A (offline harness & Python analyzer unit tests)
  • Ray Tracing: N/A
  • Upscaling: N/A
  • Frame Generation: N/A
  • Launcher Command / Preset & Extra VICTORY_* Overrides: N/A
  • Scene / Area & Session Length: N/A

Measurements & Verification

  • Base FPS (without Frame Gen): N/A (offline unit tests)
  • Frame-Gen FPS (if enabled): N/A
  • VRAM / RAM Usage: N/A
  • Crashes / DRED Resets: N/A
  • Automated Checks:
    • cargo clippy --workspace --all-targets --locked -- -D warnings (requires x86_64-pc-windows-msvc; verified on GitHub Actions windows-latest CI)
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (requires x86_64-pc-windows-msvc; verified on GitHub Actions windows-latest CI)
    • cargo test --locked -p xtask -> 8 passed, 0 failed
    • cargo xtask policy -> asset policy: 321 files ok
    • python3 -B -m unittest scripts/test_analyze_world_run.py -v -> 9 passed, 0 failed
**@⁠RUIZ-Enrique-25002136** on GitHub · 2026-12-02 08:33 UTC · [original](https://github.com/Androtim/MiniVI/pull/307) `RUIZ-Enrique-25002136:fix/verify-world-play-parity` → `main` · +91 −16 · 3 files · 1 commits · merged 2026-12-02 08:49 UTC ## Summary Closes the remaining parity and A/B regression gate gaps tracked in #151 between `scripts/verify-world.ps1`, `scripts/analyze-world-run.py`, and the launcher defaults in `apps/victory/src/play.rs`. Fixes #151 ### AI-Ready Context & Change Map For downstream coding/review agents, here is the exact scope, symbol mapping, and invariant set of this PR: 1. **`scripts/verify-world.ps1` — `apps/victory/src/play.rs` Environment Parity** - **Base `$envVars` block (`scripts/verify-world.ps1:115-118`):** - Changed `VICTORY_AMBIENT_AIR` from `'1.5'` to `'1'` (matches `apps/victory/src/play.rs:102`). - Added `VICTORY_BVH_MISS = '1'` (matches `apps/victory/src/play.rs:104`; automatically ignored by the shader translator when `VICTORY_BVH_BUILDER=1`). - **FrameGen / `LowVram` / `PlayParity` block (`scripts/verify-world.ps1:167-193`):** - Captured `$frameGenActive = $FrameGen -and $DlssMode -ne 'off' -and (Test-Path $slDir)` so downstream checks know whether Streamline Frame Generation is actually active rather than merely requested. - Inside `if ($LowVram -or $PlayParity)`: - Ungated `VICTORY_TEXTURE_CATCHUP = '0'` and `VICTORY_TEXTURE_STAGE_MS = '16'` from `$LowVram` so `if ($Console -eq 'series-x')` applies them under `-PlayParity` alone as well (matches `apps/victory/src/play.rs:435-440`). - Always set `VICTORY_DSTORAGE_STAGING_MB = '64'` (matches `apps/victory/src/play.rs:444`). - Always set `VICTORY_SLOT_EVICT_PERCENT` (`84` if `$frameGenActive`, `85` if `$is4k`, else `86`) and `VICTORY_SLOT_EVICT_LOW_PERCENT` (`78` if `$frameGenActive` or `$is4k`, else `80`) to match `apps/victory/src/play.rs:427-434`. - Set `VICTORY_TEXTURE_ROOM_PERCENT = '88'` whenever `$is4k -or -not $frameGenActive` (preserving `'86'` when `$frameGenActive` is active at non-4K, matching `apps/victory/src/play.rs:388-396, 424-426`). - Preserved `VICTORY_CARD_BUFFERS_MB`, `VICTORY_CARD_WINDOWS_MB`, `VICTORY_CARD_ROOM_FOR_TARGETS_MB`, and the `-RayTracing` overrides (`VICTORY_RT_MEMORY_MB = '768'`, `VICTORY_BVH_FAULTS_ALL = '8192'`). 2. **`scripts/analyze-world-run.py` — A/B Spike & Unsettled Flush Gates** - **`A/B Pipeline drops non-regression` (`scripts/analyze-world-run.py:810-824`):** - Retained the median gate (`perf["median_dropped_no_pipeline"] <= b_drop + 10.0`). - Added a peak-spike gate when `"max_dropped_no_pipeline"` is present in `baseline["performance"]`: `max_limit = max(int(b_drop_max * 1.25), b_drop_max + 20)`, requiring `perf["max_dropped_no_pipeline"] <= max_limit`. Falls back to the median-only check for older baseline JSONs that lack `max_dropped_no_pipeline`. - **`A/B Decoration bake sources non-regression` (`scripts/analyze-world-run.py:841-876`):** - Added `flush_unsettled_events` (`settled=false` in `flushed deferred texture stand-ins before decoration bake`) to the gate (`bakes_latest["flush_unsettled_events"] <= b_unsettled`) whenever `"flush_unsettled_events"` exists in `baseline["bakes"]`. - Added an `elif has_unsettled_check` branch so regressions in `flush_unsettled_events` are still caught even when `bakes == 0` in either run (`decoration bakes' sources` not yet emitted). - Preserved backwards compatibility when `"flush_unsettled_events"` is absent from older baseline JSONs. 3. **`scripts/test_analyze_world_run.py` — Unit Test Coverage** - Added `AnalyzeWorldRunTests.test_ab_pipeline_drop_spike_and_unsettled_bake_flush_gates` covering: - Pass behavior when baseline and current match. - Detection of a single-window `max_dropped_no_pipeline` spike (`10 -> 50`) even when `median_dropped_no_pipeline` remains `10.0`. - Detection of an extra `settled=false` flush event (`flush_unsettled_events`) both with and without `decoration bakes' sources` lines. ## Rig Specs Tested On - **CPU:** Linux workstation (automated unit/policy verification only; no local Windows/Direct3D 12 runtime) - **GPU & VRAM:** N/A (not executed against a live GPU runtime) - **System RAM:** N/A - **OS & GPU Driver:** Linux (x86_64) — Windows `verify-world.ps1` live execution and Windows CI checks deferred to GitHub Actions (`windows-latest`) / maintainer run ## Run Settings & Profile - **Build & Commit SHA:** script/test changes on top of `origin/main` (`c7d3102`) - **Console Profile & Internal Resolution / Scale:** N/A (offline harness & Python analyzer unit tests) - **Ray Tracing:** N/A - **Upscaling:** N/A - **Frame Generation:** N/A - **Launcher Command / Preset & Extra `VICTORY_*` Overrides:** N/A - **Scene / Area & Session Length:** N/A ## Measurements & Verification - **Base FPS (without Frame Gen):** N/A (offline unit tests) - **Frame-Gen FPS (if enabled):** N/A - **VRAM / RAM Usage:** N/A - **Crashes / DRED Resets:** N/A - **Automated Checks:** - [ ] `cargo clippy --workspace --all-targets --locked -- -D warnings` (requires `x86_64-pc-windows-msvc`; verified on GitHub Actions `windows-latest` CI) - [ ] `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (requires `x86_64-pc-windows-msvc`; verified on GitHub Actions `windows-latest` CI) - [x] `cargo test --locked -p xtask` -> 8 passed, 0 failed - [x] `cargo xtask policy` -> `asset policy: 321 files ok` - [x] `python3 -B -m unittest scripts/test_analyze_world_run.py -v` -> 9 passed, 0 failed
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 08:33:32 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-02 08:49 UTC · original

Autonomous audit PASSED on 82a31fd7: aligns scripts/verify-world.ps1 with apps/victory/src/play.rs defaults and adds peak max_dropped_no_pipeline + flush_unsettled_events A/B regression gates with unit tests (9/9 pass, xtask policy clean, fixes #151). Squash-merging into main.

**@⁠Androtim** on GitHub · 2026-12-02 08:49 UTC · [original](https://github.com/Androtim/MiniVI/pull/307#issuecomment-7339979145) Autonomous audit **PASSED** on `82a31fd7`: aligns `scripts/verify-world.ps1` with `apps/victory/src/play.rs` defaults and adds peak `max_dropped_no_pipeline` + `flush_unsettled_events` A/B regression gates with unit tests (`9/9` pass, `xtask policy` clean, fixes `#151`). Squash-merging into `main`.
github-bot changed target branch from main to gh-pr/307/base 2026-12-02 08:54:46 +00:00
github manually merged commit 82a31fd7c8 into gh-pr/307/base 2026-12-02 08:54:48 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!307
No description provided.