[PR #451] [MERGED] fix(long-term-memory): batch embedding requests #975

Closed
opened 2026-10-20 17:32:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/451
Author: @Promansis
Created: 8/20/2026
Status: ✅ Merged
Merged: 8/20/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/embedding-batching


📝 Commits (2)

  • 8312d20 fix(long-term-memory): batch embedding requests
  • eb74681 chore(long-term-memory): defer artifact release

📊 Changes

4 files changed (+69 additions, -2 deletions)

View changed files

📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+1 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/embedding-adapter.ts (+28 -1)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+4 -0)
📝 tests/long-term-memory-runtime.regression.ts (+36 -0)

📄 Description

Linked issue

Closes #448

Why this change

Long-Term Memory sent every recall chunk to the Engine embedding host as one request. Vaults over the host request limits lost semantic vectors while lexical recall remained available.

What changed

  • Batches Long-Term Memory embedding requests by the Engine's 128-text and 200,000-character limits.
  • Preserves vector order and keeps all-or-nothing lexical fallback behavior when a batch fails.
  • Adds count and character-boundary regression coverage.
  • Clarifies the semantic-unavailable UI message.
  • Affected package: long-term-memory.
  • The 1.2.9 artifact and release metadata are intentionally deferred per maintainer request; the existing 1.2.8 artifact/catalog state remains in place.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; existing Engine range retained
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: no storage migration; existing lifecycle behavior retained

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Focused runtime, UI, full Long-Term Memory, lifecycle, catalog, locale, ZIP, and repository checks passed before the artifact deferral delta. The 1.2.9 artifact is intentionally not included in this PR.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

The change is a copy clarification only; no layout or interaction change.

Summary by CodeRabbit

  • New Features
    • Improved long-term memory embedding reliability by processing large requests in bounded batches while preserving result order.
    • Lexical memory recall remains available when semantic embeddings cannot be generated.
  • Bug Fixes
    • Added safeguards for oversized embedding requests and invalid embedding responses.
    • Clarified the saved-memory status message when semantic embeddings are unavailable.
  • Tests
    • Added regression coverage for batching limits, large inputs, ordering, and localized messaging.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/451 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/20/2026 **Status:** ✅ Merged **Merged:** 8/20/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/embedding-batching` --- ### 📝 Commits (2) - [`8312d20`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8312d206dd62f1a8b3faa9b87e04843e0ae847dc) fix(long-term-memory): batch embedding requests - [`eb74681`](https://github.com/Pasta-Devs/Marinara-Agents/commit/eb746816c4f134ff0e4466210624ffbd3c12e58d) chore(long-term-memory): defer artifact release ### 📊 Changes **4 files changed** (+69 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/embedding-adapter.ts` (+28 -1) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+4 -0) 📝 `tests/long-term-memory-runtime.regression.ts` (+36 -0) </details> ### 📄 Description ## Linked issue Closes #448 ## Why this change Long-Term Memory sent every recall chunk to the Engine embedding host as one request. Vaults over the host request limits lost semantic vectors while lexical recall remained available. ## What changed - Batches Long-Term Memory embedding requests by the Engine's 128-text and 200,000-character limits. - Preserves vector order and keeps all-or-nothing lexical fallback behavior when a batch fails. - Adds count and character-boundary regression coverage. - Clarifies the semantic-unavailable UI message. - Affected package: `long-term-memory`. - The `1.2.9` artifact and release metadata are intentionally deferred per maintainer request; the existing `1.2.8` artifact/catalog state remains in place. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; existing Engine range retained - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: no storage migration; existing lifecycle behavior retained ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [x] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Focused runtime, UI, full Long-Term Memory, lifecycle, catalog, locale, ZIP, and repository checks passed before the artifact deferral delta. The `1.2.9` artifact is intentionally not included in this PR. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) The change is a copy clarification only; no layout or interaction change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved long-term memory embedding reliability by processing large requests in bounded batches while preserving result order. * Lexical memory recall remains available when semantic embeddings cannot be generated. * **Bug Fixes** * Added safeguards for oversized embedding requests and invalid embedding responses. * Clarified the saved-memory status message when semantic embeddings are unavailable. * **Tests** * Added regression coverage for batching limits, large inputs, ordering, and localized messaging. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#975
No description provided.