Preserve queued and live saves when an import fails #594

Manually merged
github merged 2 commits from github-bot/gh-594 into main 2026-11-29 08:22:14 +00:00 AGit
Owner

@⁠cnuonr on GitHub · 2026-11-28 01:38 UTC · original
cnuonr:fix/preserve-pending-save-import → main · +184 −34 · 2 files · 2 commits · merged 2026-11-29 08:16 UTC

What changed

  • Prepare the replacement in a temporary directory alongside the queued save. An extraction or copy failure leaves the queued save available for the next launch. If promotion fails after moving the previous import, restore it or retain it and report its location.
  • Reject a regular ZIP entry in place of a save root. Previously an archive containing only a file named saves reported success even though startup expects a directory.
  • Prepare both live save directories before replacing either. Roll back completed renames if a later directory is blocked. Keep the queue available for a retry and copy the current settings on each attempt.

Verification

  • Two generated ZIP cases reproduced the failures on main. The partial-extraction case also checks that a subsequent valid replacement is applied and stale files from the previous queue are absent.
  • A Windows directory handle without delete sharing reproduces a partial startup import. The regression checks that live progress, storage, and settings survive and that a retry applies both directories while keeping the latest settings.
  • cargo test --locked -p victory-gpu --lib save_share::tests passed all 8 tests on Windows.
  • Verified that the patch applies on top of #584. The tests use generated data.
**@⁠cnuonr** on GitHub · 2026-11-28 01:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/594) `cnuonr:fix/preserve-pending-save-import` → `main` · +184 −34 · 2 files · 2 commits · merged 2026-11-29 08:16 UTC ## What changed - Prepare the replacement in a temporary directory alongside the queued save. An extraction or copy failure leaves the queued save available for the next launch. If promotion fails after moving the previous import, restore it or retain it and report its location. - Reject a regular ZIP entry in place of a save root. Previously an archive containing only a file named `saves` reported success even though startup expects a directory. - Prepare both live save directories before replacing either. Roll back completed renames if a later directory is blocked. Keep the queue available for a retry and copy the current settings on each attempt. ## Verification - Two generated ZIP cases reproduced the failures on `main`. The partial-extraction case also checks that a subsequent valid replacement is applied and stale files from the previous queue are absent. - A Windows directory handle without delete sharing reproduces a partial startup import. The regression checks that live progress, storage, and settings survive and that a retry applies both directories while keeping the latest settings. - `cargo test --locked -p victory-gpu --lib save_share::tests` passed all 8 tests on Windows. - Verified that the patch applies on top of #584. The tests use generated data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:41:21 +00:00
github-bot changed title from Preserve pending saves when a replacement import fails to Preserve queued and live saves when an import fails 2026-11-28 02:20:59 +00:00
github manually merged commit af5b447ba9 into main 2026-11-29 08:22:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!594
No description provided.