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

Open
github-bot wants to merge 6 commits from github-bot/gh-747 into main AGit
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 13:23 UTC · original
abnalstlll-byte:restore/old-10051-fs-volume-queries → main · +197 −2 · 2 files · 6 commits · open

### Summary
Restores and updates work from draft PR #317 (old-pr/10051 / item OLD-10051).
Original commits by @⁠tedin7 (f69cd721e..e6c5a64b1).

Implements Win32 volume information queries for console virtual drives:

  • GetVolumeInformationW / GetVolumeInformationA: resolves virtual drives without leaking host paths.
    • Queries for GAME: / G:\ resolve to the package root (roots().game).
    • Queries for T:\ and virtual overlay roots resolve to the persistent overlay directory (roots().overlay).
    • Supports ANSI and Unicode APIs, preserving drive identity across overlay directory creation.
  • GetVolumePathNameW / GetVolumePathNameA: returns virtual console root prefix for console paths (G:\, T:\).
  • Unit tests in runtime/test/file_system_test.cpp verify host volume resolution, character encodings, and root path formatting.

Verification

  • python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp -> Clean (no game data)
  • Clean rebase of all 5 commits onto latest ubi/main (21625bca8).

AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 13:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/747) `abnalstlll-byte:restore/old-10051-fs-volume-queries` → `main` · +197 −2 · 2 files · 6 commits · open ### Summary Restores and updates work from draft PR #317 (`old-pr/10051` / item `OLD-10051`). Original commits by @⁠tedin7 (`f69cd721e`..`e6c5a64b1`). Implements Win32 volume information queries for console virtual drives: - `GetVolumeInformationW` / `GetVolumeInformationA`: resolves virtual drives without leaking host paths. - Queries for `GAME:` / `G:\` resolve to the package root (`roots().game`). - Queries for `T:\` and virtual overlay roots resolve to the persistent overlay directory (`roots().overlay`). - Supports ANSI and Unicode APIs, preserving drive identity across overlay directory creation. - `GetVolumePathNameW` / `GetVolumePathNameA`: returns virtual console root prefix for console paths (`G:\`, `T:\`). - Unit tests in `runtime/test/file_system_test.cpp` verify host volume resolution, character encodings, and root path formatting. ### Verification - `python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp` -> Clean (no game data) - Clean rebase of all 5 commits onto latest `ubi/main` (`21625bca8`). AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:19:16 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 01:49 UTC · original

Reviewed 0a4619da. I read the 6-commit diff (runtime/shims/file_system.cpp and runtime/test/file_system_test.cpp) and ran scripts/check_no_game_data.py on both files (clean). file_system_test is a Windows-only target, so it could not run here. On this head's windows CI job it passes (file_system ... Passed, 299/299). The new test block calls resolve("kernel32.dll", "GetVolumeInformationW"), which is null on main, so the test fails there by construction.

Read statically, these all check out:

  • the volume identity: package volume for G:/GAME:, nearest existing overlay ancestor for T:;
  • create_scratch=false, so the volume queries never create the scratch folder or the overlay, while existing callers keep the default;
  • the A/W buffer arithmetic of GetVolumePathName;
  • the error codes.

Merges: clean against current origin/main. It conflicts with sibling PR #766 in file_system.cpp: both insert at the same anchor and extend the FILE_API list. Whichever merges second needs a short rebase. No findings. AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 01:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/747#issuecomment-7150000227) Reviewed 0a4619da. I read the 6-commit diff (`runtime/shims/file_system.cpp` and `runtime/test/file_system_test.cpp`) and ran `scripts/check_no_game_data.py` on both files (clean). `file_system_test` is a Windows-only target, so it could not run here. On this head's `windows` CI job it passes (`file_system ... Passed`, 299/299). The new test block calls `resolve("kernel32.dll", "GetVolumeInformationW")`, which is null on main, so the test fails there by construction. Read statically, these all check out: - the volume identity: package volume for `G:`/`GAME:`, nearest existing overlay ancestor for `T:`; - `create_scratch=false`, so the volume queries never create the scratch folder or the overlay, while existing callers keep the default; - the A/W buffer arithmetic of `GetVolumePathName`; - the error codes. Merges: clean against current `origin/main`. It conflicts with sibling PR #766 in `file_system.cpp`: both insert at the same anchor and extend the `FILE_API` list. Whichever merges second needs a short rebase. No findings. AI-assisted review. **Recommendation:** Merge
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-25 21:53 UTC · original

Rebased onto latest \main.
Verified \scripts/check_no_game_data.py\ (clean) on
untime/shims/file_system.cpp\ and
untime/test/file_system_test.cpp, and \git diff --check.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠abnalstlll-byte** on GitHub · 2026-11-25 21:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/747#issuecomment-7175672214) Rebased onto latest \main\. Verified \scripts/check_no_game_data.py\ (clean) on \ untime/shims/file_system.cpp\ and \ untime/test/file_system_test.cpp\, and \git diff --check\. AI-assisted (Claude Code, Claude Opus 5.5).
This pull request has changes conflicting with the target branch.
  • runtime/shims/file_system.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-747'
git switch 'github-bot/gh-747'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-747'
git switch 'github-bot/gh-747'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-747'
git switch 'main'
git merge --squash 'github-bot/gh-747'
git switch 'main'
git merge --ff-only 'github-bot/gh-747'
git switch 'main'
git merge 'github-bot/gh-747'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.