Scripts: validate DXIL in coverage gate sweeps #2194

Closed
luckyteagirl wants to merge 1 commit from upstream-pr/2204 into main
luckyteagirl commented 2026-11-25 09:32:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T09:32:06Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6601408669 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T09:32:06Z. --- 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.
raylitebull commented 2026-11-25 11:09:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:45:01Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7160120971 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7160120971). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T10:45:01Z. --- 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`.
RavenCurseBurg commented 2026-11-25 14:09:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T13:05:36Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7163280432 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7163280432). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T13:05:36Z. --- 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.
jennydeth commented 2026-11-25 15:07:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T14:45:48Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7165775618 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7165775618). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-25T14:45:48Z. --- 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.
DavidM1911 commented 2026-11-25 16:12:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T15:54:27Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7167418712 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7167418712). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T15:54:27Z. --- 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!
raylitebull commented 2026-11-25 19:09:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T18:28:31Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7170957278 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7170957278). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T18:28:31Z. --- 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).
upstream-sync closed this pull request 2026-11-25 21:04:03 +00:00
luckyteagirl commented 2026-11-25 21:05:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T20:43:31Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7174099217 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2204#issuecomment-7174099217). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T20:43:31Z. --- 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

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
xcl-dev/xcl!2194
No description provided.