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

Open
opened 2026-11-25 16:48:38 +00:00 by ahmetbagci8 · 0 comments
ahmetbagci8 commented 2026-11-25 16:48:38 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by ahmetbagci8 on 2026-11-25T16:48:38Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:6609296083 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2366). Originally posted by [ahmetbagci8](https://github.com/ahmetbagci8) on 2026-11-25T16:48:38Z. --- ### 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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#2356
No description provided.