VFS: a search on the bare mount root lists no entries #763

Closed
github-bot wants to merge 1 commit from gh-pr/763/head into gh-pr/763/base
Owner

@⁠pickles976 on GitHub · 2026-11-24 04:50 UTC · original
pickles976:fix/vfs-mount-root-empty-rel → main · +16 −0 · 1 files · 1 commits · closed without merging

VFS: a search on the bare mount root lists no entries

What is in it

  • collect_game_entries ran the search on the host folders when rel was empty: FindFirstFileW("G:\\") classified as Game { rel: "" }, the empty pattern made join return the bare overlay/game directory paths, and the title saw the host directories as entries of its own root — the third case of #577.
  • Fix: rel.is_empty() → ERROR_FILE_NOT_FOUND, what Windows returns for a bare drive root, which has no entries.
  • Unit test search_on_the_bare_mount_root_finds_nothing next to the other collect_game_entries tests.
  • Complements #618 (ancestor-is-a-file) and #644 (CREATE_ALWAYS on a directory) — verified by diff and by cross-running the repros in #577; the three cases are disjoint.

Tested

  • Linux, Rust stable, x86_64-pc-windows-gnu cross-build (llvm-mingw linker), run under Wine 9 + Mesa (debug profile):
  • new test vfs_hooks::tests::search_on_the_bare_mount_root_finds_nothing — passed
  • cargo test -p xcl --lib vfs_hooks::tests -- --test-threads=1 (2 skips): 10 passed, 0 failed — the two skipped tests (whiteouts_survive_game_copy_file_over_mount_root, failed_copy_and_move_do_not_resurrect_whiteouts) abort the Wine process with unimplemented function KERNEL32.dll.CopyFile2 on Wine 9; environment, not code (see #175 — current Wine implements it in kernelbase, where XCL looks for it)
  • cargo test -p xcl --lib -- --test-threads=1 (4 skips: the two above, plus the host-dependent create_list_reset_and_clear_state_track_initial_pso_on_d3d12 — vkd3d host difference noted in #175 — and mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content, which fails identically on the unmodified base commit in this environment): 284 passed, 0 failed — the process then died on an X-display teardown, not a test.

Regression run

  • Not provided: this environment cannot run a title. The new branch is selected only when rel == "", i.e. FindFirstFile on a bare mount root — no other title-visible path changes. On Windows the behavior matches the OS error for FindFirstFileW("D:\\").

Not tested

  • Windows native; smoke on a real title; volume-name roots other than G:/T: (same code path, one call site).

AI use

  • Agent (Claude via omp) did the analysis, patch, and test runs; human (pickles976) reviewed before posting.
**@⁠pickles976** on GitHub · 2026-11-24 04:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/763) `pickles976:fix/vfs-mount-root-empty-rel` → `main` · +16 −0 · 1 files · 1 commits · closed without merging VFS: a search on the bare mount root lists no entries **What is in it** - `collect_game_entries` ran the search on the *host* folders when `rel` was empty: `FindFirstFileW("G:\\")` classified as `Game { rel: "" }`, the empty pattern made `join` return the bare overlay/game directory paths, and the title saw the host directories as entries of its own root — the third case of #577. - Fix: `rel.is_empty()` → `ERROR_FILE_NOT_FOUND`, what Windows returns for a bare drive root, which has no entries. - Unit test `search_on_the_bare_mount_root_finds_nothing` next to the other `collect_game_entries` tests. - Complements #618 (ancestor-is-a-file) and #644 (`CREATE_ALWAYS` on a directory) — verified by diff and by cross-running the repros in #577; the three cases are disjoint. **Tested** - Linux, Rust stable, `x86_64-pc-windows-gnu` cross-build (llvm-mingw linker), run under Wine 9 + Mesa (debug profile): - new test `vfs_hooks::tests::search_on_the_bare_mount_root_finds_nothing` — **passed** - `cargo test -p xcl --lib vfs_hooks::tests -- --test-threads=1` (2 skips): **10 passed, 0 failed** — the two skipped tests (`whiteouts_survive_game_copy_file_over_mount_root`, `failed_copy_and_move_do_not_resurrect_whiteouts`) abort the Wine process with `unimplemented function KERNEL32.dll.CopyFile2` on Wine 9; environment, not code (see #175 — current Wine implements it in `kernelbase`, where XCL looks for it) - `cargo test -p xcl --lib -- --test-threads=1` (4 skips: the two above, plus the host-dependent `create_list_reset_and_clear_state_track_initial_pso_on_d3d12` — vkd3d host difference noted in #175 — and `mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content`, which fails identically on the unmodified base commit in this environment): **284 passed, 0 failed** — the process then died on an X-display teardown, not a test. **Regression run** - Not provided: this environment cannot run a title. The new branch is selected only when `rel == ""`, i.e. `FindFirstFile` on a bare mount root — no other title-visible path changes. On Windows the behavior matches the OS error for `FindFirstFileW("D:\\")`. **Not tested** - Windows native; smoke on a real title; volume-name roots other than `G:`/`T:` (same code path, one call site). **AI use** - Agent (Claude via omp) did the analysis, patch, and test runs; human (pickles976) reviewed before posting.
FindFirstFile("G:\\") passed an empty relative path to collect_game_entries,
which then searched the overlay and game host folders themselves and
exposed the host directories as title entries. Windows reports no
entries for a bare drive root; return ERROR_FILE_NOT_FOUND.

Third case of #577 (cases 1 and 2 are #644 and #618). Unit test added.

Co-Authored-By: Claude <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:44 +00:00
github-bot closed this pull request 2026-11-26 04:31:44 +00:00
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 04:52 UTC · original

The one red check is the smoke-block requirement, and I can't produce those blocks from this environment — documenting it rather than leaving it implicit:

  • This PR was built and tested entirely on Linux (llvm-mingw cross-build + Wine, recipe in #520). scripts/smoke.ps1 needs Windows and a title; neither exists here.
  • The behavioral delta is one branch selected only when rel == "" (FindFirstFile on a bare mount root). No existing title-visible path changes; the unit test exercises exactly that branch, and the two sibling cases of #577 (#618, #644) cross-run green against this head.
  • So: asking either for a maintainer test-only label (the workflow's own exemption, and arguably apt: the runtime change is one guard line whose only reachable path the new unit test covers), or for a smoke partner on Windows — run scripts/smoke.ps1 on head e17f6f9 and on a main commit, same title/time, and paste both xcl-smoke v1 blocks here; I'll fold them into the description. Same partnership offer the author of #494/#495 is making; this is the first PR from the Linux side of #520, so the friction is new territory for both of us.
**@⁠pickles976** on GitHub · 2026-11-24 04:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/763#issuecomment-7122421535) The one red check is the smoke-block requirement, and I can't produce those blocks from this environment — documenting it rather than leaving it implicit: - This PR was built and tested entirely on **Linux** (llvm-mingw cross-build + Wine, recipe in #520). `scripts/smoke.ps1` needs Windows *and* a title; neither exists here. - The behavioral delta is one branch selected only when `rel == ""` (`FindFirstFile` on a bare mount root). No existing title-visible path changes; the unit test exercises exactly that branch, and the two sibling cases of #577 (#618, #644) cross-run green against this head. - So: asking either for a maintainer **`test-only` label** (the workflow's own exemption, and arguably apt: the runtime change is one guard line whose only reachable path the new unit test covers), or for a **smoke partner** on Windows — run `scripts/smoke.ps1` on head `e17f6f9` and on a main commit, same title/time, and paste both `xcl-smoke v1` blocks here; I'll fold them into the description. Same partnership offer the author of #494/#495 is making; this is the first PR from the Linux side of #520, so the friction is new territory for both of us.
Author
Owner

@⁠ryosen0 on GitHub · 2026-11-24 05:05 UTC · original

Windows smoke partner for e17f6f9, as offered — both blocks verbatim, same title and duration, RTX 3060 Ti 8 GB / Ryzen 7 9800X3D / driver 32.0.16.1742, Windows 11, release builds, no uncommitted changes.

Full suite on the head first: cargo test --workspace --no-fail-fast -- --test-threads=1 — 702 passed, 0 failed, 41 ignored (2 GPU SKIPPED: no wave64 on this adapter; the count includes your new bare-mount-root unit test).

Main (f4ce27c, this PR's merge-base):

xcl-smoke v1
commit: f4ce27ceb6d1b0576d0c659b713b674778bf1968
gpu: NVIDIA GeForce RTX 3060 Ti
title: ScarlettGame
seconds: 90
exit: 0x0
frames shown: 2336 (PresentX 2336)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14473 MB

Head (e17f6f9):

xcl-smoke v1
commit: e17f6f9b47d2c7d86ebcf694d95f156c7775aa59
gpu: NVIDIA GeForce RTX 3060 Ti
title: ScarlettGame
seconds: 90
exit: 0x0
frames shown: 2422 (PresentX 2422)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14610 MB

Both reach the title's menus at a steady 60 presents / 2 s with no device removal; the frame-count difference (2336 vs 2422) is within the run-to-run variance we see between identical builds. The retail title does not hit the bare-mount-root path in this window, so this is a no-regression check on top of your unit test, not a repro of the branch itself — say so in the description if you fold these in.

AI use: GPT-6.2 Astra (API model selector) in DSH ran the build, suite and both smokes and drafted this comment; the human contributor reviewed the numbers before posting.

**@⁠ryosen0** on GitHub · 2026-11-24 05:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/763#issuecomment-7122617092) Windows smoke partner for `e17f6f9`, as offered — both blocks verbatim, same title and duration, RTX 3060 Ti 8 GB / Ryzen 7 9800X3D / driver 32.0.16.1742, Windows 11, release builds, no uncommitted changes. Full suite on the head first: `cargo test --workspace --no-fail-fast -- --test-threads=1` — **702 passed, 0 failed, 41 ignored** (2 GPU SKIPPED: `no wave64` on this adapter; the count includes your new bare-mount-root unit test). Main (`f4ce27c`, this PR's merge-base): ``` xcl-smoke v1 commit: f4ce27ceb6d1b0576d0c659b713b674778bf1968 gpu: NVIDIA GeForce RTX 3060 Ti title: ScarlettGame seconds: 90 exit: 0x0 frames shown: 2336 (PresentX 2336) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14473 MB ``` Head (`e17f6f9`): ``` xcl-smoke v1 commit: e17f6f9b47d2c7d86ebcf694d95f156c7775aa59 gpu: NVIDIA GeForce RTX 3060 Ti title: ScarlettGame seconds: 90 exit: 0x0 frames shown: 2422 (PresentX 2422) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14610 MB ``` Both reach the title's menus at a steady 60 presents / 2 s with no device removal; the frame-count difference (2336 vs 2422) is within the run-to-run variance we see between identical builds. The retail title does not hit the bare-mount-root path in this window, so this is a no-regression check on top of your unit test, not a repro of the branch itself — say so in the description if you fold these in. **AI use:** GPT-6.2 Astra (API model selector) in DSH ran the build, suite and both smokes and drafted this comment; the human contributor reviewed the numbers before posting.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 05:08 UTC · original

Test run of e17f6f9b47d2c7d86ebcf694d95f156c7775aa59 on AMD RDNA4. I merged it onto current main d5442d2 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows), Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 705 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 664 passed, 0 failed, 21 ignored
  • 0 SKIPPED; search_on_the_bare_mount_root_finds_nothing passes.

Review: Duplicate of #761 (open): both add the same three lines (if rel.is_empty() { return Err(vfs::ERROR_FILE_NOT_FOUND) }) to collect_game_entries; only the tests differ, and #761's compares against a native drive root (FindFirstFileExW("C:\\")), which pins the behaviour to Windows'. Only one should land.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 05:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/763#issuecomment-7122665558) Test run of `e17f6f9b47d2c7d86ebcf694d95f156c7775aa59` on AMD RDNA4. I merged it onto current `main` `d5442d2` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200 (native Windows), Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **705 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 664 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `search_on_the_bare_mount_root_finds_nothing` passes. **Review:** **Duplicate of #761** (open): both add the same three lines (`if rel.is_empty() { return Err(vfs::ERROR_FILE_NOT_FOUND) }`) to `collect_game_entries`; only the tests differ, and #761's compares against a native drive root (`FindFirstFileExW("C:\\")`), which pins the behaviour to Windows'. Only one should land. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 05:12 UTC · original

Closing this as a duplicate of #761 — checked after MesshM's review: upipibi's head has the same guard (rel.is_empty() → ERROR_FILE_NOT_FOUND) and its test pins the behavior against the live native FindFirstFileExW("C:\\") instead of my hard-coded expectation, which is the better contract. Three minutes and a cleaner test; that's how it should sort.

Carrying forward what this PR gathered, for #761's benefit:

  • @⁠ryosen0 ran the full Windows suite on a head carrying this same guard (702 passed, 0 failed) and both xcl-smoke v1 blocks (main f4ce27c vs head, RTX 3060 Ti, 90 s, both exit: 0x0, 0 device removals, 0 crashes, 60/60/60 presents) — blocks are verbatim above; they need re-running on #761's head, but the harness just proved itself.
  • Cross-run context for the merge batch is in #577: this guard is the third case; #618 and #644 are each half of the other two.

Thanks to @⁠ryosen0 and @⁠MesshM — first PR, first smoke partnership, first dignified dedup, all within eleven minutes.

**@⁠pickles976** on GitHub · 2026-11-24 05:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/763#issuecomment-7122725298) Closing this as a duplicate of **#761** — checked after MesshM's review: upipibi's head has the same guard (`rel.is_empty()` → `ERROR_FILE_NOT_FOUND`) and its test pins the behavior against the *live* native `FindFirstFileExW("C:\\")` instead of my hard-coded expectation, which is the better contract. Three minutes and a cleaner test; that's how it should sort. Carrying forward what this PR gathered, for #761's benefit: - @⁠ryosen0 ran the full Windows suite on a head carrying this same guard (702 passed, 0 failed) **and** both `xcl-smoke v1` blocks (main `f4ce27c` vs head, RTX 3060 Ti, 90 s, both `exit: 0x0`, 0 device removals, 0 crashes, 60/60/60 presents) — blocks are verbatim above; they need re-running on #761's head, but the harness just proved itself. - Cross-run context for the merge batch is in #577: this guard is the third case; #618 and #644 are each half of the other two. Thanks to @⁠ryosen0 and @⁠MesshM — first PR, first smoke partnership, first dignified dedup, all within eleven minutes.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-24 05:12 UTC · original

Superseded by #761 (same guard, stronger test). Keeping the smoke-block precedent and the #577 matrix link here for #761's regression section.

**@⁠pickles976** on GitHub · 2026-11-24 05:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/763#issuecomment-7122725596) Superseded by #761 (same guard, stronger test). Keeping the smoke-block precedent and the #577 matrix link here for #761's regression section.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.