XGameRuntime: a container's last-modified time follows its last update #1050

Open
github-bot wants to merge 1 commit from github-bot/gh-1050 into main AGit
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 10:53 UTC · original
DavidM1911:gamesave-mtime → main · +58 −6 · 1 files · 1 commits · open

each_container reported the container folder's own mtime as lastModifiedTime. A folder's mtime only moves when an entry directly inside it is created, renamed or removed, and the container holds just b\ and display — so after the first save the reported time froze, and a slot saved again looked older than one saved once. It now reports the newest mtime among the container, b\, display and the blobs.

Fixes #1041

What is in it

  • gamesave.rs: mtime_secs() + container_modified(); each_container uses the max instead of the folder's own mtime.
  • Test container_modified_reports_the_newest_blob_not_the_folder: blob and display mtimes set into the future via File::set_modified; the reported time follows the newest of them.

Tested

  • Windows 11 x64, RTX 3060 Ti, Rust stable, debug + release
  • cargo test -p xcl --lib gamesave: 11 passed, 0 failed
  • cargo test --workspace -- --test-threads=4: 677 passed, 0 failed, 41 ignored

Regression run

main a6f5f7a (NVIDIA GeForce RTX 3060 Ti, , 60 s):

xcl-smoke v1
commit: a6f5f7a74cc620c1f88a9e3669a633d10c3c8212
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1486 (PresentX 1486)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14435 MB

this PR's head c423c78 (same title/GPU/seconds):

xcl-smoke v1
commit: c423c78d47449091373b0781edbac58ec9a730f2
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1489 (PresentX 1489)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14445 MB

Not tested

  • A title's load/save menu showing the time (no title run that exercises XGameSave enumeration)
  • Linux/macOS (crate does not build there)

AI use

  • Devin (Cognition), model SWE-2: wrote the change and the test, ran the suite and both smoke runs
**@⁠DavidM1911** on GitHub · 2026-11-24 10:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1050) `DavidM1911:gamesave-mtime` → `main` · +58 −6 · 1 files · 1 commits · open `each_container` reported the container folder's own mtime as `lastModifiedTime`. A folder's mtime only moves when an entry directly inside it is created, renamed or removed, and the container holds just `b\` and `display` — so after the first save the reported time froze, and a slot saved again looked older than one saved once. It now reports the newest mtime among the container, `b\`, `display` and the blobs. Fixes #1041 **What is in it** - `gamesave.rs`: `mtime_secs()` + `container_modified()`; `each_container` uses the max instead of the folder's own mtime. - Test `container_modified_reports_the_newest_blob_not_the_folder`: blob and display mtimes set into the future via `File::set_modified`; the reported time follows the newest of them. **Tested** - Windows 11 x64, RTX 3060 Ti, Rust stable, debug + release - `cargo test -p xcl --lib gamesave`: 11 passed, 0 failed - `cargo test --workspace -- --test-threads=4`: 677 passed, 0 failed, 41 ignored **Regression run** main `a6f5f7a` (NVIDIA GeForce RTX 3060 Ti, <game folder>, 60 s): ``` xcl-smoke v1 commit: a6f5f7a74cc620c1f88a9e3669a633d10c3c8212 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1486 (PresentX 1486) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14435 MB ``` this PR's head `c423c78` (same title/GPU/seconds): ``` xcl-smoke v1 commit: c423c78d47449091373b0781edbac58ec9a730f2 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1489 (PresentX 1489) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14445 MB ``` **Not tested** - A title's load/save menu showing the time (no title run that exercises XGameSave enumeration) - Linux/macOS (crate does not build there) **AI use** - Devin (Cognition), model SWE-2: wrote the change and the test, ran the suite and both smoke runs
each_container reported the container folder's own mtime, which only moves when b/ or display first appear, so a slot saved again looked older than one saved once (#1041). Report the newest mtime among the container, b/, display and the blobs instead.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:41:49 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:24 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head c423c78 (on its base a6f5f7a).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 677 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: container_modified_reports_the_newest_blob_not_the_folder.

Not tested

  • AMD, a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1050#issuecomment-7134335935) Full-suite run, since this PR has no test report yet. Tested exact head `c423c78` (on its base `a6f5f7a`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **677 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `container_modified_reports_the_newest_blob_not_the_folder`. **Not tested** - AMD, a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 03:19 UTC · original

Tested

  • Exact PR head c423c78d47449091373b0781edbac58ec9a730f2 on Windows 11 build 26200, Ryzen 9 5980HX, Rust 1.99.0 MSVC. This is a filesystem and GameSave test; it did not exercise the RX 6800M GPU.
  • cargo test --locked -p xcl --lib -j 2 hle::xgameruntime::gamesave:: -- --test-threads=1 --show-output: 11 passed, 0 failed, 0 ignored, no explicit skips. container_modified_reports_the_newest_blob_not_the_folder passed: a newer display write and then a newer blob write each determined the container modification time, rather than the folder timestamp.
  • cargo build --locked --workspace -j 2: passed.

Not tested

  • A title's save or load flow, the full workspace suite, other filesystems or operating systems, or timestamps that are missing or predate the Unix epoch. The regression test sets future file timestamps to distinguish them from the newly created folder.

AI use

OpenAI Codex (GPT-6, exact variant not exposed in this session) reviewed the exact diff, ran the GameSave suite and build, checked the logs, and drafted this report.

**@⁠luckyteagirl** on GitHub · 2026-11-25 03:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/1050#issuecomment-7151811693) **Tested** - Exact PR head `c423c78d47449091373b0781edbac58ec9a730f2` on Windows 11 build 26200, Ryzen 9 5980HX, Rust 1.99.0 MSVC. This is a filesystem and GameSave test; it did not exercise the RX 6800M GPU. - `cargo test --locked -p xcl --lib -j 2 hle::xgameruntime::gamesave:: -- --test-threads=1 --show-output`: **11 passed, 0 failed, 0 ignored**, no explicit skips. `container_modified_reports_the_newest_blob_not_the_folder` passed: a newer display write and then a newer blob write each determined the container modification time, rather than the folder timestamp. - `cargo build --locked --workspace -j 2`: passed. **Not tested** - A title's save or load flow, the full workspace suite, other filesystems or operating systems, or timestamps that are missing or predate the Unix epoch. The regression test sets future file timestamps to distinguish them from the newly created folder. **AI use** OpenAI Codex (GPT-6, exact variant not exposed in this session) reviewed the exact diff, ran the GameSave suite and build, checked the logs, and drafted this report.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/xgameruntime/gamesave.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1050/head:github-bot/gh-1050'
git switch 'github-bot/gh-1050'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1050'
git switch 'github-bot/gh-1050'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1050'
git switch 'github-bot/gh-1050'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1050'
git switch 'main'
git merge --squash 'github-bot/gh-1050'
git switch 'main'
git merge --ff-only 'github-bot/gh-1050'
git switch 'main'
git merge 'github-bot/gh-1050'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.