[PR #234] [MERGED] fix(long-term-memory): preserve character recall across chats #870

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/character-recall


📝 Commits (2)

  • 60b9f59 fix(long-term-memory): preserve character recall across chats
  • 6e12a84 fix(long-term-memory): allow character recall with personas

📊 Changes

9 files changed (+151 additions, -49 deletions)

View changed files

➕ artifacts/long-term-memory-1.1.5.zip (+0 -0)
📝 catalog/catalog.json (+7 -7)
📝 catalog/v2/catalog.json (+7 -7)
📝 catalog/v3/catalog.json (+7 -7)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+17 -17)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/scope.ts (+12 -7)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-runtime.regression.ts (+97 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #232

Why this change

  • Character-linked Long-Term Memory notes retained their original chat link, causing recall to reject them in later chats even when the active character matched.

What changed

  • Updated long-term-memory scope matching so an explicit character overlap can cross chat boundaries while chat-only notes remain chat-bound.
  • Preserved character, group, and persona isolation, including persona-enabled destination chats.
  • Added runtime regression coverage for same-character recall in a future chat and negative controls for another character, pure chat scope, persona scope, and group scope.
  • Bumped and rebuilt Long-Term Memory 1.1.5, including its server bundle, manifest, artifact, and catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; existing Engine chat and character scope inputs are used
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: package update only; no storage migration or lifecycle behavior change

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

  • node scripts/test-catalog-lanes.mjs passed.
  • node scripts/validate-catalog.mjs passed: 31 packages; v2, v3, and legacy lanes valid.
  • git diff --check passed.
  • tests/long-term-memory-runtime.regression.ts passed against Marinara Engine, including character recall across chats with and without a destination persona.
  • tests/long-term-memory-lifecycle.regression.ts passed for install, offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation.
  • tests/long-term-memory-routes.regression.ts is currently blocked on unchanged staging fixture data: it creates character note ID character-mara, while the current schema requires lowercase snake case with a char_ prefix.

Documentation impact

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

UI evidence (if applicable)

Not applicable; no UI changes.

Summary by CodeRabbit

  • New Features

    • Improved long-term memory recall across chats for the same character.
    • Added more precise filtering by character, persona, group, and chat scope.
  • Bug Fixes

    • Corrected memory matching when chats differ but character context is shared.
    • Prevented unrelated memories from being included across incompatible contexts.
  • Tests

    • Added regression coverage for character, persona, group, and chat-specific memory behavior.
  • Maintenance

    • Updated the Long-Term Memory package to version 1.1.5.

🔄 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/234 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/4/2026 **Status:** ✅ Merged **Merged:** 8/4/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/character-recall` --- ### 📝 Commits (2) - [`60b9f59`](https://github.com/Pasta-Devs/Marinara-Agents/commit/60b9f59eb5ad653c5052eaf1081d6497ed5ebaac) fix(long-term-memory): preserve character recall across chats - [`6e12a84`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6e12a84db50c19268c599ffaa367eee9a091ff53) fix(long-term-memory): allow character recall with personas ### 📊 Changes **9 files changed** (+151 additions, -49 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.1.5.zip` (+0 -0) 📝 `catalog/catalog.json` (+7 -7) 📝 `catalog/v2/catalog.json` (+7 -7) 📝 `catalog/v3/catalog.json` (+7 -7) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+17 -17) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/scope.ts` (+12 -7) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-runtime.regression.ts` (+97 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #232 ## Why this change - Character-linked Long-Term Memory notes retained their original chat link, causing recall to reject them in later chats even when the active character matched. ## What changed - Updated `long-term-memory` scope matching so an explicit character overlap can cross chat boundaries while chat-only notes remain chat-bound. - Preserved character, group, and persona isolation, including persona-enabled destination chats. - Added runtime regression coverage for same-character recall in a future chat and negative controls for another character, pure chat scope, persona scope, and group scope. - Bumped and rebuilt Long-Term Memory `1.1.5`, including its server bundle, manifest, artifact, and catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; existing Engine chat and character scope inputs are used - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: package update only; no storage migration or lifecycle behavior change ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] 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 - `node scripts/test-catalog-lanes.mjs` passed. - `node scripts/validate-catalog.mjs` passed: 31 packages; v2, v3, and legacy lanes valid. - `git diff --check` passed. - `tests/long-term-memory-runtime.regression.ts` passed against Marinara Engine, including character recall across chats with and without a destination persona. - `tests/long-term-memory-lifecycle.regression.ts` passed for install, offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation. - `tests/long-term-memory-routes.regression.ts` is currently blocked on unchanged `staging` fixture data: it creates character note ID `character-mara`, while the current schema requires lowercase snake case with a `char_` prefix. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) Not applicable; no UI changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved long-term memory recall across chats for the same character. * Added more precise filtering by character, persona, group, and chat scope. * **Bug Fixes** * Corrected memory matching when chats differ but character context is shared. * Prevented unrelated memories from being included across incompatible contexts. * **Tests** * Added regression coverage for character, persona, group, and chat-specific memory behavior. * **Maintenance** * Updated the Long-Term Memory package to version 1.1.5. <!-- 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:31:48 +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#870
No description provided.