[PR #517] [MERGED] Fix Memory Nag restart activation #1006

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

📋 Pull Request Information

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

Base: staging ← Head: fix/memory-nag-activation-516


📝 Commits (1)

  • a519daa fix(memory-nag): activate after restart

📊 Changes

9 files changed (+84 additions, -57 deletions)

View changed files

➕ artifacts/memory-nag-1.0.2.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 packages/memory-nag/manifest.json (+3 -3)
📝 packages/memory-nag/server.mjs (+5 -5)
📝 packages/memory-nag/src/engine/packages/server/src/services/memory-nag/routes.ts (+37 -30)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/memory-nag-selection.regression.ts (+20 -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 #516

Why this change

Memory Nag installs successfully but cannot activate after Marinara restarts, so the package never contributes its agent definition and users cannot add it to a Roleplay chat.

The package registered a Fastify-wide hook, but the capability route collector intentionally exposes only route declarations. Activation therefore failed with addHook is not a function.

What changed

  • Move the existing Roleplay-only chat guard onto each Memory Nag route as a preHandler.
  • Add regression coverage proving all eight package routes carry the guard without relying on unsupported package-level hooks.
  • Rebuild Memory Nag as 1.0.2, including its manifest, server bundle, artifact, and all catalog lanes.

Package and security impact

  • Affected package IDs: memory-nag
  • Engine compatibility impact: remains compatible with Engine 2.4.4 and capability API 1.14
  • New or changed permissions/entrypoints: none; existing privileged routes retain the same Roleplay-only guard
  • Restart, storage, update, or uninstall impact: updating to 1.0.2 requires the package's existing restart flow; storage and uninstall behavior are unchanged

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

  • Run npx tsx tests/memory-nag-selection.regression.ts.
  • Run npm run check, node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, and node scripts/validate-catalog.mjs.
  • In staging Engine, update/install Memory Nag 1.0.2, restart, and verify it activates and appears as an available Roleplay tracker.

Documentation impact

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

UI evidence (if applicable)

No package UI layout changed.

Summary by CodeRabbit

  • Bug Fixes

    • Improved access validation across all Memory Nag routes, including memory deletion.
    • Ensured route-level protection is consistently applied.
  • Maintenance

    • Updated Memory Nag to version 1.0.2.
    • Refreshed package metadata, artifact information, checksums, and sizes.
  • Tests

    • Added regression coverage confirming all Memory Nag routes use the required validation guard.

🔄 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/517 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/23/2026 **Status:** ✅ Merged **Merged:** 8/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/memory-nag-activation-516` --- ### 📝 Commits (1) - [`a519daa`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a519daa4f24c5fc3d3b3500b52e32432b22ea357) fix(memory-nag): activate after restart ### 📊 Changes **9 files changed** (+84 additions, -57 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/memory-nag-1.0.2.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `packages/memory-nag/manifest.json` (+3 -3) 📝 `packages/memory-nag/server.mjs` (+5 -5) 📝 `packages/memory-nag/src/engine/packages/server/src/services/memory-nag/routes.ts` (+37 -30) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/memory-nag-selection.regression.ts` (+20 -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 #516 ## Why this change Memory Nag installs successfully but cannot activate after Marinara restarts, so the package never contributes its agent definition and users cannot add it to a Roleplay chat. The package registered a Fastify-wide hook, but the capability route collector intentionally exposes only route declarations. Activation therefore failed with `addHook is not a function`. ## What changed - Move the existing Roleplay-only chat guard onto each Memory Nag route as a `preHandler`. - Add regression coverage proving all eight package routes carry the guard without relying on unsupported package-level hooks. - Rebuild Memory Nag as 1.0.2, including its manifest, server bundle, artifact, and all catalog lanes. ## Package and security impact - Affected package IDs: `memory-nag` - Engine compatibility impact: remains compatible with Engine 2.4.4 and capability API 1.14 - New or changed permissions/entrypoints: none; existing privileged routes retain the same Roleplay-only guard - Restart, storage, update, or uninstall impact: updating to 1.0.2 requires the package's existing restart flow; storage and uninstall behavior are unchanged ## 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 - Run `npx tsx tests/memory-nag-selection.regression.ts`. - Run `npm run check`, `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, and `node scripts/validate-catalog.mjs`. - In staging Engine, update/install Memory Nag 1.0.2, restart, and verify it activates and appears as an available Roleplay tracker. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No package UI layout changed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved access validation across all Memory Nag routes, including memory deletion. * Ensured route-level protection is consistently applied. * **Maintenance** * Updated Memory Nag to version 1.0.2. * Refreshed package metadata, artifact information, checksums, and sizes. * **Tests** * Added regression coverage confirming all Memory Nag routes use the required validation guard. <!-- 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:11 +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#1006
No description provided.