mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3597] [MERGED] Fix Unicode surrogate splitting in recalled memory #6010
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#6010
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/3597
Author: @SpicyMarinara
Created: 7/14/2026
Status: ✅ Merged
Merged: 7/14/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/3596-unicode-memory-truncation📝 Commits (1)
b02be25fix(memory): preserve unicode during recall truncation📊 Changes
3 files changed (+40 additions, -3 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/generation/memory-recall-pack.ts(+20 -3)📝
scripts/regressions/prompt.regression.ts(+19 -0)📄 Description
Closes #3596
Why
Long Conversation memories containing supplementary Unicode characters (including emoji and Lydian text) could be truncated between their UTF-16 surrogate halves. The isolated surrogate was then serialized into the provider request, which strict JSON parsers such as llama.cpp reject.
What changed
Validation
pnpm regression:promptpnpm checkRisk
This touches prompt assembly. Automated coverage proves that truncation no longer creates isolated UTF-16 surrogates at either boundary and that the broader prompt regression suite remains green. Live llama.cpp verification remains a manual check because no configured local provider is available in this workspace.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.