Document save recovery plan

This commit is contained in:
2026-05-18 19:40:13 -07:00
parent dfad8809c7
commit 31e781d7cf
4 changed files with 96 additions and 1 deletions
+42
View File
@@ -0,0 +1,42 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
EXPECTED = {
ROOT / "Docs" / "Ops" / "PersistenceSaveRecoveryPlan.md": [
"Saved/SaveGames/AgrarianMVP.sav",
"Saved/SaveGames/Backups",
"Copy the current `AgrarianMVP.sav` aside with a `.suspect` suffix.",
"Copy that backup to `Saved/SaveGames/AgrarianMVP.sav`.",
"There is no automated save-file validation tool yet.",
],
ROOT / "Docs" / "PersistenceDesignDocument.md": [
"`Docs/Ops/PersistenceSaveRecoveryPlan.md`",
"preserve the suspect save",
"restore the newest timestamped",
],
ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"[x] Add recovery plan for corrupted save.",
"`Docs/Ops/PersistenceSaveRecoveryPlan.md`",
"current MVP limitations",
],
}
def main() -> None:
missing = []
for path, snippets in EXPECTED.items():
text = path.read_text(encoding="utf-8")
for snippet in snippets:
if snippet not in text:
missing.append(f"{path.relative_to(ROOT)}: {snippet}")
if missing:
raise RuntimeError("Save recovery plan verification failed: " + "; ".join(missing))
print("PASS: corrupted-save recovery plan is documented.")
if __name__ == "__main__":
main()