mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7742] [Feature]: Checkpoints save and restore the game's chat metadata #4272
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ylli-selmani on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7742
Originally assigned to: @ylli-selmani on GitHub.
What problem does this solve?
A Game Mode checkpoint only captures three things: the turn's game-state row, the spatial snapshot, and the Experience/combat engine state (
checkpointsschema:snapshotData,spatialSnapshotData,engineStateData). Loading one restores those, but in chat metadata it restores onlygameActiveState, and only for automatic checkpoints.Most of what makes up a running game lives in chat metadata, and checkpoints don't save any of it: party character cards, NPCs, journal, inventory stacks, story, world, maps. So loading a checkpoint today is partial. The game can come back with the old scene and the new party, NPCs and items.
This also blocks a real "undo" for hand edits to game data (the Game data source for the State Editor, filed separately), which wants to save a checkpoint before writing.
Proposed solution
game*key", so new keys from upcoming Game Mode work are opted in on purpose.withChatMetadataPatchQueue) in one write, alongside the restores it already does.Out of scope here: a checkpoint list and Load checkpoint button in the client (none exists yet). That comes with the Game data editor, or as its own small follow-up.
Scope note (updated 2026-10-16)
At the Game Mode maintainers' wish, world, story and maps are left out of this issue. They already have their own snapshots and checks (e.g.
saveGameWorldSnapshot, the world edits layer, the story route), so rewinding them belongs with those systems and would be a follow-up, not part of the allow-list here. Settings, prompt/media preferences, ids/pins/lifecycle, live combat, caches and write ordinals are also not rewound.Alternatives considered
game*key. Simpler, but it would also restore bookkeeping like write ordinals and live combat state, and quietly pick up any future key.Additional context
ecd4388): schemapackages/server/src/db/schema/checkpoints.ts,checkpoint.service.ts, createPOST /api/game/checkpointand load ingame.routes.ts(the load restoresgameActiveStateonly whencp.gameStateis set).Template check