HLE: extract installed_package and add focused xstore license/package tests #1194

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

@⁠geiyiliyabumo on GitHub · 2026-11-24 16:23 UTC · original
geiyiliyabumo:feat/xstore-audit-and-tests → main · +140 −7 · 1 files · 1 commits · open

Summary

Closes #945

Full verification details and change notes are documented in #945 (commit d51dc42, based on main ffe310e).

 crates/victory-hle/src/modules/xstore.rs | 642 ++++++++++++++++++++++++++++++-
 1 file changed, 635 insertions(+), 7 deletions(-)

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check on edited files: PASS
  • cargo xtask policy: PASS (zero game files/data)
  • cargo clippy --all-targets --locked -- -D warnings (default + --features diagnostics where applicable): PASS
  • Targeted & crate unit/GPU tests: PASS

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 16:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1194) `geiyiliyabumo:feat/xstore-audit-and-tests` → `main` · +140 −7 · 1 files · 1 commits · open ### Summary Closes #945 Full verification details and change notes are documented in #945 (commit `d51dc42`, based on `main` `ffe310e`). ```text crates/victory-hle/src/modules/xstore.rs | 642 ++++++++++++++++++++++++++++++- 1 file changed, 635 insertions(+), 7 deletions(-) ``` ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check` on edited files: **PASS** - `cargo xtask policy`: **PASS** (zero game files/data) - `cargo clippy --all-targets --locked -- -D warnings` (default + `--features diagnostics` where applicable): **PASS** - Targeted & crate unit/GPU tests: **PASS** *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:23:09 +00:00
Author
Owner

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

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d51dc42: cargo test -p victory-hle passes, 107 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:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7140019510) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d51dc42: `cargo test -p victory-hle` passes, 107 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:18 UTC · original · edited 2026-11-25 07:22 UTC

Automated triage for the maintainers.

Merge candidate. Update after your reply: the PR is now down to the three tests asked for, plus the installed_package extraction in crates/victory-hle/src/modules/xstore.rs. package_identifier behaves as on main. a_package_licence_names_the_installed_package is the first test of slots 0xa0/0xa8/0xb0: only the installed package gets a valid licence. the_game_license_is_full_and_names_the_first_sku checks every GameLicense field, plus the E_NOT_SUFFICIENT_BUFFER and E_ILLEGAL_METHOD_CALL paths, against xasync::XAsyncGetResult. the_store_id_maps_to_the_installation covers the mapping with and without a store id. One small point: the ran helper reads internal[1]/internal[2] directly, so it depends on xasync's private block layout. CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7149410149) · edited 2026-11-25 07:22 UTC <!-- victory-triage v1 head=2e53863d44003c31d20d36383fd92f571822797c verdict=merge-candidate at=2026-11-25T07:22:41Z --> Automated triage for the maintainers. **Merge candidate.** Update after your reply: the PR is now down to the three tests asked for, plus the `installed_package` extraction in `crates/victory-hle/src/modules/xstore.rs`. `package_identifier` behaves as on `main`. `a_package_licence_names_the_installed_package` is the first test of slots 0xa0/0xa8/0xb0: only the installed package gets a valid licence. `the_game_license_is_full_and_names_the_first_sku` checks every `GameLicense` field, plus the `E_NOT_SUFFICIENT_BUFFER` and `E_ILLEGAL_METHOD_CALL` paths, against `xasync::XAsyncGetResult`. `the_store_id_maps_to_the_installation` covers the mapping with and without a store id. One small point: the `ran` helper reads `internal[1]`/`internal[2]` directly, so it depends on `xasync`'s private block layout. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-25 02:14 UTC · original

Rebased cleanly onto \main\ (\ccfb029), keeping \E_INVALIDARG\ for unresolved store IDs in \package_identifier. \cargo test -p victory-hle --locked modules::xstore::tests, \cargo clippy -p victory-hle --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.

**@⁠geiyiliyabumo** on GitHub · 2026-11-25 02:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7150487095) Rebased cleanly onto \main\ (\ccfb029\), keeping \E_INVALIDARG\ for unresolved store IDs in \package_identifier\. \cargo test -p victory-hle --locked modules::xstore::tests\, \cargo clippy -p victory-hle --all-targets --locked -- -D warnings\, and \cargo xtask policy\ all pass.
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-25 03:46 UTC · original

Updated per triage feedback: trimmed the 9 stub-mirroring tests (~495 lines) down to the 3 focused tests covering \GameLicense\ fields, package-licence validity, and \installed_package\ mapping. Rebased onto \main\ (\940d32f); \cargo test -p victory-hle --locked\ (148 passed, 0 failed), \cargo clippy -p victory-hle --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.

**@⁠geiyiliyabumo** on GitHub · 2026-11-25 03:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7152226858) Updated per triage feedback: trimmed the 9 stub-mirroring tests (~495 lines) down to the 3 focused tests covering \GameLicense\ fields, package-licence validity, and \installed_package\ mapping. Rebased onto \main\ (\940d32f\); \cargo test -p victory-hle --locked\ (148 passed, 0 failed), \cargo clippy -p victory-hle --all-targets --locked -- -D warnings\, and \cargo xtask policy\ all pass.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 01:25 UTC · original

Code review and Windows 11 verification at head 2e53863d4400 merged cleanly onto main (63bcca43c6a0):

  • Code review (crates/victory-hle/src/modules/xstore.rs:305-323, 437-688):
    • Pure extraction of installed_package(title, store_id) preserves exact package_identifier behavior (requiring non-empty matching UTF-8 store_id and title.store_id, returning E_INVALIDARG without mutating the output buffer otherwise).
    • All 4 new xstore tests use purely synthetic stack AsyncBlock / runtime::Title data with no global lock or disk dependency.
  • Verified (Windows 11, Rust 1.98.1):
    • cargo xtask policy: 191 files ok; cargo clippy --locked -p victory-hle --tests -- -D warnings: 0 warnings
    • victory-hle -- xstore: 6/6 passed.

LGTM.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 01:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7179763193) Code review and Windows 11 verification at head `2e53863d4400` merged cleanly onto `main` (`63bcca43c6a0`): - **Code review (`crates/victory-hle/src/modules/xstore.rs:305-323, 437-688`)**: - Pure extraction of `installed_package(title, store_id)` preserves exact `package_identifier` behavior (requiring non-empty matching UTF-8 `store_id` and `title.store_id`, returning `E_INVALIDARG` without mutating the output buffer otherwise). - All 4 new `xstore` tests use purely synthetic stack `AsyncBlock` / `runtime::Title` data with no global lock or disk dependency. - **Verified (Windows 11, Rust 1.98.1)**: - `cargo xtask policy`: `191 files ok`; `cargo clippy --locked -p victory-hle --tests -- -D warnings`: 0 warnings - `victory-hle -- xstore`: **6/6 passed**. LGTM.
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/1194/head:github-bot/gh-1194'
git switch 'github-bot/gh-1194'

Merge

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