HLE: implement synchronous XGameSave slots and unfiltered blob enumeration #2137

Open
fuzeofficlal wants to merge 1 commit from upstream-pr/2139 into main
fuzeofficlal commented 2026-11-25 05:52:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T05:52:27Z.


Problem

While crates/victory-hle/src/modules/xgamesave.rs implements the backing provider, container, blob, and atomic update operations for the async GDK entry points, six synchronous/enumeration vtable slots (0x18, 0x38, 0x50, 0x78, 0x90, and 0xd8) remain wired to missing::<N>.

Changes

  • 0x18 (XGameSaveInitializeProvider): Validate and clear out, check save-root availability (NO_ACCESS), and open the provider synchronously via Provider::open.
  • 0x38 (XGameSaveGetRemainingQuota): Validate provider and out (E_INVALIDARG) and write p.remaining() as i64.
  • 0x50 (XGameSaveDeleteContainer): Validate provider/name and container naming (INVALID_CONTAINER_NAME) before calling delete(&p.root, &name).
  • 0x78 (XGameSaveEnumerateContainerInfoByName): Filter containers by prefix (treating null/empty as all containers and preserving early callback stop returning S_OK).
  • 0x90 (XGameSaveEnumerateBlobInfo): Delegate unfiltered blob enumeration to enumerate_blobs.
  • 0xd8 (XGameSaveSubmitUpdate): Commit Update::submit synchronously.
  • Add end-to-end persistence, quota, prefix-filtering, early-stop, and invalid-argument coverage in xgamesave::tests::blocking_calls_and_enumerations_persist_and_filter.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6598181457 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2139). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T05:52:27Z. --- ### Problem While `crates/victory-hle/src/modules/xgamesave.rs` implements the backing provider, container, blob, and atomic update operations for the async GDK entry points, six synchronous/enumeration vtable slots (`0x18`, `0x38`, `0x50`, `0x78`, `0x90`, and `0xd8`) remain wired to `missing::<N>`. ### Changes - **`0x18` (`XGameSaveInitializeProvider`)**: Validate and clear `out`, check save-root availability (`NO_ACCESS`), and open the provider synchronously via `Provider::open`. - **`0x38` (`XGameSaveGetRemainingQuota`)**: Validate `provider` and `out` (`E_INVALIDARG`) and write `p.remaining() as i64`. - **`0x50` (`XGameSaveDeleteContainer`)**: Validate `provider`/`name` and container naming (`INVALID_CONTAINER_NAME`) before calling `delete(&p.root, &name)`. - **`0x78` (`XGameSaveEnumerateContainerInfoByName`)**: Filter containers by `prefix` (treating null/empty as all containers and preserving early callback stop returning `S_OK`). - **`0x90` (`XGameSaveEnumerateBlobInfo`)**: Delegate unfiltered blob enumeration to `enumerate_blobs`. - **`0xd8` (`XGameSaveSubmitUpdate`)**: Commit `Update::submit` synchronously. - Add end-to-end persistence, quota, prefix-filtering, early-stop, and invalid-argument coverage in `xgamesave::tests::blocking_calls_and_enumerations_persist_and_filter`.
DenRakEiw commented 2026-11-25 07:02:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T06:02:49Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-hle --lib xgamesave:: — 12 passed, 0 failed
  • cargo clippy -p victory-hle --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean implementation of synchronous XGameSave slots and unfiltered blob enumeration with thorough unit test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6052603738 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2139#pullrequestreview-6052603738). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T06:02:49Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-hle --lib xgamesave::` — **12 passed, 0 failed** - `cargo clippy -p victory-hle --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean implementation of synchronous `XGameSave` slots and unfiltered blob enumeration with thorough unit test coverage. Looks good. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 07:02:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T06:33:03Z.

Review: COMMENTED


Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.

Synchronous XGameSave slots + unfiltered blob — save-system semantics; check the sync path's blocking behavior against titles that poll.

<!-- greyfinch-sync:Marvisak/VIctory:review:6052888699 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2139#pullrequestreview-6052888699). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T06:33:03Z. **Review:** COMMENTED --- Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff. Synchronous XGameSave slots + unfiltered blob — save-system semantics; check the sync path's blocking behavior against titles that poll.
Marvisak commented 2026-11-25 11:05:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:51:41Z.


Automated triage for the maintainers.

Merge candidate. This fills the blocking XGameSave slots 0x18, 0x38, 0x50 and 0xd8 and the enumeration slots 0x78 and 0x90 in xgamesave.rs. Each one reuses the logic of its async counterpart already in main:

  • initialize matches initialize_async.
  • quota matches quota_async.
  • delete_container matches delete_async.
  • submit matches submit_async (Update::submit).
  • containers_by_name and all_blobs reuse report and enumerate_blobs.

So the return values match what main already returns. The test covers persistence, quota, prefix filtering, early stop and invalid arguments. CI passes. One minor point: the test-only saves_path() seam is used by initialize but not by initialize_async, so the two should use the same path lookup.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160270238 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2139#issuecomment-7160270238). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T10:51:41Z. --- <!-- victory-triage v1 head=c04e1ab6fd0e64b96cddc16b2fac79d6319cea7e verdict=merge-candidate at=2026-11-25T10:51:26Z --> Automated triage for the maintainers. Merge candidate. This fills the blocking XGameSave slots 0x18, 0x38, 0x50 and 0xd8 and the enumeration slots 0x78 and 0x90 in `xgamesave.rs`. Each one reuses the logic of its async counterpart already in main: - `initialize` matches `initialize_async`. - `quota` matches `quota_async`. - `delete_container` matches `delete_async`. - `submit` matches `submit_async` (`Update::submit`). - `containers_by_name` and `all_blobs` reuse `report` and `enumerate_blobs`. So the return values match what main already returns. The test covers persistence, quota, prefix filtering, early stop and invalid arguments. CI passes. One minor point: the test-only `saves_path()` seam is used by `initialize` but not by `initialize_async`, so the two should use the same path lookup. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2139:upstream-pr/2139'
git switch 'upstream-pr/2139'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/2139'
git switch 'upstream-pr/2139'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2139'
git switch 'upstream-pr/2139'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2139'
git switch 'main'
git merge --squash 'upstream-pr/2139'
git switch 'main'
git merge --ff-only 'upstream-pr/2139'
git switch 'main'
git merge 'upstream-pr/2139'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2137
No description provided.