VFS: reject creation beneath existing virtual files #613
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/618"
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 WebIdentity1 on 2026-11-24T02:33:37Z.
Creating a file or directory below an original game file could create overlay directories that hide that file. Check visible ancestors before either operation changes the overlay, and return
ERROR_PATH_NOT_FOUNDfor a file parent. Existing automatic creation of missing directories and replacement of deleted originals are preserved.Part of #577, item 2 only. Item 1 is being investigated by fladit123; item 3 is outside this patch. #316 changes classification in the same file; its current diff applies cleanly to this branch, but that combined tree was not executed.
Current integration status (November24)
#1259 adds an immediate-parent directory check to
prepare_write, overlapping this PR's file-creation protection but deliberately leavingcreate_dirunchanged. It also rejects missing/removed parents, whereas this patch preserves the old automatic-parent policy and tests it. Do not combine the patches mechanically: reconcile that policy/test interaction first. No integrated result is claimed. Existing branches and evidence are preserved.What is in it
vfs.rs: parent-type check inprepare_writeandcreate_dir, with three synthetic regression tests. README documents the refusal.Tested
c741a2a85cc3527a4e15a457d791762dee67f0ef, basecb868b200517d7b11bbfcb0146bf0c787ce632b6. Windows 10 build 19045, Ryzen 7 7800X3D, RTX 3090 driver 591.74 plus AMD integrated graphics driver 32.0.21030.2001, Rust 1.98.1 MSVC, SDK DXC 1.8.2502.11, Agility 1.620.2, debug. Desktop session,XCL_ADAPTER=3090; some upstream fixtures select AMD directly.cargo build --locked --workspace: succeeded for both trees. Candidatecargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output: 687 passed, 1 failed, 41 ignored. Onlygpu_clamp_and_omod_per_instructionfailed, also present on the baseline.gpu_uma_import_check_at_init,large_heaps_get_shared_pages_as_used,slots_copy_and_release, andcopy_descriptors_remaps_xbox_extra_cbv_srv_uav_to_pc_enumstalled. Baseline diagnostic with--test-threads=1: 684 passed, 1 failed, 41 ignored, same CLAMP failure. This patch is not claimed to fix the intermittent parallel stall.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no native wave64 on NVIDIA);test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state(debug layer unavailable). UnsetXCL_SAMPLE_*cases return early.cargo test --locked -p xcl --lib vfs::tests:: -- --test-threads=4 --show-output: old runtime plus the new tests 10/3/0; candidate 12/1/0. Both new rejection tests fail before the fix and pass after; native Win32 rejects with error 3. The third test preserves missing/deleted-parent behavior. The remaining focused failure is the existingtruncate_existing_validation_errors(127 vs 5), present in both trees; it passes in the completed full-suite runs. Its firstunder_wine()call precedesGetLastError()and can overwrite the error.Regression run
Independent contributor Anon64 supplied these exact-head/main runs, copied verbatim. These are their measurements, not ours. RTX3060 12GB driver581.80, i9-14900KF, Windows11 26200.9974, Rust1.90.0, release; same title/duration, clean source,
scripts/smoke.ps1. They did not test whether that title writes below a game file; our synthetic tests cover the error path.Draft retained: conflicts with current main and required CI remains outstanding. The code/head is unchanged; these runs do not qualify any future refresh.
Not tested
By us: retail behavior, release builds, Wine, concurrent namespace changes, or a combined tree with #316. The independent startup smoke above is not direct validation of the changed error path. No claim of the retail title gameplay progress.
AI use
Codex (GPT-6) inspected the issue and overlap, implemented the patch and synthetic tests, ran native Windows validation, and prepared this description.
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T07:01:25Z.
Regression runs for this PR's head
c741a2aand for its basemaincb868b2, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:55:45Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:10Z.
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-01T03:49:09Z.
Triage (#1607) – head
c741a2aThis fixes part 2 of #577 (a write or
create_dirbelow a game file creates an overlay directory with the file's name); #644 fixes part 1 (CREATE_ALWAYSon a game directory), and #761 (merged) part 3. Main still lacks the check inprepare_writeandcreate_dir.Overlap: #1259 also adds a parent check to
prepare_write, but refuses any parent that is not a directory, so it also refuses missing parents (and does not touchcreate_dir). This PR refuses only parents that exist and are files, and keeps missing parents allowed as thedirectoriestest expects. The two conflict; only one of them should land.No problems found in the diff.
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.