fix(census): report unreadable files during PE detection #1861
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1863"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Damokles2 on 2026-11-24T23:45:55Z.
Summary
looks_like_pe()instead of silently treating unreadable files as non-PE files.unreadablemechanism.Testing
ERROR_SHARING_VIOLATION(Win32 error 32).git diff --checkand targeted formatting checks.The regression test uses synthetic files and requires no game assets.
Additional notes
This addresses file-read failures after directory traversal, separately from the traversal errors covered by #115.
AI-assisted using OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:48Z.
Review: COMMENTED
Static review only: apps-side census tool; reviewed from the diff.
census: report unreadable files during PE detection instead of skipping silently: error reporting fix in the census tool. apps-side.
Imported from Marvisak/VIctory. Originally posted by oddmaniv on 2026-11-25T00:56:36Z.
Independently tested @Damokles2’s fix on native Windows with Rust 1.98.1 in two configurations:
Exact current PR head —
0e4c06ccargo test --locked -p victorypassed.Earlier patch adapted onto main —
e9b2873adapted to02deab11 images scanned, 0 unreadable).1 images scanned, 1 unreadable), including a repeat run. The directory test also verifies continued scanning of a readable sibling.Both configurations passed workspace Clippy—all targets, default and all features, warnings denied—and asset policy. The adaptation also passed changed-file formatting checks.
The full workspace test suite was not run. Synthetic fixtures only; no game data or game/GPU execution. AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T07:26:13Z.
Automated triage for the maintainers.
Merge candidate. No change since the last triage (head still
c0af92a).looks_like_peinapps/victory/src/census.rsreturnsio::Result<bool>, andrunadds open/read errors other thanUnexpectedEofto the existingfailedlist, which prints as "unreadable"/"skipped", then keeps scanning. Empty, short and non-PE files are still skipped silently, as onmain. The Windows-only testapps/victory/tests/census_unreadable.rslocks a synthetic PE with share mode 0 and expects1 images scanned, 1 unreadable. CI: passing (check).On your reply: thanks, nothing more is needed. @cloph-dsp reports that the new test passes on native Windows at this head, which covers the run your local policy blocked.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Damokles2 on 2026-11-25T09:20:24Z.
Thanks for the review! I've updated the existing PR branch with a clean commit (
c0af92a) directly on upstream main.The PR now contains only the census fix and its Windows regression test, using the current
Vec<String>error format.Formatting and strict Windows-MSVC Clippy passed. The tests compiled, but local Windows Application Control blocked their execution (OS error 4551).
AI-assisted using OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T11:09:11Z.
Independent local validation (Windows, Rust 1.100.0/MSVC, head
c0af92a, no game data):cargo test --locked -p victory --test census_unreadable-> 1 test passed (census_reports_unreadable_files_and_continues_scanning), exit 0;cargo test --locked -p victory-> 53 tests passed, exit 0. Caveat: my capture of the main940d32fbaseline was truncated, so I cannot compare total test counts directly; the new test itself passes here. Author reported this head not runnable under App Control/OS 4551, but it ran here. Windows exclusive-share handle semantics may still differ from Wine/Linux. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only tests). No game data used.