mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #544] [MERGED] Fix game scene time drift #4665
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#4665
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/544
Author: @cha1latte
Created: 5/8/2026
Status: ✅ Merged
Merged: 5/8/2026
Merged by: @cha1latte
Base:
main← Head:fix/issue-516-gm-state-drift📝 Commits (1)
ab73888Fix game scene time drift📊 Changes
5 files changed (+85 additions, -20 deletions)
View changed files
📝
packages/server/src/routes/game.routes.ts(+14 -18)📝
packages/server/src/services/game/gm-prompts.ts(+3 -1)📝
packages/server/src/services/game/time.service.ts(+20 -1)📝
packages/server/test/game-session-prompts.test.ts(+23 -0)➕
packages/server/test/game-time.test.ts(+25 -0)📄 Description
Linked issue
Closes #516
Why this change
night, the HUD day counter advanced by one day per turn even if the narration had not moved forward.What changed
setTimeOfDay()so scene-analysis labels preserve the current day when the label already matches the current phase, advance within the same day for later phases, and roll over only for true earlier-phase transitions./game/time/advanceto use the new scene-label helper instead of directly incrementing the day whenever the target hour was less than or equal to the current hour.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Machine verification:
node scratch\issue-516-time-repro.mjsMachine verification:
pnpm --filter @marinara-engine/server exec tsx --test test/game-time.test.ts test/game-session-prompts.test.tsMachine verification:
pnpm checkManual follow-up worth doing before merge: run a short real Game mode session with a configured scene-analysis model and confirm the HUD day no longer increments when the scene remains in the same time-of-day phase.
Docs and release impact
No docs or release metadata changed.
UI evidence (if applicable)
N/A - backend/game-state logic and GM prompt behavior. The raw command proof above captures the before/after state transition.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.