mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7678] [MERGED] refactor(generate): move the reply save step into generate/save-generated-reply.ts #7877
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#7877
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/7678
Author: @Gunterlie
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @Gunterlie
Base:
staging← Head:chore/7573-save-generated-reply📝 Commits (4)
d95d7f6refactor(generate): move the reply save step into save-generated-reply.tse35a340Merge remote-tracking branch 'origin/staging' into chore/7573-save-generated-reply9b2ebd6test(generate): pin repeated split offsets, continue fallback, impersonate and owner-turn commitef860f9Merge remote-tracking branch 'origin/staging' into chore/7573-save-generated-reply📊 Changes
3 files changed (+403 additions, -133 deletions)
View changed files
📝
packages/server/src/routes/generate.routes.ts(+22 -133)➕
packages/server/src/routes/generate/save-generated-reply.ts(+187 -0)➕
scripts/regressions/generate-save-generated-reply.regression.ts(+194 -0)📄 Description
Linked issue
Part of #7573 (seventh slice).
Why this change
The route saved a generated reply in one long inline block: as a new swipe on regenerate, appended to the continued message, as the owner's turn of a pending spatial transition (with recovery of an already applied turn), or as new messages, split at scene breaks with Advanced Memory and saved whole or not at all. That block mixed storage, SSE events and multiplayer extras with the rest of the route. As
saveGeneratedReplyit has one input, one result and a direct test of each path.No behaviour change.
What changed
packages/server/src/routes/generate/save-generated-reply.tswithsaveGeneratedReply(ctx, fullResponse). It returns the saved message, the swipe index, the reply parts, the reply as saved, the continued content and whether an owner turn was recovered.generate.routes.tscalls it and writes the results back to its locals. The order of storage calls and SSE events is the same.scripts/regressions/generate-save-generated-reply.regression.ts(temp DB): new reply, regenerate swipe, continue (and its fallback to the message read before generation), impersonate, Advanced Memory split (including start offsets of repeated parts), the rollback of a failed split save, the rejected, committed and recovered owner turn with their SSE events.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run results (not a substitute for the boxes above):
pnpm check: passed. Server typecheck passed again after the last test commit.generate.routes.ts.Manual verification notes
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.