HLE: validate XPackage chunk selectors #412
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!412
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-412"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@enzoduarte1 on GitHub · 2026-11-24 03:01 UTC · original
enzoduarte1:hle/xpackage-selector-validation→main· +257 −24 · 1 files · 1 commits · openWhat
IXPackageImplaccepted any selector array and returned success for nonsense the console rejects. This adds the publicXPackageChunkSelectorABI (u32type tag plus the language/tag/chunk-id/feature union) and onevalidate_selectorshelper used by all six selector-taking methods:XPackageCreateInstallationMonitorXPackageFindChunkAvailabilityXPackageChangeChunkInstallOrderXPackageInstallChunksAsyncXPackageEstimateDownloadSizeXPackageUninstallChunksZero selectors still mean the whole installation. A nonzero count with a null array, an unknown selector type, or a null/empty string attribute now returns
E_INVALIDARG. A foreign package id still returnsNO_PACKAGEbefore selector validation. The “own package is completely installed” model is unchanged for well-formed selectors.The layout and enum values come from the public GDK
XPackage.h/XPackageChunkSelectordocumentation; no title data is involved.Tested
x86_64-pc-windows-gnu(this machine has no MSVC linker).cargo test -p victory-hle --lib xpackage::tests: 3 passed, including new direct validation and vtable-level tests for every changed method.cargo test -p victory-hle: 88 unit tests + 1 integration test passed.cargo test --workspace --exclude victory-loader -- --test-threads=1: all suites passed.cargo clippy -p victory-hle --all-targets -- -A clippy::field_reassign_with_default -D warnings: clean. The allowed lint is the pre-existing warning fixed in PR #355.rustfmt --edition 2024 --check crates/victory-hle/src/modules/xpackage.rsandgit diff --check: clean.cargo xtask policy: 151 files ok. No game files or data taken from them were added.cargo test -p victory-loader --test load_probe. Its fixture passes MSVC's/DELAYLOADflag, which MinGW rejects here; the same failure occurs on unmodifiedmain. A parallel run of the whole suite hit the known WARP flake from #181; rerunning serially and rerunningvictory-shaderalone both passed.Checklist
cargo fmt,cargo clippy --workspace --all-targetsandcargo test --workspacepass — see the toolchain limitations above; the changed crate is clean.cargo xtask policypasses. The change adds no game files or data taken from them (docs/asset-policy.md).@jeremygold02 on GitHub · 2026-11-24 04:36 UTC · original
Thanks @enzoduarte1 for validating chunk selectors across the XPackage API. I tested head
d2c7d4a329abb59d669867c5b5020776eb7963a9with:Result: 3 passed, 0 failed (85 filtered out). The tests cover selector validation, malformed selectors being refused through the API, and the unchanged complete-installation behavior for valid requests. This validates the synthetic HLE object cases, not a title package installation.
@Marvisak on GitHub · 2026-11-25 00:32 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(4118f33b). Conflicting files:crates/victory-hle/src/modules/xpackage.rs.The content will be reviewed once the branch is rebased onto
main.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.