Repository navigation
HLE: guard XGameSave version overflow and validate blobs before removing older versions - #2525
reeledMarek wants to merge 1 commit into
Conversation
…ing older versions
|
Verification (Windows 11, WARP/CPU only) — head Tested: the PR head =
Diff read: the Side by side with #2511 (head AI use: Claude Code (Claude Sonnet 5.5). |
|
Automated triage for the maintainers. Merge candidate (a recommendation to look, not an approval). In crates/victory-hle/src/modules/xgamesave.rs this fixes #2497 ( Generated by Claude Code |
jaschinski97-ops
left a comment
There was a problem hiding this comment.
Native Windows 11 follow-up on unchanged head a805860: the new sharing-denied legacy-blob migration regression fails on main 13f91ca and passes with #2525. This fills the migration test gap identified in the earlier review.
A separate locked .display case still reproduces after #2525: unreadable metadata becomes empty and a partial version is committed. Scoped follow-up #2675 retains the original #2525 commit/author and adds the NotFound-only fallback plus Windows blob/display retry regressions and the absent-metadata control. It prevents fresh partial migrations; it does not claim to repair previously damaged versions.
Final HLE rerun150/150, Clippy alltargets/allfeatures with warnings denied and asset policy pass; the one earlier transient DirectStorage failure and successful reruns are documented in #2675. Rust1.98.1 WindowsGNU / LLVM-MinGW, native Windows11 build26300. AI-assisted with Codex; synthetic files only, no GPU/title data.
|
Automated triage for the maintainers, second look (a review against current Closing as covered by two other PRs: the If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
Fixes #2497
Problem
v18446744073709551615folder makes an update lose the save in release builds (follow-up to #1729) #2497):Update::submitcomputedv.highest + 1. With a strayv18446744073709551615(u64::MAX) folder next to a committedv1, debug builds panic and release builds wrap tov0(ignored on read), returnS_OK, and deletev1.load(dir)only verifiedmanifestwithout checking that each listed blob file0..blobs.len()exists as a regular file, so a newer version folder with a valid manifest and missing blob causedcurrent()to delete intact older versions.migrate()usedfilter_mapwithstd::fs::read(e.path()).ok()?, silently omitting unreadable blobs before committingv1and deleting the legacy folder.Fix
v.highest.checked_add(1)inUpdate::submit, returningNO_ACCESSon overflow before writing or deleting anything.load(dir)(returningOk(None)if missing/non-file, propagating other I/O errors).migrate()without deleting the legacy folder if any blob fails to read.Testing
an_unreadable_newer_version_does_not_cost_the_savewith amissing blobcase and addedstray_u64_max_version_does_not_lose_the_saveincrates/victory-hle/src/modules/xgamesave.rs.cargo test -p xtask --lockedpasses asset policy.