[PR #599] [MERGED] Fix Memory Nag recall vault context #1040

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/599
Author: @SpicyMarinara
Created: 8/25/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/598-memory-nag-runtime-context


📝 Commits (3)

  • 1f274b8 fix(memory-nag): require prepared vault candidates
  • adeb63a Merge branch 'staging' into fix/598-memory-nag-runtime-context
  • 05e861f fix(memory-nag): keep participant save logging stable

📊 Changes

10 files changed (+105 additions, -36 deletions)

View changed files

➕ artifacts/memory-nag-1.0.16.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v3/catalog.json (+8 -8)
📝 packages/memory-nag/agents.json (+12 -2)
📝 packages/memory-nag/manifest.json (+5 -5)
📝 packages/memory-nag/server.mjs (+1 -1)
📝 packages/memory-nag/src/engine/packages/server/src/services/memory-nag/agent-runtime.ts (+25 -2)
📝 scripts/build-feature-packages.mjs (+12 -2)
📝 tests/memory-nag-selection.regression.ts (+26 -0)

📄 Description

Linked issue

Closes #598

Companion Engine host fix: Pasta-Devs/Marinara-Engine#5526

Why this change

Memory Nag could run without a usable prepared vault context and the model then copied an active character ID into memoryIds. The ID was correctly absent from the vault, but no completed recall reached the tracker. The agent also inherited every built-in lore source even though recall only needs recent messages, participants, and shortlisted memories.

What changed

  • publish Memory Nag 1.0.16 with compact chat-history-only host context
  • label the exact eligible allowedMemoryIds separately from character IDs
  • keep participant metadata sync off the context-preparation critical path
  • fail closed when package runtime context is unavailable
  • log the prepared candidate count in Agent debug mode without adding private memory text
  • rebuild the package artifact, manifest hashes, and catalog lanes

Package and security impact

  • Affected package IDs: memory-nag
  • Engine compatibility impact: requires the companion staging host change to honor package-defined built-in context selectors; declared Engine range remains >=2.4.4 <4.0.0
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: normal executable package update and restart; vault schema and stored memories are unchanged

Validation

  • npm run check
  • node scripts/test-catalog-lanes.mjs
  • node scripts/validate-package-locales.mjs
  • node scripts/validate-catalog.mjs
  • tsx tests/memory-nag-selection.regression.ts
  • 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

Local automated results: package regression, formatting/lint (zero errors), catalog lanes, package locales, catalog validation, and git diff --check passed. Manual staging update and post-processing generation remain for the maintainer after both companion PRs land.

Documentation impact

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

No documentation text changes are needed; behavior and package outputs stay aligned in this PR.

UI evidence (if applicable)

Not applicable; this changes runtime prompt scope and result validation, not package UI.

Summary by CodeRabbit

  • New Features

    • Improved Memory Nag recall selection by limiting choices to eligible memories.
    • Added clearer handling when required memory context is unavailable.
  • Bug Fixes

    • Recall operations now fail safely instead of reporting success without valid context.
    • Added diagnostic information for participant-save failures and eligible memories.
  • Tests

    • Added regression coverage for restricted memory selection and missing-context failures.
  • Chores

    • Updated Memory Nag to version 1.0.16.

🔄 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/599 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/25/2026 **Status:** ✅ Merged **Merged:** 8/25/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/598-memory-nag-runtime-context` --- ### 📝 Commits (3) - [`1f274b8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1f274b846f079e4e638f6070b9c262260670bfbf) fix(memory-nag): require prepared vault candidates - [`adeb63a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/adeb63aa833cbeb10bd619b778b62ff86fcde73c) Merge branch 'staging' into fix/598-memory-nag-runtime-context - [`05e861f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/05e861fc6b09f7bc05053a05e451ce5c6f93ca31) fix(memory-nag): keep participant save logging stable ### 📊 Changes **10 files changed** (+105 additions, -36 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/memory-nag-1.0.16.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `packages/memory-nag/agents.json` (+12 -2) 📝 `packages/memory-nag/manifest.json` (+5 -5) 📝 `packages/memory-nag/server.mjs` (+1 -1) 📝 `packages/memory-nag/src/engine/packages/server/src/services/memory-nag/agent-runtime.ts` (+25 -2) 📝 `scripts/build-feature-packages.mjs` (+12 -2) 📝 `tests/memory-nag-selection.regression.ts` (+26 -0) </details> ### 📄 Description ## Linked issue Closes #598 Companion Engine host fix: Pasta-Devs/Marinara-Engine#5526 ## Why this change Memory Nag could run without a usable prepared vault context and the model then copied an active character ID into `memoryIds`. The ID was correctly absent from the vault, but no completed recall reached the tracker. The agent also inherited every built-in lore source even though recall only needs recent messages, participants, and shortlisted memories. ## What changed - publish Memory Nag `1.0.16` with compact chat-history-only host context - label the exact eligible `allowedMemoryIds` separately from character IDs - keep participant metadata sync off the context-preparation critical path - fail closed when package runtime context is unavailable - log the prepared candidate count in Agent debug mode without adding private memory text - rebuild the package artifact, manifest hashes, and catalog lanes ## Package and security impact - Affected package IDs: `memory-nag` - Engine compatibility impact: requires the companion staging host change to honor package-defined built-in context selectors; declared Engine range remains `>=2.4.4 <4.0.0` - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: normal executable package update and restart; vault schema and stored memories are unchanged ## Validation - [ ] `npm run check` - [ ] `node scripts/test-catalog-lanes.mjs` - [ ] `node scripts/validate-package-locales.mjs` - [ ] `node scripts/validate-catalog.mjs` - [ ] `tsx tests/memory-nag-selection.regression.ts` - [ ] 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 Local automated results: package regression, formatting/lint (zero errors), catalog lanes, package locales, catalog validation, and `git diff --check` passed. Manual staging update and post-processing generation remain for the maintainer after both companion PRs land. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation No documentation text changes are needed; behavior and package outputs stay aligned in this PR. ## UI evidence (if applicable) Not applicable; this changes runtime prompt scope and result validation, not package UI. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved Memory Nag recall selection by limiting choices to eligible memories. * Added clearer handling when required memory context is unavailable. * **Bug Fixes** * Recall operations now fail safely instead of reporting success without valid context. * Added diagnostic information for participant-save failures and eligible memories. * **Tests** * Added regression coverage for restricted memory selection and missing-context failures. * **Chores** * Updated Memory Nag to version 1.0.16. <!-- 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:33:28 +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#1040
No description provided.