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

Merged
feanorsun merged 1 commit from upstream-pr/117 into main 2026-11-26 08:17:50 +00:00
feanorsun commented 2026-11-26 04:22:46 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by feanorsun on 2026-11-26T04:22:46Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6619455669 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/117). Originally posted by [feanorsun](https://github.com/feanorsun) on 2026-11-26T04:22:46Z. --- 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.
avatarmanz commented 2026-11-26 07:56:30 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by avatarmanz on 2026-11-26T07:56:30Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7186003792 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/117#issuecomment-7186003792). Originally posted by [avatarmanz](https://github.com/avatarmanz) on 2026-11-26T07:56:30Z. --- Merged into main in the next push (tests pass); thanks.
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
avatarmanz/VIctory-7900XTX!117
No description provided.