HLE: preserve legacy saves when migration cannot finish #341

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

@⁠avt0m4t48 on GitHub · 2026-11-24 23:38 UTC · original
avt0m4t48:fix/legacy-save-migration → main · +186 −27 · 1 files · 1 commits · open

Fixes #242.

Read every recognized legacy blob before publishing the converted version. Propagate directory-entry and blob read errors so migration can retry with the original data. Optional display metadata and unrelated filenames keep their existing handling.

Scan the provider before taking an update's current-version snapshot. A failed migration for that container or an incomplete provider listing blocks creation of a new first version. When access is restored, migration runs first and the update keeps any legacy blobs it does not replace.

Verification

  • On 2119b0e, real filesystem tests reproduced an unreadable Header being dropped and the legacy directory being removed. A read-loop-only patch still let an update publish a first version while migration was blocked.
  • Five source-built filesystem checks passed on the final patch. They include a provider directory that permits writes but denies listing, an unreadable blob, an alternate encoded container name, and a successful update after access is restored.
  • Windows MSVC-target tests type-checked for victory-loader and victory-hle with pure BLAKE3. Native Windows execution and concurrent independent processes sharing a provider directory were outside this run.
**@⁠avt0m4t48** on GitHub · 2026-11-24 23:38 UTC · [original](https://github.com/fxceless/victory-fork/pull/341) `avt0m4t48:fix/legacy-save-migration` → `main` · +186 −27 · 1 files · 1 commits · open Fixes #242. Read every recognized legacy blob before publishing the converted version. Propagate directory-entry and blob read errors so migration can retry with the original data. Optional display metadata and unrelated filenames keep their existing handling. Scan the provider before taking an update's current-version snapshot. A failed migration for that container or an incomplete provider listing blocks creation of a new first version. When access is restored, migration runs first and the update keeps any legacy blobs it does not replace. ## Verification - On `2119b0e`, real filesystem tests reproduced an unreadable `Header` being dropped and the legacy directory being removed. A read-loop-only patch still let an update publish a first version while migration was blocked. - Five source-built filesystem checks passed on the final patch. They include a provider directory that permits writes but denies listing, an unreadable blob, an alternate encoded container name, and a successful update after access is restored. - Windows MSVC-target tests type-checked for `victory-loader` and `victory-hle` with pure BLAKE3. Native Windows execution and concurrent independent processes sharing a provider directory were outside this run.
Propagate errors reading legacy entries and blobs. Discover pending migration before taking an update snapshot so incomplete provider scans or failed migration cannot be bypassed by publishing a new first version.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:41:13 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 14:43 UTC · original

Native Windows verification on b4700bf8: all nine XGameSave module tests passed. An additional test opened a legacy header exclusively and confirmed that the normal read hit Windows error 32 (sharing violation). The baseline published a partial migrated save. The patched branch kept the original, returned NO_ACCESS when an update tried to publish, and preserved the locked header alongside the new data on a retry after the handle closed.

The new fixture uses a temporary provider with authored data. Concurrent providers in separate processes remain unverified.

Native Windows run with the baseline and patch

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 14:43 UTC · [original](https://github.com/fxceless/victory-fork/pull/341#issuecomment-7165712037) Native Windows verification on `b4700bf8`: all nine XGameSave module tests passed. An additional test opened a legacy header exclusively and confirmed that the normal read hit Windows error 32 (sharing violation). The baseline published a partial migrated save. The patched branch kept the original, returned `NO_ACCESS` when an update tried to publish, and preserved the locked header alongside the new data on a retry after the handle closed. The new fixture uses a temporary provider with authored data. Concurrent providers in separate processes remain unverified. [Native Windows run with the baseline and patch](https://github.com/avt0m4t48/victory-fork/actions/runs/45636256267) AI-assisted using Codex.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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