mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #779] [MERGED] Fix Lorebook Keeper overwrite updates #4770
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#4770
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/779
Author: @Promansis
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/13/2026
Merged by: @Promansis
Base:
main← Head:fix/issue-768-lorebook-update-overwrite📝 Commits (1)
0f87fbeFix lorebook keeper overwrite updates (#768)📊 Changes
2 files changed (+106 additions, -5 deletions)
View changed files
📝
packages/server/src/routes/generate/lorebook-keeper-utils.ts(+15 -5)📝
packages/server/test/lorebook-keeper-utils.test.ts(+91 -0)📄 Description
Linked issue
Closes #768
Why this change
action: "update"payload with replacementcontentfor an existing entry, but the persistence helper treated it like append-style Keeper content.What changed
updatepayloads that include non-empty replacementcontentand replace the existing entry body with that content.newFactsupdates so the built-in Keeper flow can still append durable facts without erasing prior details.newFactsupdates.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/lorebook-keeper-utils.test.tssuccessfully.pnpm checksuccessfully.git diff --checksuccessfully.TargetEntrycontainingOLD_CONTENT_MARKER, a Lorebook Keeper update replaced it with onlyNEW_CONTENT_MARKER: Keeper overwrite succeeded cleanly.; the old marker was gone.Docs and release impact
No docs or release/version files changed.
UI evidence (if applicable)
N/A. Server-side persistence behavior only.
Summary by CodeRabbit
New Features
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.