mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6746] [MERGED] fix(memory): batch long-chat rebuilds without losing the previous index #7310
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#7310
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/6746
Author: @SirAdoni
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/issue-6708📝 Commits (4)
abc6facfix(memory): batch long-chat rebuilds and preserve prior indexes (#6708)83af134Merge remote-tracking branch 'origin/staging' into codex/merge-67469742b28fix(memory): warn once when the embedder is unavailablea51f8e5test(memory): distinguish vectors in the batch ordering proof📊 Changes
3 files changed (+426 additions, -40 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
packages/server/src/services/memory-recall.ts(+135 -39)📝
scripts/regressions/memory-recall-revectorize.regression.ts(+289 -1)📄 Description
Linked issue
Closes #6708
Why this change
Memory rebuilding currently sends the entire chat's chunks in one embedding request. Long chats can exceed a provider's aggregate request limit even when each chunk fits individually. The existing rebuild also deletes the native index before obtaining replacement vectors, so a failed request can leave the chat without its previous index.
What changed
Resumable partial progress, configurable batch limits, and provider-error-driven adaptive sizing are not implemented. A failed rebuild keeps the old index; retry starts the embedding work again.
Validation
Maintainer integration validation on
9742b28f5c95dd008a08c05dee95136cf3a90b02(merged with staging4be7698e7):pnpm checkpassed in one complete run.node scripts/run-regressions.mjs --filter memory-recall: 2/2 files passed, including batching, order, failed/canceled rebuild preservation, transaction rollback, imported rows, and unavailable-embedder warning coverage.Human verification checklist:
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Manually rebuild a long chat using the intended embedding provider and confirm multiple bounded requests complete. Verify retrieval afterward. Cancel or interrupt a rebuild and confirm the previous native index remains usable; then retry. No human or real-provider verification is claimed by the automated results above.
Docs and release impact
Unreleased changelog updated. No version bump or changes under
docs/.UI evidence (if applicable)
No UI changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.