file_system: shim CRT _stat* and remove/_unlink for console paths (RT-FS-CRT-STAT-REMOVE) #1464

Closed
piyonchu wants to merge 1 commit from upstream-pr/1464 into main
piyonchu commented 2026-11-25 00:45:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by piyonchu on 2026-11-25T00:45:24Z.


Claimed in the coordination issue as: RT-FS-CRT-STAT-REMOVE

Summary

  • Measures from game_scarlett_master.exe show direct imports and call sites for api-ms-win-crt-filesystem-l1-1-0.dll!_wstat64 and api-ms-win-crt-filesystem-l1-1-0.dll!remove. Because the host UCRT calls Win32 file APIs through its own import table rather than the guest's IAT, console paths (GAME:, G:, T:), overlay copies, and deletion markers were bypassed by CRT stat/remove calls.
  • Implement shims in runtime/shims/file_system.cpp for remove, _wremove, _unlink, _wunlink, _wstat64, _stat64, _wstat64i32, _stat64i32, _wstat32, _stat32, _wstat32i64, and _stat32i64 registered under api-ms-win-crt-filesystem-l1-1-0.dll and ucrtbase.dll.
  • Console-path stat queries resolve overlay vs. package visibility and delete markers via view() / missing_error() and delegate disk resolution to host UCRT _wstat* (preserving long \\?\ paths and UCRT mode/size/time fields); CRT deletes delegate console paths to delete_file_w() and map Win32 failures (ERROR_FILE_NOT_FOUND/ERROR_PATH_NOT_FOUND/ERROR_INVALID_NAME -> ENOENT, ERROR_ACCESS_DENIED -> EACCES, etc.) to errno and _doserrno.
  • Extend runtime/test/file_system_test.cpp with check_crt_stat_remove covering GAME:, G:, T:, overlay shadowing, delete-marker preservation of package files, EACCES on read-only package files and directories, ENOENT on escaped .. paths, and host passthrough.

Verification

  • Built with MSVC (RelWithDebInfo, Windows 11, CPU-only build without Vulkan headers) and ran ctest -C RelWithDebInfo -R "^(file_system|xgameruntime)$" --output-on-failure: 2/2 passed (file_system, xgameruntime).
  • Verified gta6rt.exe --dry-run against a local game_scarlett_master.exe confirms both api-ms-win-crt-filesystem-l1-1-0.dll!_wstat64 and api-ms-win-crt-filesystem-l1-1-0.dll!remove now bind to shim.
  • python -I tests/test_build_runtime_fallback.py and python -I tests/test_text_write_line_endings.py (run below before commit).
  • git diff --check: clean.

AI-assisted; synthetic tests + --dry-run import check on Windows 11 (CPU-only build; no game files included).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482910351 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464). Originally posted by [piyonchu](https://github.com/piyonchu) on 2026-11-25T00:45:24Z. --- Claimed in the coordination issue as: RT-FS-CRT-STAT-REMOVE ### Summary - Measures from `game_scarlett_master.exe` show direct imports and call sites for `api-ms-win-crt-filesystem-l1-1-0.dll!_wstat64` and `api-ms-win-crt-filesystem-l1-1-0.dll!remove`. Because the host UCRT calls Win32 file APIs through its own import table rather than the guest's IAT, console paths (`GAME:`, `G:`, `T:`), overlay copies, and deletion markers were bypassed by CRT stat/remove calls. - Implement shims in `runtime/shims/file_system.cpp` for `remove`, `_wremove`, `_unlink`, `_wunlink`, `_wstat64`, `_stat64`, `_wstat64i32`, `_stat64i32`, `_wstat32`, `_stat32`, `_wstat32i64`, and `_stat32i64` registered under `api-ms-win-crt-filesystem-l1-1-0.dll` and `ucrtbase.dll`. - Console-path stat queries resolve overlay vs. package visibility and delete markers via `view()` / `missing_error()` and delegate disk resolution to host UCRT `_wstat*` (preserving long `\\?\` paths and UCRT mode/size/time fields); CRT deletes delegate console paths to `delete_file_w()` and map Win32 failures (`ERROR_FILE_NOT_FOUND`/`ERROR_PATH_NOT_FOUND`/`ERROR_INVALID_NAME` -> `ENOENT`, `ERROR_ACCESS_DENIED` -> `EACCES`, etc.) to `errno` and `_doserrno`. - Extend `runtime/test/file_system_test.cpp` with `check_crt_stat_remove` covering `GAME:`, `G:`, `T:`, overlay shadowing, delete-marker preservation of package files, `EACCES` on read-only package files and directories, `ENOENT` on escaped `..` paths, and host passthrough. ### Verification - Built with MSVC (`RelWithDebInfo`, Windows 11, CPU-only build without Vulkan headers) and ran `ctest -C RelWithDebInfo -R "^(file_system|xgameruntime)$" --output-on-failure`: **2/2 passed** (`file_system`, `xgameruntime`). - Verified `gta6rt.exe --dry-run` against a local `game_scarlett_master.exe` confirms both `api-ms-win-crt-filesystem-l1-1-0.dll!_wstat64` and `api-ms-win-crt-filesystem-l1-1-0.dll!remove` now bind to `shim`. - `python -I tests/test_build_runtime_fallback.py` and `python -I tests/test_text_write_line_endings.py` (run below before commit). - `git diff --check`: clean. *AI-assisted; synthetic tests + `--dry-run` import check on Windows 11 (CPU-only build; no game files included).*
Gefik23 commented 2026-11-25 07:04:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Gefik23 on 2026-11-25T07:04:17Z.


Tested 8b658972a on NVIDIA GeForce RTX 4060, driver 617.42, AMD Ryzen 5 7500F, Windows 11 Pro build 26200, native Windows: pass.

Built at this head with scripts\build_runtime.ps1 (MSVC 19.44, VS 2022 Build Tools, Ninja, RelWithDebInfo, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0).

  • ctest -R file_system -V: passed.
  • Full ctest -C RelWithDebInfo: 350/350 passed (game-data tests skipped, LEONIDA_GAME_DIR unset).

AI-assisted (Claude Code ran the build and tests). No game files.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7155455340 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1464#issuecomment-7155455340). Originally posted by [Gefik23](https://github.com/Gefik23) on 2026-11-25T07:04:17Z. --- Tested 8b658972a on NVIDIA GeForce RTX 4060, driver 617.42, AMD Ryzen 5 7500F, Windows 11 Pro build 26200, native Windows: pass. Built at this head with `scripts\build_runtime.ps1` (MSVC 19.44, VS 2022 Build Tools, Ninja, RelWithDebInfo, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0). - `ctest -R file_system -V`: passed. - Full `ctest -C RelWithDebInfo`: 350/350 passed (game-data tests skipped, LEONIDA_GAME_DIR unset). AI-assisted (Claude Code ran the build and tests). No game files.
whoalin1 commented 2026-11-25 07:24:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T07:24:08Z.


Independent verification (CPU-only change, no GPU needed): built file_system_test + unimplemented_policy_test on native Windows (MSVC 2022, Ninja, RelWithDebInfo) and ran ctest -R file_system — 1/1 pass including the new check_crt_stat_remove (console-path stat, overlay shadowing, delete markers, errno mapping, host passthrough). Diff review agrees with the PR's claims: console paths route through the existing parse_console/view/missing_error/delete_file_w helpers and Win32 errors map correctly. AI-assisted verification.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7155819170 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1464#issuecomment-7155819170). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T07:24:08Z. --- Independent verification (CPU-only change, no GPU needed): built `file_system_test` + `unimplemented_policy_test` on native Windows (MSVC 2022, Ninja, RelWithDebInfo) and ran `ctest -R file_system` — 1/1 pass including the new `check_crt_stat_remove` (console-path stat, overlay shadowing, delete markers, errno mapping, host passthrough). Diff review agrees with the PR's claims: console paths route through the existing `parse_console`/`view`/`missing_error`/`delete_file_w` helpers and Win32 errors map correctly. AI-assisted verification.
piyonchu commented 2026-11-26 02:47:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by piyonchu on 2026-11-26T02:47:45Z.


Rebased onto latest main (86dc3d86e, head commit fc6fb0bd0) and updated the T: test setup in runtime/test/file_system_test.cpp to write to own_t_folder(layer) (matching per-process scratch_dir()).

Verified locally after rebase:

  • python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp
  • cmake --build runtime/build --config RelWithDebInfo --target gta6rt file_system_test
  • ctest --test-dir runtime/build -C RelWithDebInfo -R "^file_system$" --output-on-failure (1/1 passed)
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7181125855 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1464#issuecomment-7181125855). Originally posted by [piyonchu](https://github.com/piyonchu) on 2026-11-26T02:47:45Z. --- Rebased onto latest `main` (`86dc3d86e`, head commit `fc6fb0bd0`) and updated the `T:` test setup in `runtime/test/file_system_test.cpp` to write to `own_t_folder(layer)` (matching per-process `scratch_dir()`). Verified locally after rebase: - `python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp` - `cmake --build runtime/build --config RelWithDebInfo --target gta6rt file_system_test` - `ctest --test-dir runtime/build -C RelWithDebInfo -R "^file_system$" --output-on-failure` (1/1 passed)
MoonEyes commented 2026-11-28 17:59:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:59:43Z.


Hi @piyonchu, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/shims/file_system.cpp), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243446496 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7243446496). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T17:59:43Z. --- Hi @piyonchu, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/shims/file_system.cpp`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
OreoFR commented 2026-11-28 21:51:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:51:27Z.


Verified by OreoFR

  • Base: main c1ecf04ed + PR head fc6fb0bd0
  • Test: not run (merge conflict with main)
  • Red on main: not run
  • Green with the PR: not run
  • Verdict: CONFLICT (runtime/shims/file_system.cpp conflicts with main)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246323896 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7246323896). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:51:27Z. --- **Verified by OreoFR** - Base: main `c1ecf04ed` + PR head `fc6fb0bd0` - Test: not run (merge conflict with main) - Red on main: not run - Green with the PR: not run - Verdict: CONFLICT (runtime/shims/file_system.cpp conflicts with main) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
piyonchu commented 2026-11-29 01:21:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by piyonchu on 2026-11-29T01:21:37Z.


Rebased onto latest main (16f505304, head commit 596c49f37), keeping both the upstream get_disk_free_space_* shims and the crt_* stat/remove shims cleanly separated in runtime/shims/file_system.cpp.

Verified locally after rebase:

  • git diff --check cont/main..HEAD
  • python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp
  • cmake --build runtime/build --config RelWithDebInfo --target gta6rt file_system_test
  • ctest --test-dir runtime/build -C RelWithDebInfo -R "^file_system$" --output-on-failure (1/1 passed)
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248730940 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7248730940). Originally posted by [piyonchu](https://github.com/piyonchu) on 2026-11-29T01:21:37Z. --- Rebased onto latest `main` (`16f505304`, head commit `596c49f37`), keeping both the upstream `get_disk_free_space_*` shims and the `crt_*` stat/remove shims cleanly separated in `runtime/shims/file_system.cpp`. Verified locally after rebase: - `git diff --check cont/main..HEAD` - `python -I scripts/check_no_game_data.py runtime/shims/file_system.cpp runtime/test/file_system_test.cpp` - `cmake --build runtime/build --config RelWithDebInfo --target gta6rt file_system_test` - `ctest --test-dir runtime/build -C RelWithDebInfo -R "^file_system$" --output-on-failure` (1/1 passed)
zmasi commented 2026-11-29 02:24:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T02:24:58Z.


Windows 11 + NTFS Verification (596c49f37c merged with origin/main 02944d4ca1)

  • Environment: Windows 11 (10.0.26200) NTFS, MSVC 19.44.35228 (Release, /W4 /permissive- /utf-8), clean merge onto origin/main (0 conflicts).
  • Red -> Green:
    • Red (origin/main runtime/shims/file_system.cpp + PR runtime/test/file_system_test.cpp): file_system_test failed (rc=1, 545 check(s), 1 failure(s) — api-ms-win-crt-filesystem-l1-1-0.dll and ucrtbase.dll did not expose _wstat64, _stat64, _wstat64i32, _stat64i32, remove, _wremove, _unlink, _wunlink).
    • Green (origin/main + #1464): file_system_test passed 559 check(s), 0 failure(s) (rc=0, 22.24s), verifying:
      • _wstat64 / _stat64i32 / _stat64 across GAME:, G:, and T: scratch roots (regular files, directories, and overlay copy-up size shadowing).
      • remove / _wremove / _unlink / _wunlink scratch deletion (T:), package delete-marker creation leaving package files untouched (ENOENT on subsequent _wstat64), FILE_ATTRIBUTE_READONLY package file refusal (EACCES), directory _wunlink refusal (EACCES), GAME:/../outside.txt traversal refusal (ENOENT), and native host path passthrough.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249413499 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7249413499). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T02:24:58Z. --- ### Windows 11 + NTFS Verification (`596c49f37c` merged with `origin/main` `02944d4ca1`) - **Environment**: Windows 11 (`10.0.26200`) NTFS, MSVC `19.44.35228` (`Release`, `/W4 /permissive- /utf-8`), clean merge onto `origin/main` (`0` conflicts). - **Red -> Green**: - **Red (`origin/main` `runtime/shims/file_system.cpp` + PR `runtime/test/file_system_test.cpp`)**: `file_system_test` failed (`rc=1`, `545 check(s), 1 failure(s)` — `api-ms-win-crt-filesystem-l1-1-0.dll` and `ucrtbase.dll` did not expose `_wstat64`, `_stat64`, `_wstat64i32`, `_stat64i32`, `remove`, `_wremove`, `_unlink`, `_wunlink`). - **Green (`origin/main + #1464`)**: `file_system_test` passed **`559 check(s), 0 failure(s)`** (`rc=0`, `22.24s`), verifying: - `_wstat64` / `_stat64i32` / `_stat64` across `GAME:`, `G:`, and `T:` scratch roots (regular files, directories, and overlay copy-up size shadowing). - `remove` / `_wremove` / `_unlink` / `_wunlink` scratch deletion (`T:`), package delete-marker creation leaving package files untouched (`ENOENT` on subsequent `_wstat64`), `FILE_ATTRIBUTE_READONLY` package file refusal (`EACCES`), directory `_wunlink` refusal (`EACCES`), `GAME:/../outside.txt` traversal refusal (`ENOENT`), and native host path passthrough. AI-assisted.
TheGeogeo commented 2026-11-29 14:18:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:18:11Z.


Ready for testing: merges cleanly with main 3535eb5c4. Not in main yet: git cherry finds 1 commit(s) not there, and 10 of the 143 lines it adds are already present. No duplicate found: its claim RT-FS-CRT-STAT-REMOVE appears in no other open pull request and in no main commit.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257197500 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7257197500). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:18:11Z. --- Ready for testing: merges cleanly with `main` `3535eb5c4`. Not in `main` yet: `git cherry` finds 1 commit(s) not there, and 10 of the 143 lines it adds are already present. No duplicate found: its claim `RT-FS-CRT-STAT-REMOVE` appears in no other open pull request and in no `main` commit. AI-assisted (Claude Code).
enlight3d commented 2026-11-29 15:51:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T15:51:41Z.


RUN report for #1464 (RT-FS-CRT-STAT-REMOVE)

Heads: PR head 596c49f37 (base 16f505304); origin/main c22a0a732, merged locally with git merge --no-ff (clean, 2 files).

Kind: runtime C++ (runtime/shims/file_system.cpp, runtime/test/file_system_test.cpp).

Commands (VS 2022 vcvars64 shell, Ninja, RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON, SDL3 via SDL3_DIR):

  • cmake -S runtime -B <build> -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
  • cmake --build <build> -j 8 --target file_system_test (merged tree and plain main: --target gta6rt file_system_test)
  • ctest --test-dir <build> -R "^file_system$" --output-on-failure
  • python -I -B tests/<file> for test_build_runtime_fallback.py, test_text_write_line_endings.py, test_ctest_registration.py

Results:

  • RED (behavioural: runtime/shims/file_system.cpp reverted to the PR base, test file kept; it builds because the test resolves the shims by name): file_system fails with FAIL api-ms-win-crt-filesystem-l1-1-0 and ucrtbase serve CRT stat and remove/unlink (the shims are not registered, so the rest of check_crt_stat_remove is skipped).
  • GREEN at PR head: file_system passes (1/1). test_text_write_line_endings.py 3 OK, test_ctest_registration.py 7 OK.
  • GREEN merged into origin/main: file_system passes (1/1). test_build_runtime_fallback.py 11 OK, test_text_write_line_endings.py 3 OK, test_ctest_registration.py 11 OK.
  • Pre-existing, not caused by the PR: at the PR head test_build_runtime_fallback.py fails test_the_loader_gets_the_stack_reserve_cmake_gives_it (1 of 11). It fails the same way on the PR's own base 16f505304 and passes on current main and in the merge, so the branch is just behind main.
  • gta6rt imports (dumpbin /imports, DLL!symbol, merged vs plain main c22a0a732): 714 on main, 726 merged; 12 new, none removed:
    • api-ms-win-crt-filesystem-l1-1-0.dll! _stat32, _stat32i64, _stat64, _stat64i32, _wremove, _wstat32, _wstat32i64, _wstat64, _wstat64i32, remove
    • api-ms-win-crt-runtime-l1-1-0.dll! _set_doserrno, _set_errno
      All are UCRT apiset imports of the host CRT; no new DLL.
  • Not checked: the xgameruntime CTest named in the description, and the --dry-run binding check against the game executable (needs the game; not run here).

Machine: Windows 11 Pro x64, RTX 3090 24 GB (has VK_EXT_mesh_shader), NVIDIA 621.40, MSVC 14.44 (VS 2022 Build Tools), CMake/Ninja from VS, Vulkan SDK 1.4.363.1, SDL3 3.4.20 static, Python 3.13.12.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7258425489 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7258425489). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T15:51:41Z. --- RUN report for #1464 (RT-FS-CRT-STAT-REMOVE) Heads: PR head `596c49f37` (base `16f505304`); origin/main `c22a0a732`, merged locally with `git merge --no-ff` (clean, 2 files). Kind: runtime C++ (`runtime/shims/file_system.cpp`, `runtime/test/file_system_test.cpp`). Commands (VS 2022 vcvars64 shell, Ninja, RelWithDebInfo, `-DLEONIDA_REQUIRE_VULKAN=ON`, SDL3 via SDL3_DIR): - `cmake -S runtime -B <build> -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON` - `cmake --build <build> -j 8 --target file_system_test` (merged tree and plain main: `--target gta6rt file_system_test`) - `ctest --test-dir <build> -R "^file_system$" --output-on-failure` - `python -I -B tests/<file>` for `test_build_runtime_fallback.py`, `test_text_write_line_endings.py`, `test_ctest_registration.py` Results: - RED (behavioural: `runtime/shims/file_system.cpp` reverted to the PR base, test file kept; it builds because the test resolves the shims by name): `file_system` fails with `FAIL api-ms-win-crt-filesystem-l1-1-0 and ucrtbase serve CRT stat and remove/unlink` (the shims are not registered, so the rest of `check_crt_stat_remove` is skipped). - GREEN at PR head: `file_system` passes (1/1). `test_text_write_line_endings.py` 3 OK, `test_ctest_registration.py` 7 OK. - GREEN merged into origin/main: `file_system` passes (1/1). `test_build_runtime_fallback.py` 11 OK, `test_text_write_line_endings.py` 3 OK, `test_ctest_registration.py` 11 OK. - Pre-existing, not caused by the PR: at the PR head `test_build_runtime_fallback.py` fails `test_the_loader_gets_the_stack_reserve_cmake_gives_it` (1 of 11). It fails the same way on the PR's own base `16f505304` and passes on current main and in the merge, so the branch is just behind main. - gta6rt imports (`dumpbin /imports`, DLL!symbol, merged vs plain main `c22a0a732`): 714 on main, 726 merged; 12 new, none removed: - `api-ms-win-crt-filesystem-l1-1-0.dll!` `_stat32`, `_stat32i64`, `_stat64`, `_stat64i32`, `_wremove`, `_wstat32`, `_wstat32i64`, `_wstat64`, `_wstat64i32`, `remove` - `api-ms-win-crt-runtime-l1-1-0.dll!` `_set_doserrno`, `_set_errno` All are UCRT apiset imports of the host CRT; no new DLL. - Not checked: the `xgameruntime` CTest named in the description, and the `--dry-run` binding check against the game executable (needs the game; not run here). Machine: Windows 11 Pro x64, RTX 3090 24 GB (has VK_EXT_mesh_shader), NVIDIA 621.40, MSVC 14.44 (VS 2022 Build Tools), CMake/Ninja from VS, Vulkan SDK 1.4.363.1, SDL3 3.4.20 static, Python 3.13.12.
fiestorra commented 2026-11-30 11:31:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T11:31:06Z.


Independent verification on this machine (Windows 11, MSVC 19.44.35226), with a negative control that bites.

1. It applies and builds. merge-tree clean onto main d367675c7; runtime/shims/file_system.cpp plus its test.

2. With the branch: ctest -R 'file_system' -> 100% tests passed, 0 tests failed out of 1.

3. The control - revert only the shim, keep the test:

git checkout origin/main -- runtime/shims/file_system.cpp
cmake --build … --target file_system_test
ctest -R 'file_system' --output-on-failure
0% tests passed, 1 tests failed out of 1
FAIL api-ms-win-crt-filesystem-l1-1-0 and ucrtbase serve CRT stat and remove/unlink

The assertion names the change: the CRT's stat and remove/unlink, resolved through api-ms-win-crt-filesystem-l1-1-0 and ucrtbase, must be served by the shim rather than the host's runtime - so a title that stats a GAME: path gets the emulated file, not a host ENOENT.

The note that now applies to four pull requests: #977, #1234, #1464 and #2375 all modify runtime/shims/file_system.cpp, each with a control that bites, each on a different entry point (GetDriveTypeW/A, CRT stat/remove, the file-system API, MoveFile*). Four branches, one shim: three rebases whichever lands first, and none supersedes another.

What I did not test: the rest of the CRT file surface, and whether the shim's stat fills st_size/st_mode the way a title expects.

Why I am commenting: I verify open pull requests that replay onto current main, build the binaries their tests name, run them, then revert only the source change. 31 controls so far: 24 bite.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7277142461 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7277142461). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T11:31:06Z. --- Independent verification on this machine (Windows 11, MSVC 19.44.35226), with a negative control that bites. **1. It applies and builds.** `merge-tree` clean onto `main` `d367675c7`; `runtime/shims/file_system.cpp` plus its test. **2. With the branch:** `ctest -R 'file_system'` -> **100% tests passed, 0 tests failed out of 1**. **3. The control - revert only the shim, keep the test:** ``` git checkout origin/main -- runtime/shims/file_system.cpp cmake --build … --target file_system_test ctest -R 'file_system' --output-on-failure 0% tests passed, 1 tests failed out of 1 FAIL api-ms-win-crt-filesystem-l1-1-0 and ucrtbase serve CRT stat and remove/unlink ``` **The assertion names the change**: the **CRT's** `stat` and `remove`/`unlink`, resolved through `api-ms-win-crt-filesystem-l1-1-0` and `ucrtbase`, must be **served by the shim** rather than the host's runtime - so a title that stats a `GAME:` path gets the emulated file, not a host `ENOENT`. **The note that now applies to four pull requests:** **#977, #1234, #1464 and #2375 all modify `runtime/shims/file_system.cpp`**, each with a control that bites, each on a different entry point (`GetDriveTypeW/A`, CRT `stat`/`remove`, the file-system API, `MoveFile*`). **Four branches, one shim: three rebases whichever lands first**, and none supersedes another. **What I did not test:** the rest of the CRT file surface, and whether the shim's `stat` fills `st_size`/`st_mode` the way a title expects. **Why I am commenting:** I verify open pull requests that replay onto current `main`, build the binaries their tests name, run them, then revert **only** the source change. **31 controls so far: 24 bite.** Written with an AI assistant.
aslan2142 commented 2026-12-01 16:36:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:36:08Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317877133 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1464#issuecomment-7317877133). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:36:08Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

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!1464
No description provided.