feat: integrate regional caravan persistence

This commit is contained in:
Rijad Zuzo
2026-08-23 17:20:41 +02:00
parent 49c5bda651
commit 52307f1306
24 changed files with 1939 additions and 92 deletions
+20 -8
View File
@@ -64,11 +64,22 @@ catch corruption.
## Local file safety
`SaveSlotStore` validates the complete JSON before replacement, restricts slot
names and size, preserves a previous file, and can recover a backup after an
interrupted replacement. `F5`/`F9` use the current quicksave path in `main.tscn`.
The player transform and presentation-only scene state are intentionally not
saved.
`SimulationSaveManifest` v1 combines the unchanged local v16 record and the
canonical `RegionalSimulationFacade` envelope. It stores an independent
checksum for each authority and cross-validates world, seed, active location,
and processed tick. A rejected manifest cannot partially replace local or
regional state.
`SaveSlotStore` validates the complete manifest before replacement, restricts
slot names and size, preserves a previous file, and can recover a backup after
an interrupted replacement. It also accepts existing raw local v16 files and
bootstraps an idle regional facade at the restored seed and tick. Explicit
non-Jajce adapter scopes continue writing raw local v16 records until a
matching regional facade is implemented. This fallback is permitted only while
the regional facade equals its deterministic idle bootstrap; a local-only save
fails closed rather than discarding live regional state. `F5`/`F9` use the
current quicksave path in `main.tscn`. The player transform and presentation-only
scene state are intentionally not saved.
## Regional persistence boundary
@@ -79,9 +90,10 @@ per-file checksums. The file store uses immutable generations, a current
pointer, recovery scanning, and conservative pruning. Partial active-location
loads are metadata-only and cannot silently resurrect a removed location.
This regional codec is not yet the backend for local `SaveSlotStore`. Integrate
it only after the production regional facade, event retention, and lazy context
loading have one atomic manifest contract.
This regional chunk codec is not yet the backend for `SaveSlotStore`. The
production facade and combined quicksave manifest are complete; retained raw
events, rollups, chunk generations, and lazy context loading still need one
atomic long-horizon publication contract.
## How to change state safely