tests: enforce DXIL validator loading in strict VALU builds #132

Open
github-bot wants to merge 1 commit from github-bot/gh-132 into main AGit
Owner

@⁠lmouz823-lang on GitHub · 2026-11-27 15:29 UTC · original
lmouz823-lang:fix/strict-dxil-validator-load → main · +8 −5 · 1 files · 1 commits · open

Summary

Fixes #131. valu_tests::build_cs silently ignored a validator DLL load error even with VICTORY_STRICT_TESTS=1, so a strict run could pass without DXIL validation or the container-hash check. Route that error through the existing skip policy:

build_cs → load validator
  success → validate DXIL and check container hash (unchanged)
  error   → strict: fail before GPU execution
            ordinary: report omitted validation, continue as before

One test helper changes (+8/-5). The separate wave-test helper and production runtime are outside this fix.

Evidence

The existing exact test emit::valu_tests::packed_add_selects_halves_of_inline_constants ran in fresh processes on Windows 11, Rust 1.98.1 MSVC, RTX 4060 Laptop (610.88) and WARP. Base: 15779f8197fe846b0cdf4509c15a8ef00433e216.

Source / configuration Observed result
Before, strict + nonexistent DLL 1 passed, exit 0, both backends; silently omitted validation
After, strict + same nonexistent DLL 0 passed / 1 failed, exit 101; explicit load error before GPU initialization
After, ordinary + same nonexistent DLL 1 passed, exit 0, both backends; explicit VICTORY TEST SKIPPED: DXIL validation unavailable (partial validation)
After, strict + SDK DLL 1.8.2502.11 1 passed, exit 0, both backends, no skip; validation and hash assertions pass

Reproduce each configuration with this exact command (requires the project's Windows build prerequisites):

$caseArgs = @('test', '--release', '--locked', '-p', 'victory-shader', '--lib',
  'emit::valu_tests::packed_add_selects_halves_of_inline_constants',
  '--', '--exact', '--nocapture', '--test-threads=1')
$missing = Join-Path $PWD 'intentionally-missing-dxil.dll'
if (Test-Path -LiteralPath $missing) { throw 'Choose a DLL path that does not exist.' }
$env:VICTORY_DXIL = $missing
$env:VICTORY_STRICT_TESTS = '1'
cargo @caseArgs # before: exit 0; after: expected exit 101
Remove-Item Env:VICTORY_STRICT_TESTS
cargo @caseArgs # after: explicit skip diagnostic, GPU execution retained
$env:VICTORY_STRICT_TESTS = '1'
$env:VICTORY_DXIL = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\dxil.dll'
cargo @caseArgs # use an installed SDK path: exit 0, no skip

git diff --check passes; cargo run --release --locked -p xtask -- policy reports asset policy: 198 files ok. Independent review found no issues. Whole-file rustfmt check exits 1 on both base and patch with the same pre-existing formatting differences; this patch adds none. Full workspace CI and game performance were not tested locally.

Merge Danger

Door: two-way. A single test-helper change can be reverted.

Blast Radius: tests. Strict callers of this helper now require a loadable DXIL validator, as intended; ordinary runs gain a diagnostic. No runtime code or game data changes.

AI assistance: Codex implemented the patch, ran the checks and drafted this report.

**@⁠lmouz823-lang** on GitHub · 2026-11-27 15:29 UTC · [original](https://github.com/uiliannn/VItoriaBr/pull/132) `lmouz823-lang:fix/strict-dxil-validator-load` → `main` · +8 −5 · 1 files · 1 commits · open ## Summary Fixes #131. `valu_tests::build_cs` silently ignored a validator DLL load error even with `VICTORY_STRICT_TESTS=1`, so a strict run could pass without DXIL validation or the container-hash check. Route that error through the existing skip policy: ```text build_cs → load validator success → validate DXIL and check container hash (unchanged) error → strict: fail before GPU execution ordinary: report omitted validation, continue as before ``` One test helper changes (+8/-5). The separate wave-test helper and production runtime are outside this fix. ## Evidence The existing exact test `emit::valu_tests::packed_add_selects_halves_of_inline_constants` ran in fresh processes on Windows 11, Rust 1.98.1 MSVC, RTX 4060 Laptop (610.88) and WARP. Base: `15779f8197fe846b0cdf4509c15a8ef00433e216`. | Source / configuration | Observed result | | --- | --- | | **Before**, strict + nonexistent DLL | 1 passed, exit 0, both backends; silently omitted validation | | **After**, strict + same nonexistent DLL | 0 passed / 1 failed, exit 101; explicit load error before GPU initialization | | **After**, ordinary + same nonexistent DLL | 1 passed, exit 0, both backends; explicit `VICTORY TEST SKIPPED: DXIL validation unavailable` (partial validation) | | **After**, strict + SDK DLL 1.8.2502.11 | 1 passed, exit 0, both backends, no skip; validation and hash assertions pass | Reproduce each configuration with this exact command (requires the project's Windows build prerequisites): ```powershell $caseArgs = @('test', '--release', '--locked', '-p', 'victory-shader', '--lib', 'emit::valu_tests::packed_add_selects_halves_of_inline_constants', '--', '--exact', '--nocapture', '--test-threads=1') $missing = Join-Path $PWD 'intentionally-missing-dxil.dll' if (Test-Path -LiteralPath $missing) { throw 'Choose a DLL path that does not exist.' } $env:VICTORY_DXIL = $missing $env:VICTORY_STRICT_TESTS = '1' cargo @caseArgs # before: exit 0; after: expected exit 101 Remove-Item Env:VICTORY_STRICT_TESTS cargo @caseArgs # after: explicit skip diagnostic, GPU execution retained $env:VICTORY_STRICT_TESTS = '1' $env:VICTORY_DXIL = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\dxil.dll' cargo @caseArgs # use an installed SDK path: exit 0, no skip ``` `git diff --check` passes; `cargo run --release --locked -p xtask -- policy` reports `asset policy: 198 files ok`. Independent review found no issues. Whole-file rustfmt check exits 1 on both base and patch with the same pre-existing formatting differences; this patch adds none. Full workspace CI and game performance were not tested locally. ## Merge Danger **Door:** two-way. A single test-helper change can be reverted. **Blast Radius:** tests. Strict callers of this helper now require a loadable DXIL validator, as intended; ordinary runs gain a diagnostic. No runtime code or game data changes. AI assistance: Codex implemented the patch, ran the checks and drafted this report.
Route the build_cs validator load failure through test_skip::skip. Strict tests now fail before GPU execution; ordinary runs report the omitted validation and retain their existing behavior. Successful validation and container-hash checks are unchanged.

Refs uiliannn/VItoriaBr#131. AI-assisted with Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 15:34:41 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/132/head:github-bot/gh-132'
git switch 'github-bot/gh-132'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-132'
git switch 'github-bot/gh-132'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-132'
git switch 'github-bot/gh-132'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-132'
git switch 'main'
git merge --squash 'github-bot/gh-132'
git switch 'main'
git merge --ff-only 'github-bot/gh-132'
git switch 'main'
git merge 'github-bot/gh-132'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.