mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7980] [Issue]: Lorebook transfer failures can cause data loss, and embedded sync errors may go unnoticed #4380
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#4380
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 @minikkeuen on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7980
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Moving entries between lorebooks can cause data loss if an error occurs after some source entries have already been deleted.
Additionally, failures when synchronizing a linked lorebook back to a character's embedded
character_bookmay be silently ignored, allowing an operation to appear successful despite incomplete synchronization.Expected behavior
Actual behavior
Lorebook transfer rollback
Embedded character-book synchronization
syncCharacterBookFromLorebookcan return a failed status instead of throwing an exception.Steps to reproduce
These issues were identified through source-code inspection and reproduced using automated regression tests with injected failures.
Scenario A: Lorebook transfer failure
Scenario B: Embedded character-book synchronization failure
Environment
Logs, screenshots, or video
No browser screenshots or runtime error logs are available.
Both issues were identified through source-code inspection and reproduced using automated regression tests with injected storage and synchronization failures.
Additional context
Affected implementation areas:
packages/server/src/routes/lorebooks.routes.tspackages/server/src/services/lorebook/character-book-sync.tsThe proposed fixes:
The synchronization fix does not introduce full transactional rollback for every operation that modifies a lorebook before synchronization.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: