Report file scan outcomes in shader-info and shaders #117

Manually merged
github merged 1 commit from github-bot/gh-117 into main 2026-11-26 08:21:45 +00:00 AGit
Owner

@⁠feanorsun on GitHub · 2026-11-26 04:22 UTC · original
feanorsun:fix/shader-scan-summary → main · +233 −26 · 6 files · 1 commits · merged 2026-11-26 08:17 UTC

Closes #29

victory shader-info and victory shaders now print how many files they successfully read alongside their existing shader totals. The summary distinguishes a complete scan, a scan limited by file size, and a scan with I/O errors. It also shows when both limits and errors affected the same scan.

Both commands use the same scanner. It counts traversal errors, metadata failures, read failures, and files over the 2 GiB limit separately. A failure to traverse a subtree counts once, regardless of how many files it might contain. Directories do not contribute to the file count. Successfully read files go through the existing shader analysis, deduplication, translation, and cache code.

shader-info -v (or --verbose) prints skipped paths and reasons. In diagnostics builds, VICTORY_LOG=debug exposes the same details for either command.

Tests

cargo test --locked -j 1 -p victory --bin victory shader::scan::tests:: -- --test-threads=1 --list
cargo test --locked -j 1 -p victory --bin victory shader::scan::tests:: -- --test-threads=1 --nocapture

On Windows, the first command listed 6 targeted CPU tests. The second command ran all 6. All 6 passed, and 10 unrelated tests were filtered out. The tests used temporary directories to cover nested and empty files, an empty directory, a missing root followed by a valid root, a controlled metadata failure, and a file removed between metadata lookup and read. The oversized-file case used a 4-byte limit and a 5-byte file. No game, GPU, D3D12, or WARP session was started.

**@⁠feanorsun** on GitHub · 2026-11-26 04:22 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/117) `feanorsun:fix/shader-scan-summary` → `main` · +233 −26 · 6 files · 1 commits · merged 2026-11-26 08:17 UTC Closes #29 `victory shader-info` and `victory shaders` now print how many files they successfully read alongside their existing shader totals. The summary distinguishes a complete scan, a scan limited by file size, and a scan with I/O errors. It also shows when both limits and errors affected the same scan. Both commands use the same scanner. It counts traversal errors, metadata failures, read failures, and files over the 2 GiB limit separately. A failure to traverse a subtree counts once, regardless of how many files it might contain. Directories do not contribute to the file count. Successfully read files go through the existing shader analysis, deduplication, translation, and cache code. `shader-info -v` (or `--verbose`) prints skipped paths and reasons. In diagnostics builds, `VICTORY_LOG=debug` exposes the same details for either command. ## Tests ```powershell cargo test --locked -j 1 -p victory --bin victory shader::scan::tests:: -- --test-threads=1 --list cargo test --locked -j 1 -p victory --bin victory shader::scan::tests:: -- --test-threads=1 --nocapture ``` On Windows, the first command listed 6 targeted CPU tests. The second command ran all 6. All 6 passed, and 10 unrelated tests were filtered out. The tests used temporary directories to cover nested and empty files, an empty directory, a missing root followed by a valid root, a controlled metadata failure, and a file removed between metadata lookup and read. The oversized-file case used a 4-byte limit and a 5-byte file. No game, GPU, D3D12, or WARP session was started.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:24:49 +00:00
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:56 UTC · original

Merged into main in the next push (tests pass); thanks.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:56 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/117#issuecomment-7186003792) Merged into main in the next push (tests pass); thanks.
github manually merged commit bd687863bf into main 2026-11-26 08:21:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.