VFS: fix Unicode case-folding slicing and verbatim root normalisation #313

Merged
Michael-Glaser merged 1 commit from upstream-pr/316 into main 2026-12-02 17:37:26 +00:00
Michael-Glaser commented 2026-11-23 23:08:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-23T23:08:36Z.


Vfs::classify_with sliced un-lowercased abs using self.game_root.len() + 1 after .to_lowercase(), which panics or corrupts rel when Unicode case folding changes UTF-8 byte length (ẞ, İ, K). Vfs::new also missed strip_verbatim on game_root and data_root_lc.

What is in it

  • crates/xcl/src/vfs.rs: match game_root_lc per \ component (strip_path_prefix_ci, trimming repeated separators), handle \\?\ and \??\ UNC prefixes case-insensitively in strip_verbatim, apply strip_verbatim + trim_sep to roots in Vfs::new, and add classify_handles_unicode_case_folding_and_verbatim_roots.

Tested

  • Cross-checked on macOS (aarch64-apple-darwin, Rust 1.100.0): cargo check --offline --target x86_64-pc-windows-msvc --workspace --tests (0 errors, 0 new warnings).
  • Community Windows runs by @regiumlepidi (RTX 5070 Ti + RDNA2 iGPU: 667 passed, 0 failed, 41 ignored; negative control confirmed) and @DavidM1911 (RTX 3060 Ti, Windows 11, merged with main: cargo test -p xcl --lib passed).

Regression run
Retail 60 s smoke run contributed by @Toons29 (AMD Radeon RX 9070 RDNA4, driver 32.0.32029.2010, Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, release build, XCL_NETWORK=0):

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: a9ce85eaf70e082b55b3b0180755e39c5a79418c
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1634 (PresentX 1635)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14813 MB

Not tested

  • Not built or executed locally on Windows; the 60 s retail smoke run does not confirm whether that title uses non-ASCII / verbatim paths; Intel GPUs not tested.

AI use

  • Antigravity with Gemini 4 Neon (audit, fix, unit test, description); community smoke run by @Toons29 with Claude Code (Claude Opus 5.5).
<!-- greyfinch-sync:ivall/xcl:issue:5462823648 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-23T23:08:36Z. --- `Vfs::classify_with` sliced un-lowercased `abs` using `self.game_root.len() + 1` after `.to_lowercase()`, which panics or corrupts `rel` when Unicode case folding changes UTF-8 byte length (`ẞ`, `İ`, `K`). `Vfs::new` also missed `strip_verbatim` on `game_root` and `data_root_lc`. **What is in it** - `crates/xcl/src/vfs.rs`: match `game_root_lc` per `\` component (`strip_path_prefix_ci`, trimming repeated separators), handle `\\?\` and `\??\` UNC prefixes case-insensitively in `strip_verbatim`, apply `strip_verbatim` + `trim_sep` to roots in `Vfs::new`, and add `classify_handles_unicode_case_folding_and_verbatim_roots`. **Tested** - Cross-checked on macOS (`aarch64-apple-darwin`, Rust 1.100.0): `cargo check --offline --target x86_64-pc-windows-msvc --workspace --tests` (0 errors, 0 new warnings). - Community Windows runs by `@regiumlepidi` (RTX 5070 Ti + RDNA2 iGPU: 667 passed, 0 failed, 41 ignored; negative control confirmed) and `@DavidM1911` (RTX 3060 Ti, Windows 11, merged with `main`: `cargo test -p xcl --lib` passed). **Regression run** Retail 60 s smoke run contributed by `@Toons29` (AMD Radeon RX 9070 RDNA4, driver 32.0.32029.2010, Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0, release build, `XCL_NETWORK=0`): ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: a9ce85eaf70e082b55b3b0180755e39c5a79418c gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1634 (PresentX 1635) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14813 MB ``` **Not tested** - Not built or executed locally on Windows; the 60 s retail smoke run does not confirm whether that title uses non-ASCII / verbatim paths; Intel GPUs not tested. **AI use** - Antigravity with Gemini 4 Neon (audit, fix, unit test, description); community smoke run by `@Toons29` with Claude Code (Claude Opus 5.5).
0xKaji commented 2026-11-24 07:04:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by 0xKaji on 2026-11-23T23:49:11Z.


Reviewed commit f0bd1ea statically on Linux (not built or executed on Windows; assisted by T3 Code + Gemini 4 Neon).

strip_path_prefix_ci looks sound: every slice index is on an ASCII \ boundary within abs, so it eliminates the UTF-8 slicing panics and corrupted rel slices for length-changing case folds (ẞ, İ, K) without introducing regressions on standard paths.

A few concrete items before moving this out of draft:

  1. Merge blockers (CONTRIBUTING.md / PR checks):

    • PR checks is currently failing because crates/xcl/src/vfs.rs is runtime code and **Regression run** is missing the two xcl-smoke v1 blocks (main and PR head f0bd1ea, clean working tree) from scripts/smoke.ps1.
    • Windows cargo test --workspace -- --test-threads=4 counts (and green CI) are still needed in **Tested**.
  2. strip_verbatim (crates/xcl/src/vfs.rs:102-113) mishandles lowercase \\?\unc\... and \??\UNC\...:

    • Pre-existing in strip_verbatim, but now also called from Vfs::new (vfs.rs:192, 207, 210).
    • is_device (vfs.rs:157-160) matches \\?\ and \??\ with ASCII case-insensitive unc\, whereas strip_verbatim only checks exact uppercase "\\\\?\\UNC\\".
    • Concrete failing inputs: \\?\unc\server\share\file.bin and \??\UNC\server\share\file.bin bypass is_device, fall through to strip_prefix("\\\\?\\") / strip_prefix("\\??\\"), and become relative "unc\\server\\share\\file.bin" / "UNC\\server\\share\\file.bin". That bypasses the p.starts_with("\\\\") UNC guard (vfs.rs:286) and resolves relative to CWD (misclassifying as Target::Game when CWD is inside game_root).
    • Stripping \\?\ or \??\ first and then checking r.get(..4).is_some_and(|s| s.eq_ignore_ascii_case("UNC\\")) would keep strip_verbatim consistent with is_device (fine either here or as a small follow-up PR).
  3. Minor non-blocking edge cases / test notes:

    • In strip_path_prefix_ci (vfs.rs:143), &abs[pos + 1..] returns a leading \ if abs has repeated separators after the root (e.g. classify_with("C:\\Games\\Title\\\\Data\\a.bin", id) → rel: "\\Data\\a.bin"). GetFullPathNameW collapses \\ for normal paths, but abs[pos + 1..].trim_start_matches('\\') guarantees the Target::Game invariant unconditionally.
    • Pre-existing note (separate scope): if game_root is a drive root like X:\ or \\?\X:\, trim_sep stores "X:", so original_path("") returns "X:" (drive-relative CWD in Win32) instead of "X:\\".
    • In classify_handles_unicode_case_folding_and_verbatim_roots, it would be useful to also assert vc.classify_with("C:\\Games\\Title\\Data\\x.bin", id) (verbatim game_root_lc not hijacked by the C: mount) and a mixed / + \ Unicode case-folding input.
<!-- greyfinch-sync:ivall/xcl:comment:7117397458 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/316#issuecomment-7117397458). Originally posted by [0xKaji](https://github.com/0xKaji) on 2026-11-23T23:49:11Z. --- Reviewed commit `f0bd1ea` statically on Linux (not built or executed on Windows; assisted by T3 Code + Gemini 4 Neon). `strip_path_prefix_ci` looks sound: every slice index is on an ASCII `\` boundary within `abs`, so it eliminates the UTF-8 slicing panics and corrupted `rel` slices for length-changing case folds (`ẞ`, `İ`, `K`) without introducing regressions on standard paths. A few concrete items before moving this out of draft: 1. **Merge blockers (`CONTRIBUTING.md` / `PR checks`):** - `PR checks` is currently failing because `crates/xcl/src/vfs.rs` is runtime code and `**Regression run**` is missing the two `xcl-smoke v1` blocks (`main` and PR head `f0bd1ea`, clean working tree) from `scripts/smoke.ps1`. - Windows `cargo test --workspace -- --test-threads=4` counts (and green `CI`) are still needed in `**Tested**`. 2. **`strip_verbatim` (`crates/xcl/src/vfs.rs:102-113`) mishandles lowercase `\\?\unc\...` and `\??\UNC\...`:** - Pre-existing in `strip_verbatim`, but now also called from `Vfs::new` (`vfs.rs:192, 207, 210`). - `is_device` (`vfs.rs:157-160`) matches `\\?\` and `\??\` with ASCII case-insensitive `unc\`, whereas `strip_verbatim` only checks exact uppercase `"\\\\?\\UNC\\"`. - Concrete failing inputs: `\\?\unc\server\share\file.bin` and `\??\UNC\server\share\file.bin` bypass `is_device`, fall through to `strip_prefix("\\\\?\\")` / `strip_prefix("\\??\\")`, and become relative `"unc\\server\\share\\file.bin"` / `"UNC\\server\\share\\file.bin"`. That bypasses the `p.starts_with("\\\\")` UNC guard (`vfs.rs:286`) and resolves relative to CWD (misclassifying as `Target::Game` when CWD is inside `game_root`). - Stripping `\\?\` or `\??\` first and then checking `r.get(..4).is_some_and(|s| s.eq_ignore_ascii_case("UNC\\"))` would keep `strip_verbatim` consistent with `is_device` (fine either here or as a small follow-up PR). 3. **Minor non-blocking edge cases / test notes:** - In `strip_path_prefix_ci` (`vfs.rs:143`), `&abs[pos + 1..]` returns a leading `\` if `abs` has repeated separators after the root (e.g. `classify_with("C:\\Games\\Title\\\\Data\\a.bin", id)` → `rel: "\\Data\\a.bin"`). `GetFullPathNameW` collapses `\\` for normal paths, but `abs[pos + 1..].trim_start_matches('\\')` guarantees the `Target::Game` invariant unconditionally. - Pre-existing note (separate scope): if `game_root` is a drive root like `X:\` or `\\?\X:\`, `trim_sep` stores `"X:"`, so `original_path("")` returns `"X:"` (drive-relative CWD in Win32) instead of `"X:\\"`. - In `classify_handles_unicode_case_folding_and_verbatim_roots`, it would be useful to also assert `vc.classify_with("C:\\Games\\Title\\Data\\x.bin", id)` (verbatim `game_root_lc` not hijacked by the `C:` mount) and a mixed `/` + `\` Unicode case-folding input.
regiumlepidi commented 2026-11-24 07:04:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by regiumlepidi on 2026-11-23T23:56:51Z.


A Windows run for this draft, since Not tested says it has not been built or run on Windows yet: f0bd1ea merged onto current main db1ddb2 (clean merge): builds and passes, and the new test fails on main.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB, driver 617.42 (32.0.16.1742); also with XCL_ADAPTER=radeon (the Ryzen 7 9800X3D's RDNA2 iGPU, driver 32.0.21030.2001)
  • Ryzen 7 9800X3D, 48 GB, Windows 11 Pro 25H2, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100, debug
  • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4), no XCL_SAMPLE_* set
Build RTX 5070 Ti RDNA2 iGPU
main db1ddb2 666 passed, 0 failed, 41 ignored 666 passed, 0 failed, 41 ignored
f0bd1ea on db1ddb2 667 passed, 0 failed, 41 ignored 667 passed, 0 failed, 41 ignored

classify_handles_unicode_case_folding_and_verbatim_roots copied unchanged into main's vfs.rs fails at its first case, with the corrupted slice the description names:

assertion `left == right` failed: root="C:\\Games\\GROẞẞ" input="C:\\Games\\großß\\Data\\a.bin"
  left: Game { rel: "ta\\a.bin" }
 right: Game { rel: "Data\\a.bin" }

With this PR's vfs.rs it passes.

Not tested

  • scripts/smoke.ps1 (I have no Series title), so the Regression run blocks the PR check asks for still have to come from someone who has one.
  • The lowercase \\?\unc\ / \??\UNC\ case raised in the review above.

AI use: Claude Code with Claude Opus 5.5 ran the build and tests and wrote this comment; the numbers come from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7117534789 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/316#issuecomment-7117534789). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-23T23:56:51Z. --- A Windows run for this draft, since **Not tested** says it has not been built or run on Windows yet: `f0bd1ea` merged onto current `main` `db1ddb2` (clean merge): **builds and passes**, and the new test fails on `main`. **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB, driver 617.42 (32.0.16.1742); also with `XCL_ADAPTER=radeon` (the Ryzen 7 9800X3D's RDNA2 iGPU, driver 32.0.21030.2001) - Ryzen 7 9800X3D, 48 GB, Windows 11 Pro 25H2, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100, debug - `.\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`), no `XCL_SAMPLE_*` set | Build | RTX 5070 Ti | RDNA2 iGPU | |---|---|---| | `main` `db1ddb2` | 666 passed, 0 failed, 41 ignored | 666 passed, 0 failed, 41 ignored | | `f0bd1ea` on `db1ddb2` | 667 passed, 0 failed, 41 ignored | 667 passed, 0 failed, 41 ignored | `classify_handles_unicode_case_folding_and_verbatim_roots` copied unchanged into `main`'s `vfs.rs` fails at its first case, with the corrupted slice the description names: ``` assertion `left == right` failed: root="C:\\Games\\GROẞẞ" input="C:\\Games\\großß\\Data\\a.bin" left: Game { rel: "ta\\a.bin" } right: Game { rel: "Data\\a.bin" } ``` With this PR's `vfs.rs` it passes. **Not tested** - `scripts/smoke.ps1` (I have no Series title), so the **Regression run** blocks the PR check asks for still have to come from someone who has one. - The lowercase `\\?\unc\` / `\??\UNC\` case raised in the review above. AI use: Claude Code with Claude Opus 5.5 ran the build and tests and wrote this comment; the numbers come from those runs.
Michael-Glaser commented 2026-11-24 07:04:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-24T00:18:31Z.


Thanks @0xKaji and @regiumlepidi! Rebased onto main (a6f5f7a, commit ce99a57) and applied the review items: strip_verbatim now handles \?\ and ??\ UNC prefixes case-insensitively, strip_path_prefix_ci trims repeated separators after the root, and added the extra UNC, mixed-separator, and verbatim game_root test cases.

<!-- greyfinch-sync:ivall/xcl:comment:7117930406 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/316#issuecomment-7117930406). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-24T00:18:31Z. --- Thanks @0xKaji and @regiumlepidi! Rebased onto main (a6f5f7a, commit ce99a57) and applied the review items: strip_verbatim now handles \\?\ and \??\ UNC prefixes case-insensitively, strip_path_prefix_ci trims repeated separators after the root, and added the extra UNC, mixed-separator, and verbatim game_root test cases.
Toons29 commented 2026-11-25 03:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T02:55:15Z.


Regression run of a9ce85ea on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: a9ce85eaf70e082b55b3b0180755e39c5a79418c
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1634 (PresentX 1635)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14813 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7151360129 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7151360129). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T02:55:15Z. --- Regression run of `a9ce85ea` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: a9ce85eaf70e082b55b3b0180755e39c5a79418c gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1634 (PresentX 1635) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14813 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
DavidM1911 commented 2026-11-25 15:07:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T14:29:08Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7165350589 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7165350589). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T14:29:08Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Michael-Glaser commented 2026-11-27 12:02:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Michael-Glaser on 2026-11-27T12:02:08Z.


Thanks @Toons29 and @DavidM1911! Added the verbatim xcl-smoke v1 regression blocks for a9ce85ea and the Windows test results into the PR description.

<!-- greyfinch-sync:ivall/xcl:comment:7217760694 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7217760694). Originally posted by [Michael-Glaser](https://github.com/Michael-Glaser) on 2026-11-27T12:02:08Z. --- Thanks @Toons29 and @DavidM1911! Added the verbatim `xcl-smoke v1` regression blocks for `a9ce85ea` and the Windows test results into the PR description.
futurepro62 commented 2026-11-27 17:46:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T17:46:46Z.


Full-suite run on NVIDIA and AMD at the current head; the earlier reports here are on older heads. Tested exact head a9ce85ea (on its base 47efa2e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 742 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: classify_handles_unicode_case_folding_and_verbatim_roots.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 742 passed, 0 failed, 41 ignored, no skips.
  • --skip leaves out tests that fail on main 6089122a too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7224777267 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7224777267). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T17:46:46Z. --- Full-suite run on NVIDIA and AMD at the current head; the earlier reports here are on older heads. Tested exact head `a9ce85ea` (on its base `47efa2e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **742 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `classify_handles_unicode_case_folding_and_verbatim_roots`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **742 passed, 0 failed, 41 ignored**, no skips. - `--skip` leaves out tests that fail on main `6089122a` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
ClosetPie107 commented 2026-11-27 18:01:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:01:01Z.


Tested on AMD / Linux: a9ce85ea (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (not merged onto current main), with its base 47efa2ec the same session as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- vfs:: --test-threads=1: 13 passed, 0 failed, 0 ignored (includes classify_handles_unicode_case_folding_and_verbatim_roots).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (the first loses the RADV device here, the other two run out of memory under Wine): lib 694 passed, 5 failed, 21 ignored; base 47efa2ec lib (same flags): 693 passed, 5 failed, 21 ignored, the same 5. The other binaries fail the same 3 tests as on main here (e2e, pls_quota, predication_e2e).

Not tested

  • A retail title
  • Native Windows, NVIDIA / Intel

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7225028260 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7225028260). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T18:01:01Z. --- **Tested on AMD / Linux: `a9ce85ea`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (not merged onto current `main`), with its base `47efa2ec` the same session as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- vfs:: --test-threads=1`: **13 passed, 0 failed**, 0 ignored (includes `classify_handles_unicode_case_folding_and_verbatim_roots`). - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (the first loses the RADV device here, the other two run out of memory under Wine): lib 694 passed, 5 failed, 21 ignored; base `47efa2ec` lib (same flags): 693 passed, 5 failed, 21 ignored, the same 5. The other binaries fail the same 3 tests as on `main` here (`e2e`, `pls_quota`, `predication_e2e`). **Not tested** - A retail title - Native Windows, NVIDIA / Intel **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
brainhay5 commented 2026-11-30 07:56:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T07:56:26Z.


merge-check claim
head: a9ce85eaf7

<!-- greyfinch-sync:ivall/xcl:comment:7272299974 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7272299974). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T07:56:26Z. --- merge-check claim head: a9ce85eaf70e082b55b3b0180755e39c5a79418c
brainhay5 commented 2026-11-30 08:05:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T08:05:05Z.


merge-check
base: d52ff48caa
head: a9ce85eaf7
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2876 passed, 2 failed, 51 ignored; 29 SKIPPED lines

failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017

correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base". gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 fails on base d52ff48c by itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.

<!-- greyfinch-sync:ivall/xcl:comment:7272462973 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7272462973). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T08:05:05Z. --- merge-check base: d52ff48caade1f5350d513bfffd370396dadfeb6 head: a9ce85eaf70e082b55b3b0180755e39c5a79418c merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2876 passed, 2 failed, 51 ignored; 29 SKIPPED lines failing: test_title_runs_and_game_folder_is_untouched review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review. performance: not assessed beyond the suite. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017 correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base". `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16` fails on base d52ff48c by itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.
BBareth commented 2026-11-30 09:53:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T09:53:46Z.


merge-check claim
head: a9ce85eaf7

<!-- greyfinch-sync:ivall/xcl:comment:7274832137 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7274832137). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T09:53:46Z. --- merge-check claim head: a9ce85eaf70e082b55b3b0180755e39c5a79418c
BBareth commented 2026-11-30 10:01:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T10:01:41Z.


merge-check
base: 9dfbe3ea66
head: a9ce85eaf7
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The new test vfs::tests::classify_handles_unicode_case_folding_and_verbatim_roots passed, as did the existing vfs tests and the e2e title tests.
review: no blocking finding; one file, every hunk read. Two fixes in path classification. (1) The game-root prefix is now matched per path component on the lower-cased component (strip_path_prefix_ci); the old code lower-cased the whole path and then sliced the original string at the root's byte length, which is wrong (and can panic on a char boundary) when lower-casing changes the UTF-8 length (ẞ, İ, K). (2) strip_verbatim handles the \\?\ and \??\ prefixes in one place, with a case-insensitive UNC\, and the game, data and PLS roots are stripped of the verbatim prefix and a trailing separator before comparison. The test covers both folding directions, a root equal to the path, forward slashes, doubled separators, verbatim roots and sibling directories that share a prefix. One thing to know: leading separators of the relative tail are now trimmed (a doubled separator after the root gives the same tail as a single one), which the test pins. Not tested by me: a real title in a folder with such characters.
performance: none to speak of: one lower-casing per path component in place of one for the whole path, on file opens.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7275012713 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7275012713). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T10:01:41Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: a9ce85eaf70e082b55b3b0180755e39c5a79418c merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The new test `vfs::tests::classify_handles_unicode_case_folding_and_verbatim_roots` passed, as did the existing vfs tests and the e2e title tests. review: no blocking finding; one file, every hunk read. Two fixes in path classification. (1) The game-root prefix is now matched per path component on the lower-cased component (`strip_path_prefix_ci`); the old code lower-cased the whole path and then sliced the original string at the root's byte length, which is wrong (and can panic on a char boundary) when lower-casing changes the UTF-8 length (ẞ, İ, K). (2) `strip_verbatim` handles the `\\?\` and `\??\` prefixes in one place, with a case-insensitive `UNC\`, and the game, data and PLS roots are stripped of the verbatim prefix and a trailing separator before comparison. The test covers both folding directions, a root equal to the path, forward slashes, doubled separators, verbatim roots and sibling directories that share a prefix. One thing to know: leading separators of the relative tail are now trimmed (a doubled separator after the root gives the same tail as a single one), which the test pins. Not tested by me: a real title in a folder with such characters. performance: none to speak of: one lower-casing per path component in place of one for the whole path, on file opens. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Foniass commented 2026-12-01 03:07:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:07:34Z.


Triage (#1607) – head a9ce85e

No open or merged PR fixes the same thing. classify on main still slices abs[self.game_root.len() + 1..] after matching the lowercased string, which is wrong (or panics) when lowercasing changes a character's UTF-8 length. #1560 also makes the \\?\UNC\ prefix case-insensitive, but its abs[abs.len() - rest.len()..] still mixes byte lengths of lc and abs, so it does not fix the slicing.
No problems found in the diff. Note that Vfs::new now strips a verbatim prefix from game_root, so game files are opened without \\?\ (MAX_PATH limits apply if the launcher ever passes one).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299351904 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7299351904). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:07:34Z. --- **Triage (#1607)** – head a9ce85e No open or merged PR fixes the same thing. `classify` on main still slices `abs[self.game_root.len() + 1..]` after matching the lowercased string, which is wrong (or panics) when lowercasing changes a character's UTF-8 length. #1560 also makes the `\\?\UNC\` prefix case-insensitive, but its `abs[abs.len() - rest.len()..]` still mixes byte lengths of `lc` and `abs`, so it does not fix the slicing. No problems found in the diff. Note that `Vfs::new` now strips a verbatim prefix from `game_root`, so game files are opened without `\\?\` (MAX_PATH limits apply if the launcher ever passes one). Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Decodere commented 2026-12-02 10:31:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T10:31:07Z.


merge-check
base: 1c8b551475
head: a9ce85eaf7
merge: clean (trial-merge commit 8ba101471b423761b56cc768c507d7923304477b, git diff --check clean)
build: cargo build --workspace ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets): 2909 passed, 1 failed, 51 ignored (+1 new test vs main baseline 2908/1). All 14/14 vfs::tests passed with 0 skips, including new classify_handles_unicode_case_folding_and_verbatim_roots. The single failure is the pre-existing Issue #3441 flake in tests/gpu_two_pass_cache_e2e.rs::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (line 584, left: 1, right: 0), reproduced identically on clean base 1c8b5514 and unrelated to vfs.rs. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)).
review: Read the full merged diff (+91/-18 in crates/xcl/src/vfs.rs). Replaces byte-offset slicing against .to_lowercase() in Vfs::classify_with with component-wise case-insensitive prefix matching (strip_path_prefix_ci), avoiding panics or wrong slices when case folding changes UTF-8 byte lengths (ẞ, İ, K) while preserving original casing and rejecting sibling prefixes. Normalizes strip_verbatim for both \\?\ and \??\ plus case-insensitive UNC\ (checking r.get(..4) safely before slicing &r[4..]), and applies trim_sep(strip_verbatim(norm(...))) consistently to game_root, pls_root_lc, and data_root_lc in Vfs::new. The new unit test covers multi-byte case folding in both directions, double separators, verbatim roots, sibling rejection, verbatim UNC, and C: mount protection. No scope creep or UB.
performance: not applicable (Tier 1 — VFS path normalization/classification only, off hot rendering/GPU paths).
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7342586756 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/316#issuecomment-7342586756). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T10:31:07Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: a9ce85eaf70e082b55b3b0180755e39c5a79418c merge: clean (trial-merge commit 8ba101471b423761b56cc768c507d7923304477b, git diff --check clean) build: cargo build --workspace ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets): 2909 passed, 1 failed, 51 ignored (+1 new test vs main baseline 2908/1). All 14/14 vfs::tests passed with 0 skips, including new classify_handles_unicode_case_folding_and_verbatim_roots. The single failure is the pre-existing Issue #3441 flake in tests/gpu_two_pass_cache_e2e.rs::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (line 584, left: 1, right: 0), reproduced identically on clean base 1c8b5514 and unrelated to vfs.rs. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)). review: Read the full merged diff (+91/-18 in crates/xcl/src/vfs.rs). Replaces byte-offset slicing against `.to_lowercase()` in `Vfs::classify_with` with component-wise case-insensitive prefix matching (`strip_path_prefix_ci`), avoiding panics or wrong slices when case folding changes UTF-8 byte lengths (`ẞ`, `İ`, `K`) while preserving original casing and rejecting sibling prefixes. Normalizes `strip_verbatim` for both `\\?\` and `\??\` plus case-insensitive `UNC\` (checking `r.get(..4)` safely before slicing `&r[4..]`), and applies `trim_sep(strip_verbatim(norm(...)))` consistently to `game_root`, `pls_root_lc`, and `data_root_lc` in `Vfs::new`. The new unit test covers multi-byte case folding in both directions, double separators, verbatim roots, sibling rejection, verbatim UNC, and `C:` mount protection. No scope creep or UB. performance: not applicable (Tier 1 — VFS path normalization/classification only, off hot rendering/GPU paths). verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
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
xcl-dev/xcl!313
No description provided.