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

Closed
ambroseautomation wants to merge 5 commits from upstream-pr/1312 into main
ambroseautomation commented 2026-11-24 21:43:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ambroseautomation on 2026-11-24T21:43:08Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480828387 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1312). Originally posted by [ambroseautomation](https://github.com/ambroseautomation) on 2026-11-24T21:43:08Z. --- ## 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).
whoalin1 commented 2026-11-24 23:48:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T23:48:46Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147821822 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1312#issuecomment-7147821822). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-24T23:48:46Z. --- 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.
ambroseautomation commented 2026-11-25 12:46:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ambroseautomation on 2026-11-25T12:46:23Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7162834628 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1312#issuecomment-7162834628). Originally posted by [ambroseautomation](https://github.com/ambroseautomation) on 2026-11-25T12:46:23Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
ProjectLeonida/mandy!1312
No description provided.