mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2380] [MERGED] Preserve player stats on empty persona-stats agent output #5569
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#5569
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/2380
Author: @Romuromylus
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/persona-stats-empty-clobber📝 Commits (1)
1224d97Preserve player stats on empty persona-stats agent output📊 Changes
2 files changed (+80 additions, -3 deletions)
View changed files
📝
src/engine/generation/tracker-snapshots.test.ts(+70 -0)📝
src/engine/generation/tracker-snapshots.ts(+10 -3)📄 Description
Linked issue
Closes #2370
Why this change
The persona-stats tracker branch in
gameStatePatchFromAgentResultassignedinventory,status, andpersonaStatsunconditionally, so a truncated or empty agent payload wiped the player's existing inventory, stat bars, and status. The clobbered values persist tochat.gameStateand become the next-turn baseline, making the loss permanent (high-severity roleplay data loss).What changed
mergeCustomTrackerFieldsFromAgentlength > 0guard already used by the custom-tracker branch.Refactor impact
Primary owner: engine generation (
src/engine/generation/tracker-snapshots.ts)Impact areas reviewed:
persona-statsbranch; the patch is spread over the snapshot, so omitting a key preserves the baseline value.Boundary notes:
Pressure points touched:
Validation
pnpm checkpasses before PR push/handoffManual verification notes
pnpm vitest run src/engine/generation/tracker-snapshots.test.ts— 4 passed (2 existing + 2 new: empty payload preserves inventory/status/persona-stats; non-empty payload still applies).pnpm exec tsc -b— clean.Feature Discoverability
Reason:
Docs and release impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.