HLE: expand synthetic unit test coverage for xstore.rs (1 -> 13 tests) #945

Open
opened 2026-11-24 14:25:26 +00:00 by geiyiliyabumo · 2 comments
geiyiliyabumo commented 2026-11-24 14:25:26 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T14:25:26Z.


Summary

Audits crates/victory-hle/src/modules/xstore.rs and expands deterministic synthetic unit tests from 1 to 13 passing tests (extracting a pure installed_package() helper so the store-ID mapping can be tested without racing global runtime::Title).

Because external PR creation is currently restricted (collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:

  • Branch: geiyiliyabumo/VIctory@feat/xstore-audit-and-tests
  • Commit: geiyiliyabumo/VIctory@d51dc42 (based on main ffe310e)

Changes (crates/victory-hle/src/modules/xstore.rs)

  • Behaviour-preserving extraction of installed_package() for testing store-ID -> package mapping in isolation.
  • Added 12 new synthetic unit tests (13 total): both interface IDs, distinct static handle addresses, context lifetime, empty entitlement query (incl. no-next-page), all 11 offline async begin slots + result functions leaving caller buffers untouched, one-call-per-block, package/durable licenses, 104-byte game license + SKU, event registrations, and store-ID mapping.

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check crates/victory-hle/src/modules/xstore.rs: PASS
  • cargo xtask policy: PASS (154 files ok)
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings (default + --features diagnostics): PASS (0 warnings)
  • cargo test -p victory-hle --locked -- xstore: 13 passed, 0 failed (victory-hle 106 + 1 passed)

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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6583995596 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/945). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-24T14:25:26Z. --- ### Summary Audits `crates/victory-hle/src/modules/xstore.rs` and expands deterministic synthetic unit tests from 1 to **13 passing tests** (extracting a pure `installed_package()` helper so the store-ID mapping can be tested without racing global `runtime::Title`). Because external PR creation is currently restricted (`collaborators_only`), the CI-green branch is ready on my fork for cherry-pick / review: - **Branch**: `geiyiliyabumo/VIctory@feat/xstore-audit-and-tests` - **Commit**: `geiyiliyabumo/VIctory@d51dc42` (based on `main` `ffe310e`) ### Changes (`crates/victory-hle/src/modules/xstore.rs`) - Behaviour-preserving extraction of `installed_package()` for testing store-ID -> package mapping in isolation. - Added 12 new synthetic unit tests (13 total): both interface IDs, distinct static handle addresses, context lifetime, empty entitlement query (incl. no-next-page), all 11 offline async begin slots + result functions leaving caller buffers untouched, one-call-per-block, package/durable licenses, 104-byte game license + SKU, event registrations, and store-ID mapping. ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check crates/victory-hle/src/modules/xstore.rs`: **PASS** - `cargo xtask policy`: **PASS** (`154 files ok`) - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings` (default + `--features diagnostics`): **PASS** (0 warnings) - `cargo test -p victory-hle --locked -- xstore`: **13 passed, 0 failed** (`victory-hle` `106 + 1` passed) *AI-assisted; synthetic tests only, no game files.*
Marvisak commented 2026-11-25 07:03:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T07:00:03Z.


Automated triage for the maintainers.

These are test-coverage additions for crates/victory-hle/src/modules/xstore.rs (with one behaviour-preserving extraction), not a defect report. The branch is open as PR #1194, which is where review happens; whether to take it is for the maintainers.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155379675 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/945#issuecomment-7155379675). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T07:00:03Z. --- <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T09:09:33Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. These are test-coverage additions for `crates/victory-hle/src/modules/xstore.rs` (with one behaviour-preserving extraction), not a defect report. The branch is open as PR #1194, which is where review happens; whether to take it is for the maintainers. --- _Generated by [Claude Code](https://claude.ai/code)_
StExpeditus commented 2026-11-25 10:07:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by StExpeditus on 2026-11-25T09:09:33Z.


Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, Rust 1.98.1 MSVC), commit 2e53863: cargo test -p victory-hle --locked --no-fail-fast -> 149 passed, 0 failed, 0 ignored. Synthetic tests only, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7157952807 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/945#issuecomment-7157952807). Originally posted by [StExpeditus](https://github.com/StExpeditus) on 2026-11-25T09:09:33Z. --- Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, Rust 1.98.1 MSVC), commit `2e53863`: `cargo test -p victory-hle --locked --no-fail-fast` -> **149 passed, 0 failed, 0 ignored**. Synthetic tests only, no game files.
Sign in to join this conversation.
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#945
No description provided.