fix(census): report unreadable files during PE detection #1863
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1863
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1863/head"
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?
@Damokles2 on GitHub · 2026-11-24 23:45 UTC · original
Damokles2:fix-census-unreadable-files→main· +84 −7 · 2 files · 1 commits · merged 2026-11-25 21:52 UTCSummary
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.
@oddmaniv on GitHub · 2026-11-25 00:56 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 07:26 UTC · original · edited 2026-11-25 11:21 UTC
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
@Damokles2 on GitHub · 2026-11-25 09:20 UTC · original
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.
@cloph-dsp on GitHub · 2026-11-25 11:09 UTC · original
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.