Repository navigation
feat: US-005 - Restore points from the external companion (atomic backups, safety-first restore) - #10
Merged
Merged
Conversation
Domain (pure, tested): RestorePointRules.ForGame filters backups via BackupInfo.BelongsTo (documentId, legacy format+gen+name fallback) newest first; OrderNewestFirst stable; NameFor(kind, utc, french) localized, invariant-culture timestamped naming for Manual and SafetyBeforeRestore points. App: ExternalRestorePointService (DI) on the existing atomic IBackupService pipeline - ListForAsync (BelongsTo(savePath, snapshot)), CreatePointAsync (named+timestamped backup, documentId=savePath, never in-place), RestoreAsync (mandatory PadMenu.ConfirmAsync, safety backup of the live save first, hash-checked ReadAsync, atomic temp+move write of the .sav). 10 new FR/EN UI strings in AppStrings. 8 new Domain tests. prd.json: US-005 passes=true. progress.txt: appended learnings. Co-authored-by: Varonal <Varonal@users.noreply.github.com>
…ore/RestoreThisPoint), drop duplicates Co-authored-by: Varonal <Varonal@users.noreply.github.com>
Co-authored-by: Varonal <Varonal@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary (US-005)
Domain (pure, unit-tested) —
src/PKForge.Domain/ExternalRestorePoints.cs:RestorePointRules.ForGame(all, documentId, open)— restore points of one save, newest first, filtered viaBackupInfo.BelongsTo(direct documentId match, legacy format+generation+name fallback).OrderNewestFirst(stable),NameFor(kind, utc, french)— localized, invariant-culture timestamped naming (Point de restauration · 2026-11-19 16:50/Restore point · …) forManualandSafetyBeforeRestore.App —
ExternalRestorePointService(registered inMauiProgram), on the existing atomic backup pipelineIBackupService:ListForAsync(savePath)→ newest-firstCompanionRestorePoints for that save.CreatePointAsync(savePath)→ named + timestamped backup (CreateAsync(snapshot, name, documentId: savePath)) — never an in-place write of the game's save.RestoreAsync(host, savePath, backupId)→ mandatory confirmation (PadMenu.ConfirmAsync, destructive) → safety backup of the live save first → hash-checkedReadAsync(corrupt point = clean failure) → atomic temp+move write of the.sav.UI strings: 10 new FR-default/EN keys in
AppStrings. 8 new Domain tests.prd.json: US-005passes: true+ on-device notes.progress.txt: appended.Verification
dotnet test tests/PKForge.Domain.Tests -c Release+dotnet build src/PKForge.App -f net10.0-android..savreplaced + safety point exists; no crash on a corrupt point.