XGameSave: long container names use a hashed folder (#326) #476
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/481"
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 Grimkaaah on 2026-11-24T00:56:06Z.
Summary
enc(name)would exceed 200 characters (Windows path component limit //→%2Fexpansion), store the container under~xclc.<fnv1a64>instead of the raw encoded name.container_namesidecar so enumerate / get-info / delete keep the real name.Fixes #326
Test plan
cargo test -p xcl --lib hle::xgameruntime::gamesave::(13 passed)Imported from ivall/xcl. Originally posted by shdann on 2026-11-24T01:02:00Z.
Review: COMMENTED
container_folder_namechanges the location of existing saves with encoded folder names of 201–255 ASCII characters. For example, a valid name of 201 ASCII letters fits in a legacy folder. After this change enumeration still finds that folder, but opening or deleting the same name selects the new hash path. A subsequent update can create a second container with the same displayed name. Please resolve the existing legacy folder first, or migrate it safely, and add an upgrade test covering enumerate, read, update, and delete. Also preserve case-insensitive lookup for hashed names: the hash currently takes the original case-sensitive bytes. Static review with OpenAI Codex (GPT-6).Imported from ivall/xcl. Originally posted by H0UNDZER0 on 2026-11-24T03:05:48Z.
Tested on an RTX 5080, release build: pass, 679 passed, 0 failed.
f9947a0f680d4fa9ee1731f7dd474bdc98e5ce3d, this PR's head as is (on its base2997c9a), release build.XCL_*variables set.cargo build --release --workspace --locked: OK, the same singlefetch_updatewarning asmain.cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with--show-output): 679 passed, 0 failed, 41 ignored both times.main2997c9agives 676 / 0 / 41 on this PC: the difference is the 3 new tests,container_folder_name_short_stays_encoded,container_folder_name_long_uses_stable_hash_prefixandlong_container_name_saves_and_enumerates, which pass.SKIPPED: the usual 2,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).e2e), its save-storage check included, ends withfailures: 0.Not tested
main. When this was written that wasdd2ae9a;git merge-treeshowed no conflict.scripts/smoke.ps1.AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T05:24:03Z.
Test run of
f9947a0f680d4fa9ee1731f7dd474bdc98e5ce3don AMD RDNA4. I merged it onto currentmaind208e14locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 707 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 666 passed, 0 failed, 21 ignoredSKIPPED;container_folder_name_long_uses_stable_hash_prefixandcontainer_folder_name_short_stays_encodedpass.Review: Duplicate of #492 (open), which also stores over-long container names in hashed folders for #326. Only one should land, and the folder naming must not change after it does, or existing saves would be lost.
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 ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
Imported from ivall/xcl. Originally posted by Alpha325 on 2026-11-25T02:49:03Z.
I reproduced the legacy-folder issue raised above using a synthetic save with a 201-character ASCII container name. I seeded the old encoded folder layout without a
container_namesidecar, then ran the same fixture on parent2997c9aand PR headf9947a0.dataE_GS_BLOB_NOT_FOUND(0x80830008)S_OK; zero entries remainedS_OK; the original entry remainedThe fixture uses a canonical Windows path to isolate the folder-layout change from the Win32 full-path limit. It passed on the parent and failed on the PR. The PR’s 13 existing GameSave tests still passed.
Windows 11, Rust 1.100.0 MSVC debug, temporary synthetic save data only. AI use — OpenAI Codex (GPT-6) wrote and ran the fixture and drafted this report.
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T02:55:39Z.
Regression run of
f9947a0fon 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: 92 % 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 DavidM1911 on 2026-11-25T14:05:12Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:45Z.
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:34:57Z.
Triage (#1607) – head
f9947a0#492 makes the same change in
hle/xgameruntime/gamesave.rs: container names whoseenc()is over 200 chars go to a~-prefixed FNV-1a folder, with the real name in a file inside it, andapply/each_containerare taught about it. The two on-disk layouts are incompatible, so only one can be merged.Problems here that #492 avoids:
container_folder_namehashes the exact name, but container lookups are case-insensitive (eq_ignore_ascii_case), so a long name opened in another case gets a second folder.enc()folder of 201-255 chars (valid today) now opens and deletes through the hashed folder, so existing data looks lost.This PR also conflicts with main.
Recommendation: close (duplicate of #492).
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.