mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #2003] Recover interrupted offline save updates before readback #2010
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2010
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2003
Author: @lgr123
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:lgr123/gamesave-interrupted-update-recovery📝 Commits (1)
d64641bRecover interrupted offline save updates📊 Changes
4 files changed (+434 additions, -104 deletions)
View changed files
📝
docs/saves.md(+4 -0)📝
runtime/CMakeLists.txt(+1 -1)📝
runtime/shims/xgameruntime_gamesave.cpp(+186 -85)📝
runtime/test/xgameruntime_gamesave_test.cpp(+243 -18)📄 Description
Claimed as RT-GAMESAVE-INTERRUPTED-UPDATE-RECOVERY.
A native synthetic checkpoint had two blobs at generation 1. I ended the save process after the first successful file replacement in public main. A new process reopened it via the save API and returned inventory at generation 2 with player state at generation 1. The uninterrupted control returned 2/2. The earlier rollback for an error returned by the current process remains covered.
Stage new bytes and undo data before touching live files. A same-volume journal records which operations need rollback. If an update is interrupted, restore the complete previous generation before the normal read, enumeration, quota, or next write proceeds. A completed commit retains its new generation. Recovery can be interrupted and retried. It keeps the existing container and blob paths, display metadata, and legacy backup files.
This addresses process interruption in one runtime on the same volume. It does not establish power-loss durability or synchronize multiple runtime processes and an external importer.
Reviewer check
Build the Windows
xgameruntime_gamesave_testtarget and run it with no arguments. The test spawns synthetic child processes and uses disposable save folders. No game files or existing saves are needed.Tested
b9320a1plus this patch. 156 of 156 checks passed. Coverage includes seven interruption points, interruption during rollback, first-save cleanup, blocked recovery, metadata and quota, legacy backups, and synchronous and asynchronous reads.git diff --checkpassed. A local merge-tree check with #1952 found no conflict.GPUs tested: n/a.
AI-assisted: yes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.