mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5419] [MERGED] fix(game): stamp the legacy checkpoint-restore fallback's createdAt #6760
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#6760
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/5419
Author: @kolacheee
Created: 8/22/2026
Status: ✅ Merged
Merged: 8/22/2026
Merged by: @kolacheee
Base:
staging← Head:fix/5418-legacy-restore-stamp📝 Commits (1)
4ac0575fix(game): stamp the legacy checkpoint-restore fallback's createdAt📊 Changes
3 files changed (+102 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/routes/game.routes.ts(+12 -0)📝
scripts/regressions/experience-state.regression.ts(+89 -0)📄 Description
Linked issue
Closes #5418
Why this change
engineStateDatacapture — pre-capture checkpoints, or a corrupt blob) was the last writer in the experience-state family that did not stampcreatedAt. The #5405 stamp family runs strictly past the namespace's newest row, so a stamped burst legitimately runs ahead of the wall clock (a full 100-row import lands up to ~99 ms in the future); an unstampednow()landing inside that window sorts the freshly restored world behind rows it supersedes — flippinggetLatest, the anchor-cap prune, and the next checkpoint's capture lookup back to a world the player just restored away from. Since #5406 the same row also carries a freshly allocatedwriteOrdinal(deliberately the chat's highest), so the row's two ordering signals disagreed. Surfaced as a CodeRabbit outside-diff finding on #5417 and dispositioned there as pre-existing #5405 behavior deserving its own PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5417#issuecomment-5383069183What changed
engineStore.createnow stampscreatedAtthrough the sameexperienceStateStampBase(getLatest(chatId, cpEngineRow.gameType))the captured-restore branch uses — one write site, no behavior change anywhere else.gameTypeits lookup finds, so the stamp can now apply to a restored turn-game row. That is consistent — the restore genuinely is that namespace's newest write — and in a namespace no stamped writer ever touched, the base collapses to plainnow(), i.e. exactly the previous behavior.experience-statecase 24 pins the inversion — an empty-capture checkpoint plus a future-stamped row; without the stamp,getLatesthands back the future-stamped row instead of the restored world. Proven fail-first (red on exactly that assertion with the stamp reverted, green with it).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Boxes left for the human contributor per the template. What was agent-validated, exactly:
experience-statelanes 3/3 green (base incl. new case 24, ordinal, imported-anchors); checkpoint lanes 2/2 green;packages/servertypecheck (tsc -b ../shared && tsc --noEmit) clean; prettier clean on all three touched files.pnpm check, container build/run.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Summary by CodeRabbit
Bug Fixes
Tests
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.