mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1838] [MERGED] Fix tracker world-state snapshot parity #5308
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#5308
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/1838
Author: @cha1latte
Created: 6/1/2026
Status: ✅ Merged
Merged: 6/1/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1804-tracker-world-state-parity📝 Commits (2)
4ae517aFix tracker world-state snapshot parity93b88a1Refresh PR metadata checks📊 Changes
4 files changed (+462 additions, -7 deletions)
View changed files
📝
src-tauri/src/commands/storage/game_state_snapshots.rs(+152 -0)➕
src/features/runtime/world-state/api/world-state-api.test.tsx(+120 -0)📝
src/features/runtime/world-state/api/world-state-api.ts(+17 -7)➕
src/features/runtime/world-state/hooks/use-tracker-character-avatar-actions.test.tsx(+173 -0)📄 Description
Linked issue
Closes #1804
Why this change
Runtime tracker/world-state parity had three regressions from the legacy path:
messageIdwithout proving it belongs to the target chat.What changed
worldStateApi.getnow falls back from a missing exact visible snapshot to synced chat tracker state from another visible assistant target, then to the latest tracker snapshot, stamping the fallback to the currently visible target.save_tracker_snapshotnow validates non-bootstrap target messages before save, rejecting missing or cross-chat targets while preserving bootstrap saves.Refactor impact
Primary owner:
Runtime world-state and Rust storage.
Impact areas reviewed:
Boundary notes:
Pressure points touched:
worldStateApi.get.tracker_snapshot_savecommand implementation throughgame_state_snapshots::save_tracker_snapshot.Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
Codex-run proof:
pnpm test src/features/runtime/world-state/api/world-state-api.test.tsx src/features/runtime/world-state/hooks/use-tracker-character-avatar-actions.test.tsxpassed.cargo test --manifest-path src-tauri/Cargo.toml game_state_snapshots::tests::save_tracker_snapshot -- --nocapturepassed.cargo check --manifest-path src-tauri/Cargo.tomlpassed.pnpm typecheckpassed.pnpm checkpassed.Manual limitation:
Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs or release metadata changes were needed for this runtime/storage bugfix.
UI evidence (if applicable)
No screenshot captured. This PR is kept draft; the changed behavior is covered by focused runtime/storage tests and full
pnpm check.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.