feat(xgameruntime): implement XSystemGetXboxLiveSandboxId #13

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

@⁠Callimann8 on GitHub · 2026-11-21 12:06 UTC · original
Callimann8:claude/project-thread-fz4yux-sandbox → main · +41 −3 · 9 files · 1 commits · closed without merging

What

Implements XSystemGetXboxLiveSandboxId in xgameruntime with its GDK signature. It always returns RETAIL, which the GDK documentation gives for the retail environment and as the default when no sandbox is stored on the device. A buffer smaller than XSystemXboxLiveSandboxIdMaxBytes (16) returns HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); sandboxIdUsed is optional and receives 7 (terminator included). A null sandboxId stops with AbxUnsupported. A development sandbox set on the PC is not read; that gap and the unmeasured parts are in a debt fragment. Adds an e2e_sandbox_id scenario.

Tested

Cross-built ab_xgameruntime.dll, fake_title.exe and the relinker with MinGW-w64 on Linux. The new e2e_sandbox_id test was not run (no Windows host); CI's Windows job runs it. check_conventions.py and debt_fold.py --check pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • python tools/check_conventions.py passes (no comments in code, one declaration per export, Conventional Commit subjects)
  • Unimplemented paths stop (AbxNotImplemented / AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragment
  • Known gaps added, changed or removed through docs/dev/debt/changes/<branch>.md
  • Generic behaviour, not specific to one title
  • No game files, keys, notes or logs added to the repository
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • Source of behaviour: public documentation, https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetxboxlivesandboxid ; XSystemXboxLiveSandboxIdMaxBytes = 16 from the public microsoft/XBOX-GDK-dotnet interop constants
  • AI-assisted: yes
**@⁠Callimann8** on GitHub · 2026-11-21 12:06 UTC · [original](https://github.com/Dark3581/AnyBox/pull/13) `Callimann8:claude/project-thread-fz4yux-sandbox` → `main` · +41 −3 · 9 files · 1 commits · closed without merging ### What Implements `XSystemGetXboxLiveSandboxId` in xgameruntime with its GDK signature. It always returns `RETAIL`, which the GDK documentation gives for the retail environment and as the default when no sandbox is stored on the device. A buffer smaller than `XSystemXboxLiveSandboxIdMaxBytes` (16) returns `HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)`; `sandboxIdUsed` is optional and receives 7 (terminator included). A null `sandboxId` stops with `AbxUnsupported`. A development sandbox set on the PC is not read; that gap and the unmeasured parts are in a debt fragment. Adds an `e2e_sandbox_id` scenario. ### Tested <!-- OS, title or test, what was checked. "Not tested" is a valid answer. --> Cross-built `ab_xgameruntime.dll`, `fake_title.exe` and the relinker with MinGW-w64 on Linux. The new `e2e_sandbox_id` test was not run (no Windows host); CI's Windows job runs it. `check_conventions.py` and `debt_fold.py --check` pass. ### Checklist <!-- Rules behind each item: CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] `python tools/check_conventions.py` passes (no comments in code, one declaration per export, Conventional Commit subjects) - [x] Unimplemented paths stop (`AbxNotImplemented` / `AbxUnsupported`); silent stubs are listed under Silent stubs through a debt fragment - [x] Known gaps added, changed or removed through `docs/dev/debt/changes/<branch>.md` - [x] Generic behaviour, not specific to one title - [x] No game files, keys, notes or logs added to the repository - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] Source of behaviour: public documentation, https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetxboxlivesandboxid ; `XSystemXboxLiveSandboxIdMaxBytes` = 16 from the public microsoft/XBOX-GDK-dotnet interop constants - [x] AI-assisted: yes
Return RETAIL, the sandbox the GDK documentation gives for the retail
environment and when none is stored on the device, with the documented
insufficient-buffer error below XSystemXboxLiveSandboxIdMaxBytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YZ2PrB75JCkyJJYyvjZT6o
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:13:56 +00:00
github-bot closed this pull request 2026-11-26 19:13:56 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-21 12:07 UTC · original

Progress report (5327b75 → 7f896cc)

📈 Libraries: 15.62% (+0.2232%, +1 implemented function)

✅ 1 implemented
Library Name
xgameruntime XSystemGetXboxLiveSandboxId

Changed libraries

Library Before After Change
xgameruntime 23/391 (5.88%) 24/391 (6.14%) +0.26%
**@⁠github-actions[bot]** on GitHub · 2026-11-21 12:07 UTC · [original](https://github.com/Dark3581/AnyBox/pull/13#issuecomment-7062344393) <!-- progress-report --> ### Progress report (5327b75 → 7f896cc) 📈 **Libraries**: 15.62% (+0.2232%, +1 implemented function) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | xgameruntime | `XSystemGetXboxLiveSandboxId` | </details> #### Changed libraries | Library | Before | After | Change | | - | - | - | - | | xgameruntime | 23/391 (5.88%) | 24/391 (6.14%) | +0.26% |
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 12:30 UTC · original · approved these changes

Reviewed — looks good

Landed as it is. The branch conflicted with main after the XThread commit, #14 and #12, so I rebased it myself and committed it on main as dc7d8b2, with you as author.

What I ran

Head 7f896cc, then the same change rebased on c8b782d (after #14 and #12). MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10, clean build directory for both.

Results

Check Result Note
MinGW full build passed no warnings, at the PR head and after the rebase
CTest passed 36/36 at the PR head, 41/41 after the rebase
e2e_sandbox_id, repeated passed 30/30
All e2e scenarios, repeated passed 5 rounds of the 20 scenarios, 4 in parallel, no failure
tools/check_conventions.py, tools/debt_fold.py --check passed 10 fragments apply cleanly after the rebase
tools/progress.py passed with #12, xgameruntime 56 → 58 implemented of 391
CI passed Windows, relinker on Linux and macOS, conventions, progress

Findings

Blocking

None.

Non-blocking

  • core/libs/xdll/xgameruntime/include/Exports.hpp: the new declaration stayed in the stub list, in its old alphabetical slot. While resolving the conflicts I moved it next to XSystemGetConsoleId, with the other implemented XSystem functions, as #12 does. No code change.

Not verified

Reading a development sandbox set on the PC, and behaviour on a console, as recorded in debt.

Thanks, a tidy and well-sourced change.

**@⁠Dark3581** on GitHub · 2026-11-21 12:30 UTC · [original](https://github.com/Dark3581/AnyBox/pull/13#pullrequestreview-6005192437) · **approved these changes** # Reviewed — looks good Landed as it is. The branch conflicted with `main` after the XThread commit, #14 and #12, so I rebased it myself and committed it on `main` as `dc7d8b2`, with you as author. ## What I ran Head `7f896cc`, then the same change rebased on `c8b782d` (after #14 and #12). MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10, clean build directory for both. ## Results | Check | Result | Note | | - | - | - | | MinGW full build | passed | no warnings, at the PR head and after the rebase | | CTest | passed | 36/36 at the PR head, 41/41 after the rebase | | `e2e_sandbox_id`, repeated | passed | 30/30 | | All e2e scenarios, repeated | passed | 5 rounds of the 20 scenarios, 4 in parallel, no failure | | `tools/check_conventions.py`, `tools/debt_fold.py --check` | passed | 10 fragments apply cleanly after the rebase | | `tools/progress.py` | passed | with #12, xgameruntime 56 → 58 implemented of 391 | | CI | passed | Windows, relinker on Linux and macOS, conventions, progress | ## Findings ### Blocking None. ### Non-blocking - `core/libs/xdll/xgameruntime/include/Exports.hpp`: the new declaration stayed in the stub list, in its old alphabetical slot. While resolving the conflicts I moved it next to `XSystemGetConsoleId`, with the other implemented XSystem functions, as #12 does. No code change. ## Not verified Reading a development sandbox set on the PC, and behaviour on a console, as recorded in debt. Thanks, a tidy and well-sourced change.
Author
Owner

@⁠Dark3581 on GitHub · 2026-11-21 12:30 UTC · original

Landed on main as dc7d8b2 (rebased on #14 and #12, you as author). Closing, since the commit went in directly rather than through the merge button. Thanks again.

**@⁠Dark3581** on GitHub · 2026-11-21 12:30 UTC · [original](https://github.com/Dark3581/AnyBox/pull/13#issuecomment-7062618978) Landed on `main` as dc7d8b2 (rebased on #14 and #12, you as author). Closing, since the commit went in directly rather than through the merge button. Thanks again.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.