Scripts: validate DXIL in coverage gate sweeps #2204

Closed
github-bot wants to merge 1 commit from gh-pr/2204/head into gh-pr/2204/base
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 09:32 UTC · original
luckyteagirl:codex/coverage-validate → main · +20 −4 · 2 files · 1 commits · closed without merging

Fixes #2196. The coverage gate checked validator_failed but never asked the direct shader sweep to validate DXIL, leaving that regression check ineffective.

What is in it

  • scripts/coverage_gate.py passes --validate to the complete direct sweep and documents the validated command.
  • scripts/test_coverage_gate.py checks the command the gate launches. It failed before the flag was added and passes now.

Tested

  • Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. Debug workspace and release xcl builds passed.
  • python -m pytest scripts/ -q: 26 passed. git diff --check: clean.
  • python scripts/coverage_gate.py --update --xcl <main-release-xcl> --rpf <owned-shader-pack> --threads 4: completed against all 22,445 programs. CS 1,636; GS 390; MS 8,724; PS 9,511; VS 2,184. All translated and validated, with 0 validator failures, panics or timeouts. Regenerating tests/data/coverage-baseline.json produced no diff. The main binary was built from 6020a33b, whose crates/xcl tree is identical to current main 568e7db (only README and SVG changed).
  • python scripts/coverage_gate.py --xcl <this-head-release-xcl> --rpf <same-owned-shader-pack> --threads 4: coverage gate: no regressions.
  • cargo build --locked --workspace -j 2 then cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-output with XCL_ADAPTER=6800M: 992 passed, 161 failed, 46 ignored; 23 explicit SKIPPED messages. The library GPU failures followed RX 6800M device suspension 0x887A0005; all three e2e tests passed. The whole GPU suite is not green.

Not tested

  • A real validator failure from the owned pack: all 22,445 programs validated. The existing comparison unit test covers an increased validator_failed count. Other GPUs and newer drivers were not tested. This changes a script only, so no title smoke was needed.

AI use

OpenAI Codex (GPT-6; exact variant not exposed in this session) wrote the script change and regression test, ran the Windows builds, Python tests, full owned-pack sweeps and GPU suite, and drafted this description. No game data was committed.

**@⁠luckyteagirl** on GitHub · 2026-11-25 09:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204) `luckyteagirl:codex/coverage-validate` → `main` · +20 −4 · 2 files · 1 commits · closed without merging Fixes #2196. The coverage gate checked `validator_failed` but never asked the direct shader sweep to validate DXIL, leaving that regression check ineffective. **What is in it** - `scripts/coverage_gate.py` passes `--validate` to the complete direct sweep and documents the validated command. - `scripts/test_coverage_gate.py` checks the command the gate launches. It failed before the flag was added and passes now. **Tested** - Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. Debug workspace and release `xcl` builds passed. - `python -m pytest scripts/ -q`: **26 passed**. `git diff --check`: clean. - `python scripts/coverage_gate.py --update --xcl <main-release-xcl> --rpf <owned-shader-pack> --threads 4`: completed against all **22,445** programs. CS 1,636; GS 390; MS 8,724; PS 9,511; VS 2,184. All translated and validated, with **0 validator failures**, panics or timeouts. Regenerating `tests/data/coverage-baseline.json` produced no diff. The main binary was built from `6020a33b`, whose `crates/xcl` tree is identical to current main `568e7db` (only README and SVG changed). - `python scripts/coverage_gate.py --xcl <this-head-release-xcl> --rpf <same-owned-shader-pack> --threads 4`: **coverage gate: no regressions**. - `cargo build --locked --workspace -j 2` then `cargo test --locked --workspace --no-fail-fast -j 2 -- --test-threads=4 --show-output` with `XCL_ADAPTER=6800M`: **992 passed, 161 failed, 46 ignored; 23 explicit SKIPPED messages**. The library GPU failures followed RX 6800M device suspension `0x887A0005`; all three e2e tests passed. The whole GPU suite is not green. **Not tested** - A real validator failure from the owned pack: all 22,445 programs validated. The existing comparison unit test covers an increased `validator_failed` count. Other GPUs and newer drivers were not tested. This changes a script only, so no title smoke was needed. **AI use** OpenAI Codex (GPT-6; exact variant not exposed in this session) wrote the script change and regression test, ran the Windows builds, Python tests, full owned-pack sweeps and GPU suite, and drafted this description. No game data was committed.
The gate compared validator_failed counts without asking the direct sweep to run the validator. Pass --validate and cover the spawned command with a regression test. A full 22,445-program sweep on the owned shader pack confirmed the baseline counts remain unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:23:06 +00:00
github-bot closed this pull request 2026-11-26 05:23:06 +00:00
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:45 UTC · original

Code review on 17f5284:

  • Adding --validate to scripts/coverage_gate.py's xcl shaders invocation alongside GateCommandTests::test_gate_sweep_enables_validation cleanly enforces DXIL validation during baseline sweeps.
  • Note overlap with #2202 (9b834ce), which modifies the same coverage_gate.py command.
  • Diff audited and CI workflow approved (running).

Remaining before merge: Build and test finishing green plus independent verification on 17f5284.

**@⁠raylitebull** on GitHub · 2026-11-25 10:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7160120971) Code review on `17f5284`: - Adding `--validate` to `scripts/coverage_gate.py`'s `xcl shaders` invocation alongside `GateCommandTests::test_gate_sweep_enables_validation` cleanly enforces DXIL validation during baseline sweeps. - Note overlap with `#2202` (`9b834ce`), which modifies the same `coverage_gate.py` command. - Diff audited and CI workflow approved (running). **Remaining before merge:** `Build and test` finishing green plus independent verification on `17f5284`.
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 13:05 UTC · original · edited 2026-11-25 13:09 UTC

Tested 17f52840413fe857ff604d762cf91886a4a5e2ca on Windows 11 24H2 (26100.9711), Python 3.14.3, i7-13700.

Tested

  • python -B -m unittest discover -s scripts -p test_coverage_gate.py: 10 passed, 0 failed, 0 skipped.
  • Ran the coverage CLI with a temporary .cmd standing in for XCL. It recorded the actual arguments and emitted stage JSON. The PR forwarded --validate, --sample 0 and --threads 2. The base omitted --validate. A report increasing one stage's validator failures made the patched CLI exit 1.
  • With the production changes from #2265 applied alongside this PR, this PR's test_gate_sweep_enables_validation failed: the mock's returncode is a MagicMock, so the failed-sweep check returns 2 on the test's success case. Setting run_sweep.return_value.returncode = 0 fixes the fixture. One-line follow-up on this exact head.
  • With that one line, all 10 tests passed on this PR alone. I also combined the three production-script changes from #2204, #2253 and #2265 in a temporary directory and ran each PR's coverage test module against that script: 31 test executions passed, including the shared cases repeated by those modules.

Not tested

DXIL validation by a real DXC, the Rust/GPU suite or retail shader packs.

AI use

OpenAI Codex (GPT-6) ran the checks, prepared the one-line fixture change and drafted this report.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 13:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7163280432) · edited 2026-11-25 13:09 UTC Tested `17f52840413fe857ff604d762cf91886a4a5e2ca` on Windows 11 24H2 (26100.9711), Python 3.14.3, i7-13700. **Tested** - `python -B -m unittest discover -s scripts -p test_coverage_gate.py`: 10 passed, 0 failed, 0 skipped. - Ran the coverage CLI with a temporary `.cmd` standing in for XCL. It recorded the actual arguments and emitted stage JSON. The PR forwarded `--validate`, `--sample 0` and `--threads 2`. The base omitted `--validate`. A report increasing one stage's validator failures made the patched CLI exit 1. - With the production changes from #2265 applied alongside this PR, this PR's `test_gate_sweep_enables_validation` failed: the mock's `returncode` is a `MagicMock`, so the failed-sweep check returns 2 on the test's success case. Setting `run_sweep.return_value.returncode = 0` fixes the fixture. [One-line follow-up on this exact head](https://github.com/RavenCurseBurg/xcl/commit/b31b96b6bfdac71ff9e7b20c1f53871532a5fb0a). - With that one line, all 10 tests passed on this PR alone. I also combined the three production-script changes from #2204, #2253 and #2265 in a temporary directory and ran each PR's coverage test module against that script: 31 test executions passed, including the shared cases repeated by those modules. **Not tested** DXIL validation by a real DXC, the Rust/GPU suite or retail shader packs. **AI use** OpenAI Codex (GPT-6) ran the checks, prepared the one-line fixture change and drafted this report.
Author
Owner

@⁠jennydeth on GitHub · 2026-11-25 14:45 UTC · original

NVIDIA / Windows run.

Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head 17f5284.

Result: cargo test --workspace -- --test-threads=4: 1154 passed, 0 failed, 46 ignored. SKIPPED: 18 GPU tests for no wave64 (expected on this card) and the usual per-lane / heap-window / driver-cache skips.

Not tested: the coverage gate script itself on a shader pack (no pack used).

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠jennydeth** on GitHub · 2026-11-25 14:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7165775618) NVIDIA / Windows run. Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head 17f5284. Result: cargo test --workspace -- --test-threads=4: 1154 passed, 0 failed, 46 ignored. SKIPPED: 18 GPU tests for no wave64 (expected on this card) and the usual per-lane / heap-window / driver-cache skips. Not tested: the coverage gate script itself on a shader pack (no pack used). AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 15:54 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 15:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7167418712) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 18:28 UTC · original

Review note on 17f5284: note overlap with #2202 (9b834ce, same #2196 fix in scripts/coverage_gate.py) and @RavenCurseBurg's finding in test_gate_sweep_enables_validation (run_sweep.return_value.returncode = 0 needed for compatibility if #2265's returncode check lands).

**@⁠raylitebull** on GitHub · 2026-11-25 18:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7170957278) Review note on `17f5284`: note overlap with `#2202` (`9b834ce`, same `#2196` fix in `scripts/coverage_gate.py`) and `@RavenCurseBurg`'s finding in `test_gate_sweep_enables_validation` (`run_sweep.return_value.returncode = 0` needed for compatibility if `#2265`'s returncode check lands).
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 20:43 UTC · original

Thanks for the review and independent test runs. #2202 covers the same #2196 fix, has green CI, live shader-pack verification, and an AMD check. Its sweep_command test also avoids the mocked-return-code incompatibility found when #2265 is combined with this PR.

I’m closing #2204 to leave one implementation for the maintainer to review. No part of this branch needs to be merged separately.

AI use: OpenAI Codex (GPT-6; exact variant unavailable) compared the current PR discussions and drafted this coordination note.

**@⁠luckyteagirl** on GitHub · 2026-11-25 20:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7174099217) Thanks for the review and independent test runs. #2202 covers the same #2196 fix, has green CI, live shader-pack verification, and an AMD check. Its `sweep_command` test also avoids the mocked-return-code incompatibility found when #2265 is combined with this PR. I’m closing #2204 to leave one implementation for the maintainer to review. No part of this branch needs to be merged separately. AI use: OpenAI Codex (GPT-6; exact variant unavailable) compared the current PR discussions and drafted this coordination note.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.