VFS: normalize forward and trailing slashes in whiteouts and paths #1289
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1299"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by mahfuzinam0045-spec on 2026-11-24T14:29:45Z.
Normalize forward slashes (
/), leading slashes, and trailing slashes in VFS path helpers, whiteout management, and directory enumeration.What is in it
crates/xcl/src/vfs.rs:Vfs::wkey: normalize forward slashes and trim leading/trailing separators so that keys in.xcl_whiteoutsand lookup keys are canonicalized.Vfs::is_whiteout: correctly splits ancestors on\even when queried with forward slashes (e.g.data/gone.txt).Vfs::has_whiteouts_under: correctly handlesrel_dirwith trailing slashes (e.g.data\ordata/), avoiding double-slash prefix mismatches.Vfs::overlay_path&Vfs::original_path: strip leading/trailing separators and normalize forward slashes to avoid malformed path joins.Vfs::stage_write,Vfs::check_original_dir_empty, &Vfs::remove_dir: normalize path arguments before parent splitting and prefix formatting.whiteouts_and_paths_normalize_slashes.crates/xcl/src/vfs_hooks.rs:collect_game_entries: normalize slashes before splittingrelinto directory and search pattern, fixing searches using forward slashes (e.g.data/*).find_first_on_whited_out_and_recreated_directory.Tested
link.exe/gcc.exe) are absent on this development environment. Full validation and regression suite run via GitHub Actions CI (PR checks).whiteouts_and_paths_normalize_slashesandfind_first_on_whited_out_and_recreated_directory.Regression run
Regression testing requires Windows SDK and DXC toolchains. Relying on project CI.
Not tested
AI use
Antigravity (Gemini 3.8 Flash) was used to diagnose the slash normalization discrepancy in
vfs.rsandvfs_hooks.rs, implement canonicalization across path and whiteout helpers, and author the unit tests.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:36:56Z.
Full-suite run, since this PR has no test report yet. Tested exact head
79e6c33(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.whiteouts_and_paths_normalize_slashes.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:52:40Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:21:43Z.
Regression run of
79e6c33aon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.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.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:01:40Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:22:18Z.
Triage (#1607) – head
79e6c33#1560 also normalizes separators in whiteout keys and in
overlay_path/original_path(throughclean_rel), as part of a much wider rewrite ofvfs.rs(+392/-86: verbatim roots,..traversal, ASCII lowercasing). This PR was opened first and is the narrow version, so the two are different approaches rather than duplicates.No problems found in the diff. Main still has
wkeyas a plainto_lowercase. The failing check is the PR description.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.