Tests: pin VFS overlay / whiteout / open-decision contracts #2425

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

@⁠amazedturnip on GitHub · 2026-11-25 18:31 UTC · original
amazedturnip:xcl/tests-vfs-overlay-whiteout-and-open-decision-con-004259 → main · +247 −0 · 1 files · 1 commits · open

Adds 8 integration tests (crates/xcl/tests/vfs_overlay_contract.rs) pinning the VFS overlay/whiteout/open-decision contract through the public API: copy-on-write content, persistent whiteouts across Vfs::new, create_dir/remove_dir error cases, needs_merge/has_whiteouts_under, mangled GAME:-prefix classify, stage_write/commit_write/prepare_write(keep_content=true), and read_path_rel precedence. No production code changed.

What is in it

  • crates/xcl/tests/vfs_overlay_contract.rs: 8 integration tests pinning the VFS overlay/whiteout/open-decision contract through the public API.
  • open_decision/CREATE_ALWAYS, OPEN_EXISTING (copy-on-write) and TRUNCATE_EXISTING: never writes the original folder; overlay paths and copied content pinned.
  • delete_file whiteout persistence: original stays, is_whiteout true, read_path_rel None, Fail(ERROR_FILE_NOT_FOUND), persists across Vfs::new on the same data folder; delete of missing file errors ERROR_FILE_NOT_FOUND.
  • create_dir on an existing original fails ERROR_ALREADY_EXISTS; create_dir on a missing dir writes overlay; needs_merge / has_whiteouts_under consistency.
  • remove_dir with un-whited-out child errors ERROR_DIR_NOT_EMPTY; all-whited-out dir is allowed and records a whiteout; original stays.
  • Invariant: mangled absolute path with GAME: prefix classifies to Game{rel:...}; own_folder paths pass through untouched.
  • read_path_rel whiteout/overlay precedence; real_path_for_read pass-through for unmapped console path.
  • stage_write path (no placeholder file) + commit_write + prepare_write(keep_content=true) copy original.

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=1 — 1266 passed, 2 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (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)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier)
  • Verification / negative control: New additive test file — verified deterministic (8 passed each run, 3 consecutive runs); no existing behavior was changed, so no fix had to be verified against an observed failure.

Not tested

  • Full retail runtime run (test/script-only PR; no runtime code modified)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
**@⁠amazedturnip** on GitHub · 2026-11-25 18:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/2425) `amazedturnip:xcl/tests-vfs-overlay-whiteout-and-open-decision-con-004259` → `main` · +247 −0 · 1 files · 1 commits · open Adds 8 integration tests (crates/xcl/tests/vfs_overlay_contract.rs) pinning the VFS overlay/whiteout/open-decision contract through the public API: copy-on-write content, persistent whiteouts across Vfs::new, create_dir/remove_dir error cases, needs_merge/has_whiteouts_under, mangled GAME:-prefix classify, stage_write/commit_write/prepare_write(keep_content=true), and read_path_rel precedence. No production code changed. **What is in it** - crates/xcl/tests/vfs_overlay_contract.rs: 8 integration tests pinning the VFS overlay/whiteout/open-decision contract through the public API. - open_decision/CREATE_ALWAYS, OPEN_EXISTING (copy-on-write) and TRUNCATE_EXISTING: never writes the original folder; overlay paths and copied content pinned. - delete_file whiteout persistence: original stays, is_whiteout true, read_path_rel None, Fail(ERROR_FILE_NOT_FOUND), persists across Vfs::new on the same data folder; delete of missing file errors ERROR_FILE_NOT_FOUND. - create_dir on an existing original fails ERROR_ALREADY_EXISTS; create_dir on a missing dir writes overlay; needs_merge / has_whiteouts_under consistency. - remove_dir with un-whited-out child errors ERROR_DIR_NOT_EMPTY; all-whited-out dir is allowed and records a whiteout; original stays. - Invariant: mangled absolute path with GAME: prefix classifies to Game{rel:...}; own_folder paths pass through untouched. - read_path_rel whiteout/overlay precedence; real_path_for_read pass-through for unmapped console path. - stage_write path (no placeholder file) + commit_write + prepare_write(keep_content=true) copy original. **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=1` — 1266 passed, 2 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (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)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier) - Verification / negative control: New additive test file — verified deterministic (8 passed each run, 3 consecutive runs); no existing behavior was changed, so no fix had to be verified against an observed failure. **Not tested** - Full retail runtime run (test/script-only PR; no runtime code modified) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:30:33 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-25 19:13 UTC · original

Passes on NVIDIA (wave32); each of three deliberate breaks in vfs.rs is caught by the new tests, and also by the existing vfs::tests.

Tested: the head d55ed48 (its tree is identical to the one I ran: 9a4d0e8 merged onto main 2898511), and 9a4d0e8 itself. RTX 3060 12 GB (driver 610.88, wave32), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, d55ed48's tree 1371 passed, 0 failed, 46 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms)
same at 9a4d0e8 (before the rebase) 1354 passed, 1 failed, 46 ignored: a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, from the old base, fixed on main by c828d8c (#2420); not this PR
cargo test -p xcl --test vfs_overlay_contract, 3 runs 8 passed, 3 of 3

Deliberate breaks in crates/xcl/src/vfs.rs (scratch, on 9a4d0e8; the file is unchanged in d55ed48):

  • persist_whiteouts writes nothing: delete_file_records_persistent_whiteout fails; vfs::tests also fails 3 (delete_is_a_persistent_whiteout, directories, recreating_removed_directory_does_not_resurrect_original_children).
  • check_original_dir_empty always Ok: remove_dir_with_unwhited_child_errors_dir_not_empty fails; vfs::tests also fails 3 (remove_dir_checks_both_layers_before_removing_overlay, directories, remove_dir_rejects_visible_subdirectories).
  • prepare_write ignores keep_content: stage_and_commit_write_keep_overlay_content and open_decision_never_writes_the_original_folder fail; vfs::tests::reads_never_touch_and_writes_copy_on_write also fails.

So the new tests work, but for these three behaviours the inline tests in vfs.rs already catch the same breaks.

Not tested: a release build, a title.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the scratch breaks, and wrote this report.

**@⁠fromthemoonx** on GitHub · 2026-11-25 19:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2425#issuecomment-7171982333) **Passes on NVIDIA (wave32); each of three deliberate breaks in `vfs.rs` is caught by the new tests, and also by the existing `vfs::tests`.** **Tested:** the head `d55ed48` (its tree is identical to the one I ran: `9a4d0e8` merged onto `main` `2898511`), and `9a4d0e8` itself. RTX 3060 12 GB (driver 610.88, wave32), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `d55ed48`'s tree | 1371 passed, 0 failed, 46 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms) | | same at `9a4d0e8` (before the rebase) | 1354 passed, 1 failed, 46 ignored: `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`, from the old base, fixed on `main` by c828d8c (#2420); not this PR | | `cargo test -p xcl --test vfs_overlay_contract`, 3 runs | 8 passed, 3 of 3 | Deliberate breaks in `crates/xcl/src/vfs.rs` (scratch, on `9a4d0e8`; the file is unchanged in `d55ed48`): - `persist_whiteouts` writes nothing: `delete_file_records_persistent_whiteout` fails; `vfs::tests` also fails 3 (`delete_is_a_persistent_whiteout`, `directories`, `recreating_removed_directory_does_not_resurrect_original_children`). - `check_original_dir_empty` always `Ok`: `remove_dir_with_unwhited_child_errors_dir_not_empty` fails; `vfs::tests` also fails 3 (`remove_dir_checks_both_layers_before_removing_overlay`, `directories`, `remove_dir_rejects_visible_subdirectories`). - `prepare_write` ignores `keep_content`: `stage_and_commit_write_keep_overlay_content` and `open_decision_never_writes_the_original_folder` fail; `vfs::tests::reads_never_touch_and_writes_copy_on_write` also fails. So the new tests work, but for these three behaviours the inline tests in `vfs.rs` already catch the same breaks. **Not tested:** a release build, a title. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and the scratch breaks, and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 19:50 UTC · original

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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 19:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/2425#issuecomment-7172825971) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
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/2425/head:github-bot/gh-2425'
git switch 'github-bot/gh-2425'

Merge

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