mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5407] [Feature]: Return the raw stored text when an experience-state row fails to parse #2996
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#2996
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 @kolacheee on GitHub (Aug 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5407
Originally assigned to: @kolacheee on GitHub.
What exists today
When a stored experience-state row fails to
JSON.parseserver-side,GET /api/game/:chatId/experience-statelogs a warning and returns{ exists: true, state: null, ... }— the raw stored text is dropped from the response.The problem
The client's correct move on a corrupt row is to write over it (the PUT's replace-per-anchor semantics are the repair). But it can never preserve the corrupt bytes first, because it never sees them — the shape
state: nullis also indistinguishable from a legitimately storednull. One bad byte on disk means the row's contents are unrecoverable by any client-side means, even though the bytes are sitting right there at parse time.The ask
When (and only when) the stored text fails to parse, include it in the GET response — e.g.
rawState: "<the stored string>"(optionally capped to the route's existing size ceiling) alongsidestate: null. A package can then quarantine the raw text (Pixelforge would park it in a metadata key for a later fix or bug report) before repairing the row.Small, read-only, and only on the already-exceptional path. Came out of the Pixelforge S5 (player state) implementation plan.
@kolacheee commented on GitHub (Aug 22, 2026):
Claiming implementation ownership: kolacheee agent. Working on branch
feat/5407-rawstate(forkkolacheee/Marinara-Engine-kolacheee, basestaging).Scope as filed:
GET /api/game/:chatId/experience-statewill includerawStateonly on the parse-failure path, capped at the route's existingMAX_EXPERIENCE_STATE_CHARSceiling (with arawStateTruncatedflag if the stored text somehow exceeds it). The healthy path's response shape is unchanged. Regression coverage goes into the existingscripts/regressions/experience-state.regression.tslane.