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

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

@⁠fuzeofficlal on GitHub · 2026-11-25 05:52 UTC · original
fuzeofficlal:feat/hle-xgamesave-sync-slots → main · +458 −6 · 1 files · 1 commits · open

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.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 05:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/2139) `fuzeofficlal:feat/hle-xgamesave-sync-slots` → `main` · +458 −6 · 1 files · 1 commits · open ### 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`.
Wire the remaining six XGameSave provider, container, blob, and update
method-table slots in `crates/victory-hle/src/modules/xgamesave.rs`:

- `0x18` (`XGameSaveInitializeProvider`): blocking provider open with
  null-handle clearing on failure.
- `0x38` (`XGameSaveGetRemainingQuota`): blocking quota query.
- `0x50` (`XGameSaveDeleteContainer`): blocking container deletion with
  container-name validation.
- `0x78` (`XGameSaveEnumerateContainerInfoByName`): prefix-filtered
  container enumeration tolerating null/empty prefixes and early stop.
- `0x90` (`XGameSaveEnumerateBlobInfo`): unfiltered blob enumeration
  delegating to `enumerate_blobs`.
- `0xd8` (`XGameSaveSubmitUpdate`): blocking atomic update commit.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:55:50 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 10:51 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 10:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/2139#issuecomment-7160270238) <!-- 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 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/2139/head:github-bot/gh-2139'
git switch 'github-bot/gh-2139'

Merge

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