file_system: GetVolumeInformation and GetVolumePathName answer for the GAME: and T: roots (OLD-10051) #1312

Closed
github-bot wants to merge 5 commits from gh-pr/1312/head into gh-pr/1312/base
Owner

@⁠ambroseautomation on GitHub · 2026-11-24 21:43 UTC · original
ambroseautomation:carry/old-10051-fs-volume-queries → main · +194 −2 · 2 files · 5 commits · closed without merging

Summary

Coordination item: OLD-10051 (carry-forward of old-pr/10051, preserving original author tedin7 across all 5 commits).

Problem & Root Cause

Console titles query volume metadata and volume mount paths on Xbox virtual drives (GAME:, G:, T:) using GetVolumeInformationW/A and GetVolumePathNameW/A. Previously these calls were not intercepted in runtime/shims/file_system.cpp, so queries against virtual console roots failed or did not map to the underlying package/overlay volumes.

Implementation

  • Adds GetVolumeInformationW/A and GetVolumePathNameW/A shims in runtime/shims/file_system.cpp resolving GAME:, G:, and T: virtual drives to their corresponding package/overlay backing volumes.
  • Keeps volume queries read-only (including T: without creating overlay folders on query), Unicode-safe, and keeps overlay volume identity stable.
  • Maps G: volume queries to the package volume.
  • Adds comprehensive tests in runtime/test/file_system_test.cpp.

Tests Run

Environment: Windows 11 Pro 64-bit, Visual Studio 18 Community (cl.exe x64, /std:c++20 /W4 /permissive- /utf-8).

  • file_system_test.exe (compiled with runtime/test/file_system_test.cpp, runtime/shims/file_system.cpp, runtime/shims/registry.cpp, advapi32.lib, /OPT:NOREF) — 531 check(s), 0 failure(s) (PASS)
  • .\scripts\build_runtime.ps1 -jobs 8 — PASS (runtime/build/gta6rt.exe built cleanly)
  • python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp — PASS

Disclosure

AI-assisted: yes (carry-forward, rebase onto current main, and local MSVC build/test verification; original implementation by tedin7).

**@⁠ambroseautomation** on GitHub · 2026-11-24 21:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1312) `ambroseautomation:carry/old-10051-fs-volume-queries` → `main` · +194 −2 · 2 files · 5 commits · closed without merging ## Summary Coordination item: `OLD-10051` (carry-forward of `old-pr/10051`, preserving original author `tedin7` across all 5 commits). ### Problem & Root Cause Console titles query volume metadata and volume mount paths on Xbox virtual drives (`GAME:`, `G:`, `T:`) using `GetVolumeInformationW/A` and `GetVolumePathNameW/A`. Previously these calls were not intercepted in `runtime/shims/file_system.cpp`, so queries against virtual console roots failed or did not map to the underlying package/overlay volumes. ### Implementation - Adds `GetVolumeInformationW/A` and `GetVolumePathNameW/A` shims in `runtime/shims/file_system.cpp` resolving `GAME:`, `G:`, and `T:` virtual drives to their corresponding package/overlay backing volumes. - Keeps volume queries read-only (including `T:` without creating overlay folders on query), Unicode-safe, and keeps overlay volume identity stable. - Maps `G:` volume queries to the package volume. - Adds comprehensive tests in `runtime/test/file_system_test.cpp`. ## Tests Run Environment: Windows 11 Pro 64-bit, Visual Studio 18 Community (`cl.exe` x64, `/std:c++20 /W4 /permissive- /utf-8`). - `file_system_test.exe` (compiled with `runtime/test/file_system_test.cpp`, `runtime/shims/file_system.cpp`, `runtime/shims/registry.cpp`, `advapi32.lib`, `/OPT:NOREF`) — **531 check(s), 0 failure(s)** (PASS) - `.\scripts\build_runtime.ps1 -jobs 8` — PASS (`runtime/build/gta6rt.exe` built cleanly) - `python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp` — PASS ## Disclosure AI-assisted: yes (carry-forward, rebase onto current `main`, and local MSVC build/test verification; original implementation by tedin7).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:47:00 +00:00
github-bot closed this pull request 2026-11-26 09:47:00 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-24 23:48 UTC · original

Verified on Windows host (AI-assisted review), commits through 44b5c072c, MSVC RelWithDebInfo Ninja build.

  • Rebuilt runtime incrementally — clean (only a pre-existing C4456 shadow warning in the test file).
  • runtime/build/file_system_test.exe with user TEMP/TMP: 531 checks, 0 failures. All 24 new checks pass: G:/GAME: volume identity matches the host package volume (serial+flags+filesystem string, W and A), T: matches the overlay ancestor volume and stays stable across overlay creation, rejected paths (T:..\bad) fail without creating the overlay, host paths pass through untouched, short-buffer rejection works.
  • Note: running the test with TEMP pointing at C:\Windows fails early with access-denied on fixture creation — unrelated to the PR, just needs a user-writable TEMP as usual.
  • Behaviour is host-side path/volume resolution only; no GPU-visible change, so no GPU ctest run needed.

Verdict: LGTM.

**@⁠whoalin1** on GitHub · 2026-11-24 23:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1312#issuecomment-7147821822) Verified on Windows host (AI-assisted review), commits through 44b5c072c, MSVC RelWithDebInfo Ninja build. - Rebuilt runtime incrementally — clean (only a pre-existing C4456 shadow warning in the test file). - `runtime/build/file_system_test.exe` with user TEMP/TMP: **531 checks, 0 failures**. All 24 new checks pass: G:/GAME: volume identity matches the host package volume (serial+flags+filesystem string, W and A), T: matches the overlay ancestor volume and stays stable across overlay creation, rejected paths (T:\..\bad) fail without creating the overlay, host paths pass through untouched, short-buffer rejection works. - Note: running the test with TEMP pointing at C:\Windows fails early with access-denied on fixture creation — unrelated to the PR, just needs a user-writable TEMP as usual. - Behaviour is host-side path/volume resolution only; no GPU-visible change, so no GPU ctest run needed. Verdict: LGTM.
Author
Owner

@⁠ambroseautomation on GitHub · 2026-11-25 12:46 UTC · original

Closing as a duplicate of earlier PR #747 (OLD-10051, opened 2026-11-24T13:23:40Z). Thanks @⁠MoonEyes for catching the overlap.

**@⁠ambroseautomation** on GitHub · 2026-11-25 12:46 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1312#issuecomment-7162834628) Closing as a duplicate of earlier PR #747 (OLD-10051, opened 2026-11-24T13:23:40Z). Thanks @⁠MoonEyes for catching the overlap.

Pull request closed

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