mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1240] [MERGED] Fix snapshot personaStats startup migration #4997
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#4997
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1240
Author: @Xelvanis
Created: 5/26/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/persona-stats-startup-migration📝 Commits (1)
07f8411storage: accept snapshot persona stats arrays📊 Changes
2 files changed (+191 additions, -3 deletions)
View changed files
📝
src-tauri/src/commands/storage/shared.rs(+65 -2)📝
src-tauri/src/state.rs(+126 -1)📄 Description
Linked issue
Closes #1239
Why this change
game-state-snapshots.personaStatsas an array, matching tracker snapshot readers/writers.personaStatsas object/null, so valid saves could fail app initialization withinvalid_input.personaStatsasnull.What changed
game-state-snapshots.personaStatsas a nullable JSON array while keepingplayerStatsandmetadataas nullable objects.personaStats, coercing bad non-array values tonullbefore strict storage normalization runs.Refactor impact
Primary owner:
Rust storage startup migration and storage shape normalization.
Impact areas reviewed:
AppStatestartup storage migrationpersonaStatsas array/nullBoundary notes:
game-state-snapshotsrows.Pressure points touched:
src-tauri/src/state.rsstartup migrationsrc-tauri/src/commands/storage/shared.rstyped JSON normalizationValidation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
cargo test --manifest-path src-tauri\Cargo.toml persona_statspassed.cargo check --manifest-path src-tauri\Cargo.tomlpassed.git diff --check origin/refactor...HEADpassed.rustfmt --edition 2021 --check src-tauri/src/state.rspassed.cargo fmt --manifest-path src-tauri\Cargo.toml --checkstill fails repo-wide on unrelated pre-existing Rust formatting drift, so this PR avoids a broad formatting-only sweep.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs changes needed: this is a storage migration compatibility fix with no user-facing settings or documented workflow changes.
UI evidence
No UI screenshots added. The relevant proof is startup/data migration behavior plus Rust storage tests.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.