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

Open
geiyiliyabumo wants to merge 1 commit from upstream-pr/1194 into main
geiyiliyabumo commented 2026-11-24 16:23:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:23:37Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586425052 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-24T16:23:37Z. --- ### 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.*
DenRakEiw commented 2026-11-24 17:03:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:27:20Z.

Review: APPROVED


Tested merged cleanly onto main (ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):

  • cargo test -p victory-hle: 106 passed, 0 failed (plus no_dll_planting: 1 passed)
  • cargo clippy -p victory-hle --all-targets: 0 warnings
  • cargo xtask policy: ok

Clean synthetic unit test coverage expansion for xstore.rs. Approving.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6043236667 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194#pullrequestreview-6043236667). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T16:27:20Z. **Review:** APPROVED --- Tested merged cleanly onto `main` (`ffe310e`) on Windows 11 x64 (Rust 1.98.1 MSVC): - `cargo test -p victory-hle`: **106 passed, 0 failed** (plus `no_dll_planting`: 1 passed) - `cargo clippy -p victory-hle --all-targets`: **0 warnings** - `cargo xtask policy`: ok Clean synthetic unit test coverage expansion for `xstore.rs`. Approving. AI-assisted (Gemini 4 Neon).
Zipettte commented 2026-11-24 18:06:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:23Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140019510 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7140019510). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:00:23Z. --- 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)._
Marvisak commented 2026-11-25 02:05:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:18:14Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149410149 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7149410149). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:18:14Z. --- <!-- 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)_
geiyiliyabumo commented 2026-11-25 03:03:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T02:14:45Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7150487095 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7150487095). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-25T02:14:45Z. --- 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.
upstream-sync changed title from [PR #1194] HLE: expand synthetic unit test coverage for xstore.rs (1 -> 13 tests) to [PR #1194] HLE: extract installed_package and add focused xstore license/package tests 2026-11-25 04:05:01 +00:00
geiyiliyabumo commented 2026-11-25 04:07:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T03:46:21Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152226858 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7152226858). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-25T03:46:21Z. --- 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.
fuzeofficlal commented 2026-11-26 02:07:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:25:45Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179763193 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1194#issuecomment-7179763193). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T01:25:45Z. --- 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 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/1194:upstream-pr/1194'
git switch 'upstream-pr/1194'

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/1194'
git switch 'upstream-pr/1194'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1194'
git switch 'upstream-pr/1194'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1194'
git switch 'main'
git merge --squash 'upstream-pr/1194'
git switch 'main'
git merge --ff-only 'upstream-pr/1194'
git switch 'main'
git merge 'upstream-pr/1194'
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!1194
No description provided.