gpu: isolate pixel-history fixture from inherited dump diagnostics #2869

Manually merged
github merged 1 commit from github-bot/gh-2869 into gh-pr/2869/base 2026-11-27 04:46:07 +00:00 AGit
Owner

@⁠chadhyatt on GitHub · 2026-11-26 15:01 UTC · original
chadhyatt:backport/pixel-history-env → main · +2 −0 · 1 files · 1 commits · merged 2026-11-27 04:45 UTC

AI-assisted backport patch from x2w-microlift.

The absent-switch full-dump control in startup_pixel_history_draw_check.py copies the parent environment. Inherited pixel, frame or dump-directory diagnostics change the case being exercised. Strip the three inherited switches from the fixture base environment before applying explicit per-case values. Preserve every existing readback assertion. Refs #2843/#2851.

Verification at 135da308dd on macOS ARM64: Python AST parse passed. Evaluated only the existing base-environment construction from the old and new source with all three parent variables set: before retained all three, after none, unrelated debug and explicit cache values preserved. No renderer process executed. Windows WARP/hardware check remains ctest --preset dev --no-tests=error -R "^startup_pixel_history_draw_" -V.

**@⁠chadhyatt** on GitHub · 2026-11-26 15:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2869) `chadhyatt:backport/pixel-history-env` → `main` · +2 −0 · 1 files · 1 commits · merged 2026-11-27 04:45 UTC AI-assisted backport patch from x2w-microlift. The absent-switch full-dump control in `startup_pixel_history_draw_check.py` copies the parent environment. Inherited pixel, frame or dump-directory diagnostics change the case being exercised. Strip the three inherited switches from the fixture base environment before applying explicit per-case values. Preserve every existing readback assertion. Refs #2843/#2851. Verification at `135da308dd` on macOS ARM64: Python AST parse passed. Evaluated only the existing base-environment construction from the old and new source with all three parent variables set: before retained all three, after none, unrelated debug and explicit cache values preserved. No renderer process executed. Windows WARP/hardware check remains `ctest --preset dev --no-tests=error -R "^startup_pixel_history_draw_" -V`.
- Remove inherited dump switches before applying each case-specific configuration, preserving the absent-switch control.
- AI-assisted backport patch from x2w-microlift.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:27:25 +00:00
Author
Owner

@⁠KelboLive on GitHub · 2026-11-26 20:55 UTC · original · reviewed

Isolating this fixture from global dump diagnostics is solid hygiene. When X2W_DRAW_DUMP* variables leak from other sessions they can silently alter test behavior or pollute the output directory. Clearing them at scope time keeps the check deterministic.

One small observation: base_env.pop(name, None) silently drops any inherited value, which is exactly what you want here. If you ever want to detect accidental leakage during development you could add a X2W_TEST_STRICT_DUMP="1" mode that logs unclean env vars — but that's optional and can wait until maintenance.

No other concerns for this change.

**@⁠KelboLive** on GitHub · 2026-11-26 20:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2869#pullrequestreview-6080392797) · **reviewed** Isolating this fixture from global dump diagnostics is solid hygiene. When `X2W_DRAW_DUMP*` variables leak from other sessions they can silently alter test behavior or pollute the output directory. Clearing them at scope time keeps the check deterministic. One small observation: `base_env.pop(name, None)` silently drops any inherited value, which is exactly what you want here. If you ever want to detect accidental leakage during development you could add a `X2W_TEST_STRICT_DUMP="1"` mode that logs unclean env vars — but that's optional and can wait until maintenance. No other concerns for this change.
Author
Owner

@⁠chadhyatt on GitHub · 2026-11-26 21:40 UTC · original

Thanks for the review. Agreed on keeping the fixture scoped to the existing isolation behavior; an additional diagnostic mode is separate maintenance work.

**@⁠chadhyatt** on GitHub · 2026-11-26 21:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2869#issuecomment-7203946014) Thanks for the review. Agreed on keeping the fixture scoped to the existing isolation behavior; an additional diagnostic mode is separate maintenance work.
github-bot changed target branch from main to gh-pr/2869/base 2026-11-27 04:46:04 +00:00
github manually merged commit 135da308dd into gh-pr/2869/base 2026-11-27 04:46:07 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-27 04:44 UTC · original · approved these changes

Reviewed 135da308dd658417f6c593c30949c812f8f14058. This clears inherited diagnostics from the fixture environment while preserving its explicit case settings. On Windows 11 build 26200.9974 the Release startup_pixel_history_draw_(warp|hardware) tests both passed with inherited pixel 6,1, frame 999 and a separate dump directory (WARP 10.0.26100.9818, RTX 4060 Laptop 32.0.16.1656). With the same binaries and environment, the unpatched script failed on WARP at the full-dump assertion because it wrote pixel_history.txt. Required Windows CI passed.

**@⁠R0Y00** on GitHub · 2026-11-27 04:44 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2869#pullrequestreview-6083588316) · **approved these changes** Reviewed `135da308dd658417f6c593c30949c812f8f14058`. This clears inherited diagnostics from the fixture environment while preserving its explicit case settings. On Windows 11 build 26200.9974 the Release `startup_pixel_history_draw_(warp|hardware)` tests both passed with inherited pixel `6,1`, frame `999` and a separate dump directory (WARP 10.0.26100.9818, RTX 4060 Laptop 32.0.16.1656). With the same binaries and environment, the unpatched script failed on WARP at the full-dump assertion because it wrote `pixel_history.txt`. Required Windows CI passed.
Author
Owner

@⁠chadhyatt on GitHub · 2026-11-27 04:45 UTC · original

Thanks for the exact-head Windows verification and unchanged-binary negative control. Recorded the approval; no further changes from my side.

**@⁠chadhyatt** on GitHub · 2026-11-27 04:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2869#issuecomment-7210073125) Thanks for the exact-head Windows verification and unchanged-binary negative control. Recorded the approval; no further changes from my side.
This discussion has been locked. Commenting is limited to contributors.
No description provided.