feat: finish the xgameruntime port to Rust (XPackage, XAsync race, store handles) #285

Closed
github-bot wants to merge 16 commits from github-bot/gh-285 into rust/full AGit
Owner

@⁠LooperSalty on GitHub · 2026-11-26 00:44 UTC · original
LooperSalty:codex/xgameruntime-finish → rust/full · +980 −22 · 15 files · 16 commits · closed without merging

Change

Finishes porting runtime/xgameruntime (C++) to crates/anyxboxx-xgameruntime, written by OpenAI Codex at the maintainer's request, in small commits on top of rust/full 0d5dfa16:

  • XPackage: identity and status queries, installation monitors, asynchronous installation, mounts, local package enumeration, availability and locale queries, installation subscriptions; install order handled; uninstall (not implemented) refused with E_NOTIMPL and logged (rule 3).
  • XAsync: the completion status is published before the call is released (fixes an intermittent race seen in the GDK tests).
  • XStore: closed query handles are rejected.
  • Rust runtime parity checks restored; docs/rust-full-status.md and docs/fr/rust-full-status.md updated together.

Verification (local, Windows)

  • cargo build --release --workspace, cargo test --release --workspace, clippy (-D warnings), fmt, ruff: pass.
  • GDK / runtime pytest against the Rust DLL: 89 targeted tests pass.
  • No game or game file was run or used.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz

**@⁠LooperSalty** on GitHub · 2026-11-26 00:44 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/285) `LooperSalty:codex/xgameruntime-finish` → `rust/full` · +980 −22 · 15 files · 16 commits · closed without merging ## Change Finishes porting `runtime/xgameruntime` (C++) to `crates/anyxboxx-xgameruntime`, written by OpenAI Codex at the maintainer's request, in small commits on top of `rust/full` 0d5dfa16: - XPackage: identity and status queries, installation monitors, asynchronous installation, mounts, local package enumeration, availability and locale queries, installation subscriptions; install order handled; uninstall (not implemented) refused with `E_NOTIMPL` and logged (rule 3). - XAsync: the completion status is published before the call is released (fixes an intermittent race seen in the GDK tests). - XStore: closed query handles are rejected. - Rust runtime parity checks restored; `docs/rust-full-status.md` and `docs/fr/rust-full-status.md` updated together. ## Verification (local, Windows) - `cargo build --release --workspace`, `cargo test --release --workspace`, clippy (`-D warnings`), fmt, ruff: pass. - GDK / runtime pytest against the Rust DLL: 89 targeted tests pass. - No game or game file was run or used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LwHrL4bPjrVJiDKC8BDYfz
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:41:59 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 00:44 UTC · original · edited 2026-11-26 00:46 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T00:46:54.640235Z e753e9a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 00:44 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/285#issuecomment-7179072365) · edited 2026-11-26 00:46 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"e753e9a52aacee09bf218d10fe3a15bcf4ac6539","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-26T00:46:54.640235Z">2026-11-26T00:46:54.640235Z</relative-time> | `e753e9a` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
@ -608,0 +615,4 @@
// Keep the call discoverable while cleanup runs: a waiting GetStatus must
// not observe a missing call with its status still E_PENDING.
call.cleaning.store(true, Ordering::Release);
call.provider(OP_CLEANUP, block, 0, std::ptr::null_mut());
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 00:46 UTC · original

P1 Badge Prevent provider dispatch once cleanup starts

If an operation is canceled before its queued work runs, keeping it in CALLS during cleanup now allows XAsyncSchedule's work callback to find it and invoke OP_DO_WORK after OP_CLEANUP has started freeing its context. For example, save_async::provider frees its boxed Completion during cleanup, while OP_DO_WORK dereferences that same pointer. Previously, removal before cleanup caused a work callback arriving in this interval to return without invoking the provider. The new cleaning flag only guards release, not work or cancellation dispatch, so this introduces a use-after-free window. Keep status waiters able to discover the call without allowing further provider dispatch during cleanup.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 00:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/285#discussion_r4702622189) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Prevent provider dispatch once cleanup starts** If an operation is canceled before its queued work runs, keeping it in `CALLS` during cleanup now allows `XAsyncSchedule`'s work callback to find it and invoke `OP_DO_WORK` after `OP_CLEANUP` has started freeing its context. For example, `save_async::provider` frees its boxed `Completion` during cleanup, while `OP_DO_WORK` dereferences that same pointer. Previously, removal before cleanup caused a work callback arriving in this interval to return without invoking the provider. The new `cleaning` flag only guards `release`, not work or cancellation dispatch, so this introduces a use-after-free window. Keep status waiters able to discover the call without allowing further provider dispatch during cleanup. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
@ -23,0 +23,4 @@
"xgameruntime.dll": (
"xgameruntime.dll",
[str(p.relative_to(REPO)) for pattern in ("tests/test_gdk_*.py", "tests/test_runtime_*.py")
for p in sorted(REPO.glob(pattern))] + ["tests/test_native_services.py"],
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 00:46 UTC · original

P2 Badge Allow expected optional-dependency skips in the parity run

On Windows machines without the system GDK runtime, the newly selected test_runtime_cpp.py intentionally skips test_unknown_interface_delegated_to_windows_fails_cleanly; test_native_services.py likewise skips cases when GameInput is unavailable. However, this wrapper asserts that the subprocess summary contains no skipped, so those supported environments fail the Rust parity check even when every runnable test passes. Account for these expected skips or select only tests whose prerequisites the parity runner guarantees.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 00:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/285#discussion_r4702622194) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Allow expected optional-dependency skips in the parity run** On Windows machines without the system GDK runtime, the newly selected `test_runtime_cpp.py` intentionally skips `test_unknown_interface_delegated_to_windows_fails_cleanly`; `test_native_services.py` likewise skips cases when GameInput is unavailable. However, this wrapper asserts that the subprocess summary contains no `skipped`, so those supported environments fail the Rust parity check even when every runnable test passes. Account for these expected skips or select only tests whose prerequisites the parity runner guarantees. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 00:46 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e753e9a52a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 00:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/285#pullrequestreview-6067039411) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `e753e9a52a` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
github-bot closed this pull request 2026-11-26 11:48:24 +00:00
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-26 11:46 UTC · original

Merged into main through #351 (rust/full into main), which contains every commit of this PR.

🤖 Generated with Claude Code

**@⁠LooperSalty** on GitHub · 2026-11-26 11:46 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/285#issuecomment-7191151313) Merged into main through #351 (rust/full into main), which contains every commit of this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

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