fix(hle): account for save replacements before clamping quota #1110
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1110"
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 divyeshganta on 2026-11-24T15:48:25Z.
Related to #923. Quota checks now account for replaced save data before clamping the remaining quota, so replacements cannot hide an existing quota excess. Adds regression coverage for quota boundaries, deletion, and disk-space errors. Patch by DocBlack89 (
d2ce712926).Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:01:24Z.
Review: APPROVED
Tested merged cleanly onto
main(ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):cargo test -p victory-hle: 95 passed, 0 failed (plusno_dll_planting: 1 passed)cargo clippy -p victory-hle --all-targets: 0 warningscargo xtask policy: okClean quota accounting fix for in-place save replacements. Approving.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:48Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
d2ce712:cargo test -p victory-hlepasses, 96 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T18:58:22Z.
Review: APPROVED
Tested
d2ce7129on Windows 11, RTX 5070, MSVC:cargo test -p victory-hlepasses on the head (95 passed).clippy -D warnings(default and all features) are all clean.The fix is right.
QUOTA - (used - replaced)is the room left after the replaced blobs go away. The oldQUOTA.saturating_sub(used) + replacedclamped the excess to zero first and then credited the replacement. The new tests cover:written == 0,AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:19:33Z.
Automated triage for the maintainers.
Needs work.
no_roomincrates/victory-hle/src/modules/xgamesave.rschanges fromwritten > QUOTA - used (clamped) + replacedtowritten > QUOTA - (used - replaced) (clamped). The two agree wheneverused <= QUOTA. They differ only when a provider is already over quota. The update's own check keeps an emulated save from getting there, so the case only arises from data placed there some other way, for example an old version left behind after a crash (submitremoves it after the commit).In that case the new rule returns
QUOTA_EXCEEDEDfor every update that does not shrink the save. The title would then fail to save where it succeeds today. That changes a runtime return value, and the PR gives no evidence for it. What would move this forward:used > QUOTAarises and the current behaviour causes a problem.The new test checks the new arithmetic, not the console's behaviour. The PR also has almost no description. Please state the problem it fixes rather than pointing to #923.
CI: no check runs on the head commit.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.