mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#6847
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/5609
Author: @kolacheee
Created: 8/28/2026
Status: ✅ Merged
Merged: 8/28/2026
Merged by: @kolacheee
Base:
staging← Head:feat/5592-phase3-lorebook-embeddings📝 Commits (1)
9660cefperf(storage): pack lorebook entry embeddings as Float64Array📊 Changes
5 files changed (+37 additions, -4 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/db/file-backed-store.ts(+1 -0)📝
packages/server/src/db/schema/lorebooks.ts(+3 -3)📝
packages/server/src/services/storage/lorebooks.storage.ts(+9 -1)📝
scripts/regressions/message-sharding.regression.ts(+23 -0)📄 Description
Why
Part of #5592 — the flagged follow-up from #5596:
lorebook_entries.embeddinggets the same off-heap packing Memory Recall chunks received. Vector-heavy lorebooks (semantic matching enabled) currently hold every entry's embedding as an on-heap JSON string for as long as the table is resident.Stacked on #5608 (→ #5607); merge those first and this rebases clean.
What
Three small changes: the schema column becomes
vectorText, the table joinsVECTOR_TEXT_COLUMNS, and the entry parser accepts both the original string (what unprojected reads return — the compatibility surface for backup/export/mari-db) and a packedFloat64Array(what a projected read would surface), so no read path depends on which shape it got. Packing still applies only when the pack/unpack round trip is byte-identical, so the on-disk format is unchanged and no STORAGE_VERSION bump is needed — identical to the #5596 design.Regressions
The vector round-trip block in
message-sharding.regression.tsgains a lorebook-entry case: unprojected reads return the original string, and the flushed shard serializes the vector back byte-identically. Sharding suite green in both lazy and eager modes; memory-recall-revectorize green.Test plan
pnpm checkon a non-Windows checkoutpnpm regressionReferences #5592 (do not auto-close).
Summary by CodeRabbit
Performance
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.