XGameRuntime: blobs_of filters ~xcltmp. case-sensitively, leaking uppercase temp files on Windows #2366

Open
opened 2026-11-26 05:29:03 +00:00 by github-bot · 0 comments
Owner

@⁠ahmetbagci8 on GitHub · 2026-11-25 16:48 UTC · original

Summary

blobs_of in crates/xcl/src/hle/xgameruntime/gamesave.rs filters temporary files with a case-sensitive check:

&& !e.file_name().to_string_lossy().starts_with(TMP_PREFIX)

On Windows 11 (NTFS), hle::xgameruntime::gamesave::tests::blob_enumeration_sees_one_submitted_update fails reproducibly because an uppercase temporary file (e.g. ~XCLTMP.44804.151.tmp, 0 bytes) appears in the directory and slips past the filter:

len=17 rows=[("blob00", 16), ..., ("blob15", 16), ("~XCLTMP.44804.151.tmp", 0)]
assertion `left == right` failed: 1 of 13 enumerations mixed submitted updates

Because enc() always percent-encodes ~ as %7E, no valid blob filename can ever start with ~xcltmp. in any case.

Suggested fix

Use the existing starts_with_ignore_ascii_case helper in blobs_of:

&& !starts_with_ignore_ascii_case(&e.file_name().to_string_lossy(), TMP_PREFIX)

Tested

  • Commit: 082944135cd2b96288470a595861fa608eee08dc
  • Hardware / OS: Intel Core i7-11800H, NVIDIA GeForce RTX 3070 Laptop GPU, Windows 11 Pro (Build 26300)
  • Before fix: cargo test -p xcl --lib blob_enumeration_sees_one_submitted_update failed reproducibly (1–6 mixed enumerations per run).
  • After fix (local): cargo test -p xcl --lib gamesave → 12 passed, 0 failed, 0 ignored.

AI use

  • Antigravity harness (Gemini 4 Neon) ran the test suite, diagnosed the failure, verified the fix locally, and drafted this report; the author reviewed it before posting.
**@⁠ahmetbagci8** on GitHub · 2026-11-25 16:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/2366) ### Summary `blobs_of` in `crates/xcl/src/hle/xgameruntime/gamesave.rs` filters temporary files with a case-sensitive check: ```rust && !e.file_name().to_string_lossy().starts_with(TMP_PREFIX) ``` On Windows 11 (NTFS), `hle::xgameruntime::gamesave::tests::blob_enumeration_sees_one_submitted_update` fails reproducibly because an uppercase temporary file (e.g. `~XCLTMP.44804.151.tmp`, 0 bytes) appears in the directory and slips past the filter: ```text len=17 rows=[("blob00", 16), ..., ("blob15", 16), ("~XCLTMP.44804.151.tmp", 0)] assertion `left == right` failed: 1 of 13 enumerations mixed submitted updates ``` Because `enc()` always percent-encodes `~` as `%7E`, no valid blob filename can ever start with `~xcltmp.` in any case. ### Suggested fix Use the existing `starts_with_ignore_ascii_case` helper in `blobs_of`: ```rust && !starts_with_ignore_ascii_case(&e.file_name().to_string_lossy(), TMP_PREFIX) ``` ### Tested - Commit: `082944135cd2b96288470a595861fa608eee08dc` - Hardware / OS: Intel Core i7-11800H, NVIDIA GeForce RTX 3070 Laptop GPU, Windows 11 Pro (Build 26300) - Before fix: `cargo test -p xcl --lib blob_enumeration_sees_one_submitted_update` failed reproducibly (1–6 mixed enumerations per run). - After fix (local): `cargo test -p xcl --lib gamesave` → 12 passed, 0 failed, 0 ignored. ### AI use - Antigravity harness (Gemini 4 Neon) ran the test suite, diagnosed the failure, verified the fix locally, and drafted this report; the author reviewed it before posting.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:29:03 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.