HLE xpackage: fix bool vtable slots, symlink dir walk, and estimate_download guard #1308

Closed
github-bot wants to merge 1 commit from gh-pr/1308/head into gh-pr/1308/base
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 17:18 UTC · original
geiyiliyabumo:test/hle-xpackage-audit → main · +361 −23 · 1 files · 1 commits · closed without merging

Summary

Audits \crates/victory-hle/src/modules/xpackage.rs\ and fixes four issues:

  • Replaces \HRESULT-returning \missing\ stubs on \ool-returning vtable slots \x40\ (\XPackageUpdateInstallationMonitor) and \x50\ (\XPackageUnregisterInstallationProgressChanged) with typed implementations matching
    egister_progress, and wires \xc0\ (\mount_path_size).
  • Prevents infinite recursion on directory symlinks/junctions and saturates byte summation in \dir_bytes.
  • Checks \ytes.is_null()\ in \estimate_download\ before mutating *confirm.
  • Adds a 32-byte ABI assertion on \Progress\ and 5 deterministic synthetic unit tests covering all implemented slots.

Verification

  • \cargo test -p victory-hle --lib modules::xpackage\ ? 6 passed, 0 failed
  • \cargo clippy -p victory-hle --all-targets -- -D warnings\ ? clean
  • \cargo xtask policy\ ? 154 files ok

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

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 17:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1308) `geiyiliyabumo:test/hle-xpackage-audit` → `main` · +361 −23 · 1 files · 1 commits · closed without merging ## Summary Audits \crates/victory-hle/src/modules/xpackage.rs\ and fixes four issues: - Replaces \HRESULT\-returning \missing\ stubs on \ool\-returning vtable slots \x40\ (\XPackageUpdateInstallationMonitor\) and \x50\ (\XPackageUnregisterInstallationProgressChanged\) with typed implementations matching \ egister_progress\, and wires \xc0\ (\mount_path_size\). - Prevents infinite recursion on directory symlinks/junctions and saturates byte summation in \dir_bytes\. - Checks \ytes.is_null()\ in \estimate_download\ before mutating \*confirm\. - Adds a 32-byte ABI assertion on \Progress\ and 5 deterministic synthetic unit tests covering all implemented slots. ## Verification - \cargo test -p victory-hle --lib modules::xpackage\ ? 6 passed, 0 failed - \cargo clippy -p victory-hle --all-targets -- -D warnings\ ? clean - \cargo xtask policy\ ? 154 files ok *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:04 +00:00
github-bot closed this pull request 2026-11-26 04:27:04 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:37 UTC · original

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1274. Its one substantive change is #1274's slot 0x50. The rest is stubs for two more slots nobody calls, a rewrite of the folder walk for a recursion that cannot happen (directory entries' metadata does not follow links), and 300 lines of tests pinning current behaviour.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/1308#issuecomment-7148700746) Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1274. Its one substantive change is #1274's slot 0x50. The rest is stubs for two more slots nobody calls, a rewrite of the folder walk for a recursion that cannot happen (directory entries' metadata does not follow links), and 300 lines of tests pinning current behaviour. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

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!1308
No description provided.