mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #992] [MERGED] xgameruntime_gamesave: undo a partly applied update instead of leaving it (RT-GAMESAVE-COMMIT-ROLLBACK) #1028
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#1028
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/992
Author: @Snooozs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:gamesave-commit-rollback📝 Commits (1)
34e6b29xgameruntime_gamesave: undo a partly applied update instead of leaving it (RT-GAMESAVE-COMMIT-ROLLBACK)📊 Changes
2 files changed (+185 additions, -13 deletions)
View changed files
📝
runtime/shims/xgameruntime_gamesave.cpp(+96 -13)📝
runtime/test/xgameruntime_gamesave_test.cpp(+89 -0)📄 Description
Claimed in the coordination issue as: RT-GAMESAVE-COMMIT-ROLLBACK (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7137704829)
Depends on: none. #147 changes the quota loop of the same function; whichever lands second may need a small rebase.
What and why
commit()inruntime/shims/xgameruntime_gamesave.cppreplaced blobs one rename at a time. If a later rename failed (another process, such as a backup or antivirus tool, holds the blob open withoutFILE_SHARE_DELETE),XGameSaveSubmitUpdatereturnedE_GS_OUT_OF_LOCAL_STORAGE, but the earlier blobs were already new and a~file stayed. The container then held blobs of two different updates, against the file's own "a failed write leaves the container as it was".<blob>~b~before changing it; a failed op undoes the applied ones, newest first, and the same error is returned.~, whichencode_namenever produces anddecode_namerejects, so enumeration and the quota do not see them.Not covered: there is no journal. A process that dies midway leaves each blob old or new, as before. The path where the undo itself fails has no test. Names that differ only in case are unchanged.
Tested
Windows 10 Pro 22H2 (19045), VS 2022 RelWithDebInfo,
ctest -R gamesave:xgameruntime_gamesave_test: 76 checks, 0 failures. The new test withmain's shim: 76 checks, 5 failures.tests/test_saves.py(70 OK, 3 skipped) andtests/test_saves_import_args.pypass.check_no_game_data.pyon both files: clean. Synthetic saves only.GPUs tested: n/a
AI-assisted: yes. Claude Code (a Haiku 5.5 subagent found the bug and wrote the change, Claude Opus 5.5 reviewed and corrected it and reran the tests).
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.