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

Merged
chadhyatt merged 1 commit from upstream-pr/2869 into main 2026-11-27 04:45:05 +00:00
chadhyatt commented 2026-11-26 15:01:39 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T15:01:39Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5512378162 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2869). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-26T15:01:39Z. --- 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`.
KelboLive commented 2026-11-26 20:55:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T20:55:32Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6080392797 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2869#pullrequestreview-6080392797). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-26T20:55:32Z. **Review:** COMMENTED --- 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.
chadhyatt commented 2026-11-26 21:40:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T21:40:04Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7203946014 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2869#issuecomment-7203946014). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-26T21:40:04Z. --- Thanks for the review. Agreed on keeping the fixture scoped to the existing isolation behavior; an additional diagnostic mode is separate maintenance work.
R0Y00 commented 2026-11-27 04:44:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T04:44:27Z.

Review: APPROVED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6083588316 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2869#pullrequestreview-6083588316). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T04:44:27Z. **Review:** APPROVED --- 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.
chadhyatt commented 2026-11-27 04:45:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-27T04:45:41Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7210073125 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2869#issuecomment-7210073125). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-27T04:45:41Z. --- Thanks for the exact-head Windows verification and unchanged-binary negative control. Recorded the approval; no further changes from my side.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
R0Y00/Xbox2Windows!2861
No description provided.