Census: report directory traversal failures #115

Manually merged
github merged 1 commit from gh-pr/115/head into gh-pr/115/base 2026-11-26 03:50:49 +00:00
Owner

@⁠ZekkJJ on GitHub · 2026-11-24 00:38 UTC · original
ZekkJJ:codex/census-scan-errors → main · +49 −8 · 2 files · 1 commits · merged 2026-11-25 00:07 UTC

What

victory census discarded errors from the directory walker. A missing input path could exit successfully and report zero images and zero unreadable files.

Return a nonzero exit status with the path when a scan root fails. Report traversal errors within a readable root alongside skipped inputs while continuing to scan its other entries.

Tested

  • Windows 11 x64, Rust 1.98.1. The missing-path regression failed before the fix and passed after it. A valid input with no PE images still succeeds.
  • cargo test --locked --workspace -- --nocapture reported 247 passed, 0 failed, and 3 ignored. Four shader tests returned early because their compiler prerequisites were unavailable.
  • cargo clippy --locked -p victory --all-targets, rustfmt on both changed files, and cargo xtask policy passed.

AI assistance: Codex wrote the patch and tests and ran the checks. No game files were used.

**@⁠ZekkJJ** on GitHub · 2026-11-24 00:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/115) `ZekkJJ:codex/census-scan-errors` → `main` · +49 −8 · 2 files · 1 commits · merged 2026-11-25 00:07 UTC ## What `victory census` discarded errors from the directory walker. A missing input path could exit successfully and report zero images and zero unreadable files. Return a nonzero exit status with the path when a scan root fails. Report traversal errors within a readable root alongside skipped inputs while continuing to scan its other entries. ## Tested - Windows 11 x64, Rust 1.98.1. The missing-path regression failed before the fix and passed after it. A valid input with no PE images still succeeds. - `cargo test --locked --workspace -- --nocapture` reported 247 passed, 0 failed, and 3 ignored. Four shader tests returned early because their compiler prerequisites were unavailable. - `cargo clippy --locked -p victory --all-targets`, rustfmt on both changed files, and `cargo xtask policy` passed. AI assistance: Codex wrote the patch and tests and ran the checks. No game files were used.
Fail when a requested scan root cannot be opened. Report traversal errors below a readable root alongside the other skipped inputs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:50:47 +00:00
github manually merged commit b1bdd8994a into gh-pr/115/base 2026-11-26 03:50:49 +00:00
Author
Owner

@⁠noviw-rblx on GitHub · 2026-11-24 00:44 UTC · original

checked: #115 | with: cargo test -p victory --test census | on: Windows 10, Rust 1.98.1, head b1bdd899, CPU only | result: 2 passed (census_fails_when_a_requested_path_is_missing, census_accepts_a_valid_path_with_no_pe_images). No game data required.

**@⁠noviw-rblx** on GitHub · 2026-11-24 00:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/115#issuecomment-7118375682) checked: #115 | with: cargo test -p victory --test census | on: Windows 10, Rust 1.98.1, head b1bdd899, CPU only | result: 2 passed (census_fails_when_a_requested_path_is_missing, census_accepts_a_valid_path_with_no_pe_images). No game data required.
Author
Owner

@⁠ZekkJJ on GitHub · 2026-11-24 00:59 UTC · original

LGTM

**@⁠ZekkJJ** on GitHub · 2026-11-24 00:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/115#issuecomment-7118638851) LGTM
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 01:13 UTC · original

Tested b1bdd89: pass.

  • Tested the Windows build under Wine 11.22 on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1), cargo xwin test ... -p victory.
  • tests/census.rs: 2 passed. The app's own test (loader_lock_is_reentrant_and_exclusive) also passes.

No game data used.

**@⁠DaviTostes** on GitHub · 2026-11-24 01:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/115#issuecomment-7118881489) Tested `b1bdd89`: **pass**. - Tested the Windows build under **Wine 11.22** on Arch Linux x86_64 (AMD RX 9060 XT, RADV 26.3.1), `cargo xwin test ... -p victory`. - `tests/census.rs`: 2 passed. The app's own test (`loader_lock_is_reentrant_and_exclusive`) also passes. No game data used.
Author
Owner

@⁠KevinPratap on GitHub · 2026-11-24 07:22 UTC · original

These census tests fail once #535 (asset-policy check in default_paths) is merged too, because they census the crate's own Cargo.toml, inside the source tree. Fix against this branch, verified alone and with #535: https://github.com/ZekkJJ/VIctory/pull/1. AI-assisted.

**@⁠KevinPratap** on GitHub · 2026-11-24 07:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/115#issuecomment-7124913071) These census tests fail once #535 (asset-policy check in `default_paths`) is merged too, because they census the crate's own `Cargo.toml`, inside the source tree. Fix against this branch, verified alone and with #535: https://github.com/ZekkJJ/VIctory/pull/1. AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!115
No description provided.