VFS: a copy or move with a bad source fails before staging the overlay #1779

Open
github-bot wants to merge 1 commit from github-bot/gh-1779 into main AGit
Owner

@⁠Luislariosss on GitHub · 2026-11-24 20:36 UTC · original
Luislariosss:vfs-dest-casefold → main · +67 −0 · 1 files · 1 commits · open

A copy or a move whose source is missing or is a directory, and a copy of a game file onto itself, staged overlay data before the source was ever looked at: prepare_copy and move_file_vfs ran dest_of first, creating the destination's overlay directories, and only then noticed the source was bad.

  • Copying a game file onto itself queued a copy of the original into the overlay.
  • A missing or directory source left empty overlay directories behind.
  • The self-copy comparison was ASCII-only, so a case-differing accented name (café / CAFÉ) was not caught.

What is in it

  • missing_source_error: a copy/move source that does not exist fails with ERROR_FILE_NOT_FOUND before dest_of runs (move_file_vfs, prepare_copy).
  • A directory source fails with ERROR_ACCESS_DENIED.
  • The self-copy check folds case with to_lowercase, so accented case pairs are caught too; a self-copy is handed to Win32 as the same path instead of staging the overlay.
  • Test copy_and_move_reject_bad_sources_before_staging_the_overlay: self-copy (same path, case-differing, accented), directory source, missing external source for both copy and move — asserting the overlay is untouched in every case.

Tested

  • Windows 11 26200, AMD Radeon RX 9060 XT 16 GB (driver 32.0.32015.7029), Ryzen 5 9600X, 16 GB RAM; Rust 1.99 stable-x86_64-pc-windows-msvc; DXC 1.9.2609.5 through XCL_DXC_DIR; CARGO_PROFILE_TEST_DEBUG=0.
  • cargo test -p xcl --lib vfs_hooks at the head: 11 passed, 0 failed. The new test fails without the fix.
  • Workspace suite at the head (cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4): 876 passed, 0 failed, 38 ignored (20 test binaries; SKIPPED: pso_measurement_compiles_an_exact_synthetic_record — cannot disable the driver cache; heap_window_out_of_memory_falls_back_to_the_switch_form — no heap windows).
  • Regression run (retail title, 60 s, machine idle; the XCL process ran under a Job Object per-process committed-memory cap of 20,480 MB as in #1566 — this machine has 16 GB RAM; the blocks' title: line reads retail-title, the folder name is withheld):

main (85e3826, clean tree):

xcl-smoke v1
commit: 85e38262ff94aecd75d6f83fa8156a8b7697bd13
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 938 (PresentX 938)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15565 MB

head (35bd1e6, clean tree):

xcl-smoke v1
commit: 35bd1e6ec29a52ca9e7179d684b3321e510bfa9b
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 965 (PresentX 965)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15466 MB

Not tested

  • Whether any retail title reaches these paths in normal play; the new test covers them directly.
  • One of four head runs exited 0xc0000005 before any frame — the one that started seconds after a previous title's teardown. Three further head runs and both main runs were clean, including a head run with the same back-to-back timing; no log survived that run to attribute it (the next run renames xcl.log).

AI use

  • opencode: HY4 Flash Free (builds, test and smoke runs, PR assembly); the Unicode case-folding extension by Gemini 4 Neon (Antigravity); review gate by Sonnet (Claude). The smoke blocks and test counts are script-generated.
**@⁠Luislariosss** on GitHub · 2026-11-24 20:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1779) `Luislariosss:vfs-dest-casefold` → `main` · +67 −0 · 1 files · 1 commits · open A copy or a move whose source is missing or is a directory, and a copy of a game file onto itself, staged overlay data before the source was ever looked at: `prepare_copy` and `move_file_vfs` ran `dest_of` first, creating the destination's overlay directories, and only then noticed the source was bad. - Copying a game file onto itself queued a copy of the original into the overlay. - A missing or directory source left empty overlay directories behind. - The self-copy comparison was ASCII-only, so a case-differing accented name (café / CAFÉ) was not caught. **What is in it** - `missing_source_error`: a copy/move source that does not exist fails with `ERROR_FILE_NOT_FOUND` before `dest_of` runs (`move_file_vfs`, `prepare_copy`). - A directory source fails with `ERROR_ACCESS_DENIED`. - The self-copy check folds case with `to_lowercase`, so accented case pairs are caught too; a self-copy is handed to Win32 as the same path instead of staging the overlay. - Test `copy_and_move_reject_bad_sources_before_staging_the_overlay`: self-copy (same path, case-differing, accented), directory source, missing external source for both copy and move — asserting the overlay is untouched in every case. **Tested** - Windows 11 26200, AMD Radeon RX 9060 XT 16 GB (driver 32.0.32015.7029), Ryzen 5 9600X, 16 GB RAM; Rust 1.99 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2609.5 through `XCL_DXC_DIR`; `CARGO_PROFILE_TEST_DEBUG=0`. - `cargo test -p xcl --lib vfs_hooks` at the head: 11 passed, 0 failed. The new test fails without the fix. - Workspace suite at the head (`cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4`): **876 passed, 0 failed, 38 ignored** (20 test binaries; `SKIPPED`: `pso_measurement_compiles_an_exact_synthetic_record` — cannot disable the driver cache; `heap_window_out_of_memory_falls_back_to_the_switch_form` — no heap windows). - **Regression run** (retail title, 60 s, machine idle; the XCL process ran under a Job Object per-process committed-memory cap of 20,480 MB as in #1566 — this machine has 16 GB RAM; the blocks' `title:` line reads `retail-title`, the folder name is withheld): main (`85e3826`, clean tree): ``` xcl-smoke v1 commit: 85e38262ff94aecd75d6f83fa8156a8b7697bd13 gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 938 (PresentX 938) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15565 MB ``` head (`35bd1e6`, clean tree): ``` xcl-smoke v1 commit: 35bd1e6ec29a52ca9e7179d684b3321e510bfa9b gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 965 (PresentX 965) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15466 MB ``` **Not tested** - Whether any retail title reaches these paths in normal play; the new test covers them directly. - One of four head runs exited 0xc0000005 before any frame — the one that started seconds after a previous title's teardown. Three further head runs and both main runs were clean, including a head run with the same back-to-back timing; no log survived that run to attribute it (the next run renames `xcl.log`). **AI use** - opencode: HY4 Flash Free (builds, test and smoke runs, PR assembly); the Unicode case-folding extension by Gemini 4 Neon (Antigravity); review gate by Sonnet (Claude). The smoke blocks and test counts are script-generated.
prepare_copy and move_file_vfs created the destination's overlay directories before looking at the source: copying a game file onto itself staged a copy of the original into the overlay, and a directory or a missing source left empty overlay dirs behind. The self-copy comparison was ASCII-only, so a case-differing accented name was not caught.

The source is validated first: a missing source fails with ERROR_FILE_NOT_FOUND before dest_of runs, a directory source with ERROR_ACCESS_DENIED, and the self-copy check folds case with to_lowercase, so accented case pairs are caught too. The overlay is left untouched in all three cases.

Measured: cargo test -p xcl --lib vfs_hooks at this head: 11 passed, 0 failed; the new test fails without the fix.

Assisted-by: opencode (HY4 Flash Free; Sonnet)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:04:46 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 21:26 UTC · original · edited 2026-11-24 21:47 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 35bd1e6 (on its base 85e3826).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, 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 -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 874 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: copy_and_move_reject_bad_sources_before_staging_the_overlay.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 876 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (#1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set XCL_REQUIRE_GPU, so there both just print SKIPPED.

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.
**@⁠futurepro62** on GitHub · 2026-11-24 21:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1779#issuecomment-7144935648) · edited 2026-11-24 21:47 UTC Full-suite run, since this PR has no test report yet. Tested exact head `35bd1e6` (on its base `85e3826`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, 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 -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record`: **874 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `copy_and_move_reject_bad_sources_before_staging_the_overlay`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **876 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)). - Two tests were skipped with `--skip` on NVIDIA. Both fail on main `7f7e768` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. `heap_window_out_of_memory_falls_back_to_the_switch_form` skips when `XCL_HEAP_WINDOWS` is unset (#1651), and `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set `XCL_REQUIRE_GPU`, so there both just print SKIPPED. **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.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 23:24 UTC · original

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

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

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 23:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1779#issuecomment-7147368428) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:27 UTC · original

PR #1779 — VFS bad-source copy and move verification

Tested clean detached head 35bd1e6ec29a52ca9e7179d684b3321e510bfa9b. The change in vfs_hooks.rs checks for missing external sources and directory copy sources before staging the overlay. Game-file self-copies use the same underlying path for Win32 to reject.

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X. Intel Arc A770 16 GiB, driver 32.0.101.9175, wave range 8–32, DoublePrecisionFloatShaderOps=0. The D3D12 SDK layers DLL was absent. DXC/DXIL 1.9.2609.5, Rust 1.100.0 (0ef1bc386, 2026-11-09).
  • cargo build --workspace and cargo test --workspace --no-run succeeded with debug info and incremental compilation disabled.
  • cargo test -p xcl vfs -- --nocapture yielded 23 passed, 0 failed, 0 ignored, 0 explicit skips. The new copy_and_move_reject_bad_sources_before_staging_the_overlay test passed in both runs. It verified that missing external copies and moves return ERROR_FILE_NOT_FOUND, directory copies return ERROR_ACCESS_DENIED, and identical and case-varied game-file self-copies fail. It checked that the overlay stayed untouched and the original self-copy source files retained their contents.
  • One cargo test --workspace --no-fail-fast -- --test-threads=4 run under the Arc lock with XCL_ADAPTER=A770 exited 101. The 20 result summaries in pr1779-suite.log sum to 858 passed, 18 failed, 42 ignored. Four explicit SKIPPED lines are included in the harness's pass total and excluded from coverage.

Failures and skips

  • The library had 17 failures. Thirteen rejected compute pipeline creation (0x80070057), including FP64 cases. Four reported mismatches in fused multiply-add, implicit-LOD sampling, FP16 high-half preservation, and wave64 pixel reductions. The end-to-end title had one failure in its dynamic depth-bias check (RSSetDepthBiasX, #94).
  • Two tests skipped for lack of wave64, one for inability to disable the driver cache (0x887A002D), and one for lack of heap windows.

Not tested

Retail-title smoke runs on main and PR head, other GPUs or drivers, and the release profile were outside this run.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1779-suite.log and published this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1779#issuecomment-7151926667) # PR #1779 — VFS bad-source copy and move verification Tested clean detached head `35bd1e6ec29a52ca9e7179d684b3321e510bfa9b`. The change in `vfs_hooks.rs` checks for missing external sources and directory copy sources before staging the overlay. Game-file self-copies use the same underlying path for Win32 to reject. **Tested** - STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X. Intel Arc A770 16 GiB, driver 32.0.101.9175, wave range 8–32, `DoublePrecisionFloatShaderOps=0`. The D3D12 SDK layers DLL was absent. DXC/DXIL 1.9.2609.5, Rust 1.100.0 (`0ef1bc386`, 2026-11-09). - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded with debug info and incremental compilation disabled. - `cargo test -p xcl vfs -- --nocapture` yielded **23 passed, 0 failed, 0 ignored, 0 explicit skips**. The new `copy_and_move_reject_bad_sources_before_staging_the_overlay` test passed in both runs. It verified that missing external copies and moves return `ERROR_FILE_NOT_FOUND`, directory copies return `ERROR_ACCESS_DENIED`, and identical and case-varied game-file self-copies fail. It checked that the overlay stayed untouched and the original self-copy source files retained their contents. - One `cargo test --workspace --no-fail-fast -- --test-threads=4` run under the Arc lock with `XCL_ADAPTER=A770` exited 101. The 20 result summaries in `pr1779-suite.log` sum to **858 passed, 18 failed, 42 ignored**. Four explicit `SKIPPED` lines are included in the harness's pass total and excluded from coverage. **Failures and skips** - The library had 17 failures. Thirteen rejected compute pipeline creation (`0x80070057`), including FP64 cases. Four reported mismatches in fused multiply-add, implicit-LOD sampling, FP16 high-half preservation, and wave64 pixel reductions. The end-to-end title had one failure in its dynamic depth-bias check (`RSSetDepthBiasX`, #94). - Two tests skipped for lack of wave64, one for inability to disable the driver cache (`0x887A002D`), and one for lack of heap windows. **Not tested** Retail-title smoke runs on main and PR head, other GPUs or drivers, and the release profile were outside this run. **AI use** T3 Code / Codex (`gpt-6.2-sol`, `reasoningEffort: high`) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified counts against `pr1779-suite.log` and published this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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