HLE: the retail console ID has the documented dotted form #1717

Open
github-bot wants to merge 1 commit from github-bot/gh-1717 into main AGit
Owner

@⁠davutsimsekk on GitHub · 2026-11-24 21:14 UTC · original
davutsimsekk:fix/retail-console-id → main · +21 −2 · 1 files · 1 commits · open

XSystemGetConsoleId reported 00000000000000000000000000000000000001, but the GDK documents the retail value as 00000000.00000000.00000000.00000000.00: "In RETAIL, this function will always return" that dotted value. The HLE reports SANDBOX = "RETAIL", so the undotted string was both the wrong value and the wrong format for a title that parses the documented groups.

The length is unchanged (38 characters, 39 bytes with the NUL), so only the constant changes. A test checks the exact bytes and that a 38-byte buffer still fails with E_NOT_SUFFICIENT_BUFFER.

Reference: https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetconsoleid

Test

the_console_id_is_the_documented_retail_value in xsystem::tests.

  • cargo test -p victory-hle --lib: 95 passed, 0 failed
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean
  • rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs: clean
  • The title was not run.
**@⁠davutsimsekk** on GitHub · 2026-11-24 21:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1717) `davutsimsekk:fix/retail-console-id` → `main` · +21 −2 · 1 files · 1 commits · open `XSystemGetConsoleId` reported `00000000000000000000000000000000000001`, but the GDK documents the retail value as `00000000.00000000.00000000.00000000.00`: "In RETAIL, this function will always return" that dotted value. The HLE reports `SANDBOX = "RETAIL"`, so the undotted string was both the wrong value and the wrong format for a title that parses the documented groups. The length is unchanged (38 characters, 39 bytes with the NUL), so only the constant changes. A test checks the exact bytes and that a 38-byte buffer still fails with `E_NOT_SUFFICIENT_BUFFER`. Reference: https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetconsoleid ## Test `the_console_id_is_the_documented_retail_value` in `xsystem::tests`. - `cargo test -p victory-hle --lib`: 95 passed, 0 failed - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings`: clean - `rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs`: clean - The title was not run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:42:28 +00:00
Author
Owner

@⁠kais7654 on GitHub · 2026-11-24 22:38 UTC · original

Reviewed and verified: the dotted form keeps the documented 39 bytes
with the NUL (the new test checks size, content, and the short-buffer
refusal), and nothing else in the tree depended on the old string. Test
passes on Windows.

**@⁠kais7654** on GitHub · 2026-11-24 22:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1717#issuecomment-7146465869) Reviewed and verified: the dotted form keeps the documented 39 bytes with the NUL (the new test checks size, content, and the short-buffer refusal), and nothing else in the tree depended on the old string. Test passes on Windows.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:35 UTC · original · edited 2026-11-25 20:22 UTC

Automated triage for the maintainers.

Merge candidate. The new head 7b5e855 makes the one change the previous review asked for. The assertion message in the_console_id_is_the_documented_retail_value (crates/victory-hle/src/modules/xsystem.rs) now reads "the console ID is 39 bytes, NUL included", so the diff no longer carries an identifier from the SDK's headers.

The rest is unchanged. CONSOLE_ID becomes the publicly documented retail value 00000000.00000000.00000000.00000000.00, with the same 38 characters and 39 bytes with the NUL. The test checks the exact bytes, the reported size, and that a 38-byte buffer still gets E_NOT_SUFFICIENT_BUFFER. The practical effect is small, since main notes that the titles seen don't call this slot.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1717#issuecomment-7152058923) · edited 2026-11-25 20:22 UTC <!-- victory-triage v1 head=7b5e85512bc61ff2c5730a3bc97664be900b0e3b verdict=merge-candidate at=2026-11-25T20:22:45Z --> Automated triage for the maintainers. **Merge candidate.** The new head `7b5e855` makes the one change the previous review asked for. The assertion message in `the_console_id_is_the_documented_retail_value` (`crates/victory-hle/src/modules/xsystem.rs`) now reads "the console ID is 39 bytes, NUL included", so the diff no longer carries an identifier from the SDK's headers. The rest is unchanged. `CONSOLE_ID` becomes the publicly documented retail value `00000000.00000000.00000000.00000000.00`, with the same 38 characters and 39 bytes with the NUL. The test checks the exact bytes, the reported size, and that a 38-byte buffer still gets `E_NOT_SUFFICIENT_BUFFER`. The practical effect is small, since `main` notes that the titles seen don't call this slot. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-24 21:26 UTC · original · approved these changes

Verified locally merged onto origin/main (Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-hle --lib xsystem:: — 5 passed, 0 failed (including the_console_id_is_the_documented_retail_value)
  • cargo clippy -p victory-hle --all-targets — 0 warnings
  • cargo xtask policy — ok

Clean fix formatting the retail console ID in the documented dotted form with unit test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

**@⁠DenRakEiw** on GitHub · 2026-11-24 21:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/1717#pullrequestreview-6047683804) · **approved these changes** Verified locally merged onto `origin/main` (Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-hle --lib xsystem::` — 5 passed, 0 failed (including `the_console_id_is_the_documented_retail_value`) - `cargo clippy -p victory-hle --all-targets` — 0 warnings - `cargo xtask policy` — ok Clean fix formatting the retail console ID in the documented dotted form with unit test coverage. Looks good. AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠catminou4 on GitHub · 2026-11-24 22:20 UTC · original · reviewed

Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.

Retail console ID has the documented dotted form in XSystem (xsystem.rs, 1.8K). One-line-class fix matching the documented XSystem format.

**@⁠catminou4** on GitHub · 2026-11-24 22:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/1717#pullrequestreview-6048313980) · **reviewed** Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff. Retail console ID has the documented dotted form in XSystem (xsystem.rs, 1.8K). One-line-class fix matching the documented XSystem format.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 19:29 UTC · original · approved these changes

Verified locally merged onto origin/main (63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test --locked -p victory-hle --lib modules::xsystem:: — 5 passed, 0 failed (including the_console_id_is_the_documented_retail_value)
  • cargo clippy --locked -p victory-hle --all-targets -- -D warnings (default and --all-features) — 0 warnings
  • rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs — clean
  • cargo xtask policy — ok (191 files ok)

Review notes

  • Verified against Microsoft GDK XSystemGetConsoleId / XSystemConsoleIdBytes (39 bytes): "00000000.00000000.00000000.00000000.00" is 38 ASCII characters plus NUL (39 bytes), and the new test confirms S_OK + used == 39 at 39 bytes and E_NOT_SUFFICIENT_BUFFER at 38 bytes.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 19:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1717#pullrequestreview-6079553404) · **approved these changes** Verified locally merged onto `origin/main` (`63bcca43`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test --locked -p victory-hle --lib modules::xsystem::` — **5 passed, 0 failed** (including `the_console_id_is_the_documented_retail_value`) - `cargo clippy --locked -p victory-hle --all-targets -- -D warnings` (default and `--all-features`) — 0 warnings - `rustfmt --edition 2024 --check crates/victory-hle/src/modules/xsystem.rs` — clean - `cargo xtask policy` — ok (`191 files ok`) ### Review notes - Verified against Microsoft GDK `XSystemGetConsoleId` / `XSystemConsoleIdBytes` (39 bytes): `"00000000.00000000.00000000.00000000.00"` is 38 ASCII characters plus NUL (39 bytes), and the new test confirms `S_OK` + `used == 39` at 39 bytes and `E_NOT_SUFFICIENT_BUFFER` at 38 bytes.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1717/head:github-bot/gh-1717'
git switch 'github-bot/gh-1717'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1717'
git switch 'github-bot/gh-1717'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1717'
git switch 'github-bot/gh-1717'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1717'
git switch 'main'
git merge --squash 'github-bot/gh-1717'
git switch 'main'
git merge --ff-only 'github-bot/gh-1717'
git switch 'main'
git merge 'github-bot/gh-1717'
git push origin 'main'
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!1717
No description provided.