fix(hle): account for save replacements before clamping quota #1110

Open
github-bot wants to merge 1 commit from github-bot/gh-1110 into main AGit
Owner

@⁠divyeshganta on GitHub · 2026-11-24 15:48 UTC · original
divyeshganta:fix/save-quota-replacements → main · +23 −1 · 1 files · 1 commits · open

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).

**@⁠divyeshganta** on GitHub · 2026-11-24 15:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/1110) `divyeshganta:fix/save-quota-replacements` → `main` · +23 −1 · 1 files · 1 commits · open 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 (d2ce712926b2ee163fa9f8bdb5ba52ded90f39ff).
Keep existing quota excess in the accounting when replacing blobs. Cover quota recovery boundaries, deletions and disk-space errors with a pure regression. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:20:20 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:01 UTC · original

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-hle passes, 96 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1110#issuecomment-7140054112) 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-hle` passes, 96 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:19 UTC · original

Automated triage for the maintainers.

Needs work. no_room in crates/victory-hle/src/modules/xgamesave.rs changes from written > QUOTA - used (clamped) + replaced to written > QUOTA - (used - replaced) (clamped). The two agree whenever used <= 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 (submit removes it after the commit).

In that case the new rule returns QUOTA_EXCEEDED for 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:

  • evidence of how the console's save service handles a container that is already over quota (public documentation or a measurement), or
  • a concrete case in VIctory where used > QUOTA arises 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

**@⁠Marvisak** on GitHub · 2026-11-25 01:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1110#issuecomment-7149431895) <!-- victory-triage v1 head=d2ce712926b2ee163fa9f8bdb5ba52ded90f39ff verdict=needs-work at=2026-11-25T01:19:30Z --> Automated triage for the maintainers. **Needs work.** `no_room` in `crates/victory-hle/src/modules/xgamesave.rs` changes from `written > QUOTA - used (clamped) + replaced` to `written > QUOTA - (used - replaced) (clamped)`. The two agree whenever `used <= 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 (`submit` removes it after the commit). In that case the new rule returns `QUOTA_EXCEEDED` for 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: - evidence of how the console's save service handles a container that is already over quota (public documentation or a measurement), or - a concrete case in VIctory where `used > QUOTA` arises 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](https://claude.ai/code)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1110/head:github-bot/gh-1110'
git switch 'github-bot/gh-1110'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1110'
git switch 'github-bot/gh-1110'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1110'
git switch 'github-bot/gh-1110'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1110'
git switch 'main'
git merge --squash 'github-bot/gh-1110'
git switch 'main'
git merge --ff-only 'github-bot/gh-1110'
git switch 'main'
git merge 'github-bot/gh-1110'
git push origin 'main'
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!1110
No description provided.