VFS: audit case-insensitive path canonicalization, whiteouts, and traversal boundaries #1550

Open
slopgobblercobbler wants to merge 1 commit from upstream-pr/1560 into main
slopgobblercobbler commented 2026-11-24 17:40:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by slopgobblercobbler on 2026-11-24T17:40:02Z.


Summary

Audits virtual file system (VFS) path canonicalization, whiteouts case-insensitivity, and traversal bounds in crates/xcl/src/vfs.rs:

  1. Case-insensitive path canonicalization:
    • In strip_verbatim: made verbatim UNC prefix checks case-insensitive (\\?\unc\, \\?\Unc\, \\?\UNC\) and supported NT object manager namespace prefixes (\??\unc\, \??\), preventing lowercase verbatim UNC paths from being stripped to unc\... and incorrectly treated as local relative paths.
    • In Vfs::new: normalized game_root, data_root, and mount targets with full_path, strip_verbatim, and norm, and normalized mount prefixes with norm and to_ascii_lowercase (so mount definitions containing forward slashes cleanly match normalized paths).
    • In classify_with: fixed character slice calculations when stripping the game root prefix to prevent boundary panics on mixed-case or unicode paths, and verified relative remainders using clean_rel.
  2. Whiteouts canonicalization & case-insensitivity:
    • Added clean_rel(rel: &str) -> Option<String> which normalizes slashes, trims redundant separators, and resolves . and .. segments.
    • Updated wkey: maps relative paths to canonical lowercase keys via clean_rel, ensuring whiteout operations (is_whiteout, has_whiteouts_under, add_whiteout, remove_whiteout) are completely case- and slash-invariant (data\gone.txt, DATA\GONE.TXT, data/gone.txt, data/./gone.txt, \data\gone.txt\).
    • Fixed has_whiteouts_under and needs_merge when queried with trailing or forward slashes (data\, data/, DATA), preventing data\\\\ prefix mismatch bugs.
    • In Vfs::new: canonicalized existing .xcl_whiteouts entries through Self::wkey upon loading.
  3. Boundary checks on directory traversal:
    • In clean_rel: added strict boundary checks that reject paths attempting to traverse above the root via .. (when the component stack is empty) or containing drive letters, UNC, or device streams, returning None.
    • In Vfs methods (delete_file, stage_write, prepare_write, create_dir, remove_dir, open_decision_for, read_path_rel, visible_in_overlay, visible_in_original, exists, is_dir): enforced boundary validation via clean_rel, rejecting traversal escapes with safe Win32 error codes (ERROR_PATH_NOT_FOUND / ERROR_FILE_NOT_FOUND) without filesystem access.
  4. Unit tests:
    • Added comprehensive tests: clean_rel_resolves_dots_and_detects_boundary_traversal, case_insensitive_whiteouts_across_slashes_and_dots, strip_verbatim_supports_mixed_case_unc_and_nt_prefixes, remove_dir_enforces_clean_rel_and_bounds.

Changes

  • crates/xcl/src/vfs.rs:
    • clean_rel helper for robust segment resolution and traversal escape defense.
    • Case- and separator-insensitive UNC and NT namespace handling in strip_verbatim.
    • Canonical lowercase whiteout keys in wkey and .xcl_whiteouts loader.
    • Traversal rejection in VFS mutations and lookups.
    • Unit tests covering traversal attempts, case normalization, and whiteouts.

Tested

  • Windows 11 x64, Rust MSVC stable.
  • cargo test -p xcl -- vfs: 22 passed, 0 failed.
  • Clean diff: zero trailing whitespace, clean rebase on latest upstream/main, GPL-2.0-only compliant, zero retail game data or keys.

Not Tested

  • Non-Windows POSIX host filesystems (case-preserving vs case-insensitive mounted shares).

AI Use

Co-Authored-By: Claude Code (Claude Opus 5.5) / Gemini Antigravity

<!-- greyfinch-sync:ivall/xcl:issue:5477280055 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-24T17:40:02Z. --- ## Summary Audits virtual file system (VFS) path canonicalization, whiteouts case-insensitivity, and traversal bounds in `crates/xcl/src/vfs.rs`: 1. **Case-insensitive path canonicalization**: - In `strip_verbatim`: made verbatim UNC prefix checks case-insensitive (`\\?\unc\`, `\\?\Unc\`, `\\?\UNC\`) and supported NT object manager namespace prefixes (`\??\unc\`, `\??\`), preventing lowercase verbatim UNC paths from being stripped to `unc\...` and incorrectly treated as local relative paths. - In `Vfs::new`: normalized `game_root`, `data_root`, and mount targets with `full_path`, `strip_verbatim`, and `norm`, and normalized mount prefixes with `norm` and `to_ascii_lowercase` (so mount definitions containing forward slashes cleanly match normalized paths). - In `classify_with`: fixed character slice calculations when stripping the game root prefix to prevent boundary panics on mixed-case or unicode paths, and verified relative remainders using `clean_rel`. 2. **Whiteouts canonicalization & case-insensitivity**: - Added `clean_rel(rel: &str) -> Option<String>` which normalizes slashes, trims redundant separators, and resolves `.` and `..` segments. - Updated `wkey`: maps relative paths to canonical lowercase keys via `clean_rel`, ensuring whiteout operations (`is_whiteout`, `has_whiteouts_under`, `add_whiteout`, `remove_whiteout`) are completely case- and slash-invariant (`data\gone.txt`, `DATA\GONE.TXT`, `data/gone.txt`, `data/./gone.txt`, `\data\gone.txt\`). - Fixed `has_whiteouts_under` and `needs_merge` when queried with trailing or forward slashes (`data\`, `data/`, `DATA`), preventing `data\\\\` prefix mismatch bugs. - In `Vfs::new`: canonicalized existing `.xcl_whiteouts` entries through `Self::wkey` upon loading. 3. **Boundary checks on directory traversal**: - In `clean_rel`: added strict boundary checks that reject paths attempting to traverse above the root via `..` (when the component stack is empty) or containing drive letters, UNC, or device streams, returning `None`. - In `Vfs` methods (`delete_file`, `stage_write`, `prepare_write`, `create_dir`, `remove_dir`, `open_decision_for`, `read_path_rel`, `visible_in_overlay`, `visible_in_original`, `exists`, `is_dir`): enforced boundary validation via `clean_rel`, rejecting traversal escapes with safe Win32 error codes (`ERROR_PATH_NOT_FOUND` / `ERROR_FILE_NOT_FOUND`) without filesystem access. 4. **Unit tests**: - Added comprehensive tests: `clean_rel_resolves_dots_and_detects_boundary_traversal`, `case_insensitive_whiteouts_across_slashes_and_dots`, `strip_verbatim_supports_mixed_case_unc_and_nt_prefixes`, `remove_dir_enforces_clean_rel_and_bounds`. ## Changes - `crates/xcl/src/vfs.rs`: - `clean_rel` helper for robust segment resolution and traversal escape defense. - Case- and separator-insensitive UNC and NT namespace handling in `strip_verbatim`. - Canonical lowercase whiteout keys in `wkey` and `.xcl_whiteouts` loader. - Traversal rejection in VFS mutations and lookups. - Unit tests covering traversal attempts, case normalization, and whiteouts. ## Tested - Windows 11 x64, Rust MSVC stable. - `cargo test -p xcl -- vfs`: 22 passed, 0 failed. - Clean diff: zero trailing whitespace, clean rebase on latest `upstream/main`, GPL-2.0-only compliant, zero retail game data or keys. ## Not Tested - Non-Windows POSIX host filesystems (case-preserving vs case-insensitive mounted shares). ## AI Use Co-Authored-By: Claude Code (Claude Opus 5.5) / Gemini Antigravity
gut0to commented 2026-11-24 18:00:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:00:02Z.

Review: COMMENTED


AI-assisted review (GPT-6): I traced the mount path through apply_mounts, classify_with, and open_decision_for.

<!-- greyfinch-sync:ivall/xcl:review:6044637689 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#pullrequestreview-6044637689). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T18:00:02Z. **Review:** COMMENTED --- AI-assisted review (GPT-6): I traced the mount path through `apply_mounts`, `classify_with`, and `open_decision_for`.
Anon64 commented 2026-11-24 18:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T17:54:15Z.


Regression run for this PR: head 6caef61, based on main 9e3831e. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, XCL_NETWORK=0, A pressed every 4 s from 20 s, scripts/smoke.ps1 on a retail title for 60 s.

main 9e3831e:

xcl-smoke v1
commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1601 (PresentX 1602)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 72801 MB

this PR:

xcl-smoke v1
commit: 6caef6199a6a25d274ad4ae5e2bd496b93c76cf9
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1356 (PresentX 1356)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 82225 MB

No device removals or crashes; 85 % of main's frames, 113 % of its peak commit.

Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies a lot from run to run (21–92 GB with the same build), so it says little about this PR.

Not tested: the whole suite; whether the title reaches the changed code in these 60 s.

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7139871667 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#issuecomment-7139871667). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-24T17:54:15Z. --- Regression run for this PR: head `6caef61`, based on `main` `9e3831e`. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, `XCL_NETWORK=0`, A pressed every 4 s from 20 s, `scripts/smoke.ps1` on a retail title for 60 s. main `9e3831e`: ``` xcl-smoke v1 commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1601 (PresentX 1602) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 72801 MB ``` this PR: ``` xcl-smoke v1 commit: 6caef6199a6a25d274ad4ae5e2bd496b93c76cf9 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1356 (PresentX 1356) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 82225 MB ``` No device removals or crashes; 85 % of main's frames, 113 % of its peak commit. Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies a lot from run to run (21–92 GB with the same build), so it says little about this PR. **Not tested:** the whole suite; whether the title reaches the changed code in these 60 s. Written with Claude Code (Claude Opus 5.5) from runs on this machine.
gut0to commented 2026-11-24 18:09:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:00:02Z.

Code review location: crates/xcl/src/vfs.rs; line 364

@@ -295,7 +359,11 @@ impl Vfs {
         }
         if let Some(rest) = lc.strip_prefix(&self.game_root_lc) {
             if rest.starts_with('\\') {
-                return Target::Game { rel: abs[self.game_root.len() + 1..].to_string() };
+                let skip = abs.len().saturating_sub(rest.len());
+                let rel_str = abs[skip..].trim_start_matches('\\');
+                if let Some(clean) = clean_rel(rel_str) {

Could the boundary also be enforced for translated mounts? With a G: mount rooted at C:\mount, G:\..\outside.txt maps to C:\mount\..\outside.txt; full_path resolves it to C:\outside.txt, and Target::Translated later reaches Decision::Use without clean_rel. A console path can therefore escape its mapped root despite this traversal check. Please validate translated paths against their mount root before using them. AI-assisted review: I traced this through apply_mounts, classify_with, and open_decision_for.

<!-- greyfinch-sync:ivall/xcl:review-comment:4684329539 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#discussion_r4684329539). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T18:00:02Z. **Code review location:** `crates/xcl/src/vfs.rs`; line 364 ~~~~diff @@ -295,7 +359,11 @@ impl Vfs { } if let Some(rest) = lc.strip_prefix(&self.game_root_lc) { if rest.starts_with('\\') { - return Target::Game { rel: abs[self.game_root.len() + 1..].to_string() }; + let skip = abs.len().saturating_sub(rest.len()); + let rel_str = abs[skip..].trim_start_matches('\\'); + if let Some(clean) = clean_rel(rel_str) { ~~~~ --- Could the boundary also be enforced for translated mounts? With a `G:` mount rooted at `C:\mount`, `G:\..\outside.txt` maps to `C:\mount\..\outside.txt`; `full_path` resolves it to `C:\outside.txt`, and `Target::Translated` later reaches `Decision::Use` without `clean_rel`. A console path can therefore escape its mapped root despite this traversal check. Please validate translated paths against their mount root before using them. AI-assisted review: I traced this through `apply_mounts`, `classify_with`, and `open_decision_for`.
slopgobblercobbler commented 2026-11-24 19:06:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by slopgobblercobbler on 2026-11-24T18:27:41Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:ivall/xcl:review:6045038695 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#pullrequestreview-6045038695). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-24T18:27:41Z. **Review:** COMMENTED --- _No description provided._
slopgobblercobbler commented 2026-11-24 19:08:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by slopgobblercobbler on 2026-11-24T18:27:41Z.

Code review location: crates/xcl/src/vfs.rs; line 364

@@ -295,7 +359,11 @@ impl Vfs {
         }
         if let Some(rest) = lc.strip_prefix(&self.game_root_lc) {
             if rest.starts_with('\\') {
-                return Target::Game { rel: abs[self.game_root.len() + 1..].to_string() };
+                let skip = abs.len().saturating_sub(rest.len());
+                let rel_str = abs[skip..].trim_start_matches('\\');
+                if let Some(clean) = clean_rel(rel_str) {

Addressed in commit c43ac38: tracked the mount target through apply_mounts and enforced root boundary validation in classify_with. If an absolutised translated path escapes its mapped mount root (whether a custom translated mount or a game mount rooted elsewhere), it is rejected as out-of-bounds (clean_rel / Target::Game { rel: ..\ }) and returns ERROR_PATH_NOT_FOUND from open_decision, rather than escaping via Target::Translated. Added unit test translated_mount_validates_path_against_mount_root_and_rejects_traversal verifying traversal rejection across both custom and game mounts.

<!-- greyfinch-sync:ivall/xcl:review-comment:4684664289 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#discussion_r4684664289). Originally posted by [slopgobblercobbler](https://github.com/slopgobblercobbler) on 2026-11-24T18:27:41Z. **Code review location:** `crates/xcl/src/vfs.rs`; line 364 ~~~~diff @@ -295,7 +359,11 @@ impl Vfs { } if let Some(rest) = lc.strip_prefix(&self.game_root_lc) { if rest.starts_with('\\') { - return Target::Game { rel: abs[self.game_root.len() + 1..].to_string() }; + let skip = abs.len().saturating_sub(rest.len()); + let rel_str = abs[skip..].trim_start_matches('\\'); + if let Some(clean) = clean_rel(rel_str) { ~~~~ --- Addressed in commit c43ac38: tracked the mount target through apply_mounts and enforced root boundary validation in classify_with. If an absolutised translated path escapes its mapped mount root (whether a custom translated mount or a game mount rooted elsewhere), it is rejected as out-of-bounds (clean_rel / Target::Game { rel: \..\ }) and returns ERROR_PATH_NOT_FOUND from open_decision, rather than escaping via Target::Translated. Added unit test translated_mount_validates_path_against_mount_root_and_rejects_traversal verifying traversal rejection across both custom and game mounts.
futurepro62 commented 2026-11-24 21:08:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T19:26:32Z.


Full-suite run at the new head c43ac38 (on its base 9e3831e). One existing test now fails, deterministically.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB, driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17, debug.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form (that skip is #1651, unrelated): 764 passed, 1 failed. Same result twice, once with nothing else running on the machine.
  • The failure is disk_free_space_ex_reports_pls_quota (crates/xcl/tests/pls_quota.rs:129): GetDiskFreeSpaceExW returns 0 (left: 0, right: 0 on assert_ne!).
  • The previous head 6caef61 passed that test (full suite on the AMD Radeon integrated GPU of the 9800X3D: 0 failed). So the change is the latest commit.

Cause (from reading the diff)

  • The test on main expects a .. that climbs out of the S: (PLS) mount to work and to report the host's free space, not the PLS quota:
    for path in [&host, &wide(r"T:\"), &wide(r"S:\..\pls-other")] {
        assert_ne!(GetDiskFreeSpaceExW(path.as_ptr(), ...), 0);
        assert_eq!(total, host_total);
    }
    
  • c43ac38 now refuses traversal that leaves a mount root (classify -> Target::Game { rel: ".." }, as in the new translated_mount_validates_path_against_mount_root_and_rejects_traversal). S:\..\pls-other is exactly that case, so the call now fails.
  • So the two disagree on intent. Either S:\..\pls-other should keep resolving (and the new check is too broad), or it should be refused and pls_quota.rs needs that case changed to expect failure. That's a call for you or the maintainers; I haven't changed anything.

Not tested

  • The new head on the AMD iGPU, a game (no title here).
  • Because cargo stops at the first failing test binary, the binaries after pls_quota did not run on this head (29 ignored instead of 41).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests, traced the cause and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7142102341 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#issuecomment-7142102341). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T19:26:32Z. --- Full-suite run at the new head `c43ac38` (on its base `9e3831e`). One existing test now fails, deterministically. **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB, driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17, debug. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form` (that skip is #1651, unrelated): **764 passed, 1 failed**. Same result twice, once with nothing else running on the machine. - The failure is `disk_free_space_ex_reports_pls_quota` (`crates/xcl/tests/pls_quota.rs:129`): `GetDiskFreeSpaceExW` returns 0 (`left: 0, right: 0` on `assert_ne!`). - The previous head `6caef61` passed that test (full suite on the AMD Radeon integrated GPU of the 9800X3D: 0 failed). So the change is the latest commit. **Cause (from reading the diff)** - The test on main expects a `..` that climbs out of the `S:` (PLS) mount to work and to report the host's free space, not the PLS quota: ```rust for path in [&host, &wide(r"T:\"), &wide(r"S:\..\pls-other")] { assert_ne!(GetDiskFreeSpaceExW(path.as_ptr(), ...), 0); assert_eq!(total, host_total); } ``` - `c43ac38` now refuses traversal that leaves a mount root (`classify` -> `Target::Game { rel: ".." }`, as in the new `translated_mount_validates_path_against_mount_root_and_rejects_traversal`). `S:\..\pls-other` is exactly that case, so the call now fails. - So the two disagree on intent. Either `S:\..\pls-other` should keep resolving (and the new check is too broad), or it should be refused and `pls_quota.rs` needs that case changed to expect failure. That's a call for you or the maintainers; I haven't changed anything. **Not tested** - The new head on the AMD iGPU, a game (no title here). - Because cargo stops at the first failing test binary, the binaries after `pls_quota` did not run on this head (29 ignored instead of 41). **AI use** - Claude Code (Claude Opus 5.5) ran the tests, traced the cause and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 21:08:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:32:31Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7142245608 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#issuecomment-7142245608). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T19:32:31Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Toons29 commented 2026-11-25 04:10:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:34:45Z.


Regression run of c43ac386 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: c43ac386d92d988966f6af898fd52063fa304453
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1630 (PresentX 1630)
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:7152045014 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#issuecomment-7152045014). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T03:34:45Z. --- Regression run of `c43ac386` 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: c43ac386d92d988966f6af898fd52063fa304453 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1630 (PresentX 1630) 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.
github-actions[bot] commented 2026-11-28 08:02:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:02:05Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236318510 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#issuecomment-7236318510). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:02:05Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:07:10 +00:00 (Migrated from github.com)

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


Triage (#1607) – head c43ac38

Overlaps #1299 (D214): both normalize forward, leading and trailing slashes in whiteout keys and in overlay_path / original_path. #1299 does only that (about 90 lines). This PR also adds clean_rel (dot and .. resolution with a root boundary), full_path on the game, data and mount roots, case-insensitive \\?\UNC / \??\UNC stripping, and a mount-target bound check in classify, all in one 390-line change.
Problems:

  • wkey and the whiteout directory expansion change from to_lowercase to to_ascii_lowercase, so whiteouts of non-ASCII names become case-sensitive. An existing .xcl_whiteouts line written as "ä" no longer matches a query for "Ä", which goes against the title's "case-insensitive" claim.
  • classify returns Target::Game { rel: ".." } for a translated mount path outside its target and for an unclean game path. overlay_path / original_path fall back to the raw .. when clean_rel fails, so any caller that builds a path from that rel without going through open_decision_for gets <overlay>\...
    CI is red and the branch conflicts with main. Splitting it (slash normalization, then traversal checks, then mounts) would make it reviewable next to #1299.
    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:7302501011 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1560#issuecomment-7302501011). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:07:10Z. --- **Triage (#1607)** – head c43ac38 Overlaps #1299 (D214): both normalize forward, leading and trailing slashes in whiteout keys and in `overlay_path` / `original_path`. #1299 does only that (about 90 lines). This PR also adds `clean_rel` (dot and `..` resolution with a root boundary), `full_path` on the game, data and mount roots, case-insensitive `\\?\UNC` / `\??\UNC` stripping, and a mount-target bound check in `classify`, all in one 390-line change. Problems: - `wkey` and the whiteout directory expansion change from `to_lowercase` to `to_ascii_lowercase`, so whiteouts of non-ASCII names become case-sensitive. An existing `.xcl_whiteouts` line written as "ä" no longer matches a query for "Ä", which goes against the title's "case-insensitive" claim. - `classify` returns `Target::Game { rel: ".." }` for a translated mount path outside its target and for an unclean game path. `overlay_path` / `original_path` fall back to the raw `..` when `clean_rel` fails, so any caller that builds a path from that `rel` without going through `open_decision_for` gets `<overlay>\..`. CI is red and the branch conflicts with main. Splitting it (slash normalization, then traversal checks, then mounts) would make it reviewable next to #1299. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1560:upstream-pr/1560'
git switch 'upstream-pr/1560'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1560'
git switch 'upstream-pr/1560'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1560'
git switch 'upstream-pr/1560'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1560'
git switch 'main'
git merge --squash 'upstream-pr/1560'
git switch 'main'
git merge --ff-only 'upstream-pr/1560'
git switch 'main'
git merge 'upstream-pr/1560'
git push origin 'main'
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!1550
No description provided.