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

Open
opened 2026-11-26 04:14:37 +00:00 by github-bot · 2 comments
Owner

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

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.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 14:25 UTC · [original](https://github.com/Marvisak/VIctory/issues/945) ### 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.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:37 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 07:00 UTC · original · edited 2026-11-25 09:56 UTC

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

**@⁠Marvisak** on GitHub · 2026-11-25 07:00 UTC · [original](https://github.com/Marvisak/VIctory/issues/945#issuecomment-7155379675) · edited 2026-11-25 09:56 UTC <!-- 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)_
Author
Owner

@⁠StExpeditus on GitHub · 2026-11-25 09:09 UTC · original

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.

**@⁠StExpeditus** on GitHub · 2026-11-25 09:09 UTC · [original](https://github.com/Marvisak/VIctory/issues/945#issuecomment-7157952807) 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.
This discussion has been locked. Commenting is limited to contributors.
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#945
No description provided.