[PR #898] [MERGED] fix(long-term-memory): 1.3.1 — duplicate source IDs, updateNote arguments, and batch scope repair #1182

Closed
opened 2026-10-21 05:04:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/898
Author: @Promansis
Created: 9/17/2026
Status: ✅ Merged
Merged: 9/17/2026
Merged by: @Promansis

Base: staging ← Head: extraction-audit-repair


📝 Commits (5)

  • 4565375 fix(long-term-memory): handle duplicate source IDs
  • 8434e19 fix(long-term-memory): call updateNote with supported arguments in source extraction
  • 3d1cafc fix(long-term-memory): remove undeclared batch scope in import interop
  • e3008aa feat(long-term-memory): 1.3.1 — release payload and catalog entry
  • 0d8021f fix(long-term-memory): bound candidate and conflict failure titles to 240 characters

📊 Changes

19 files changed (+316 additions, -114 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.1.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/long-term-memory/CHANGELOG.md (+6 -0)
📝 packages/long-term-memory/client.js (+15 -15)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+35 -35)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx (+8 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts (+44 -14)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts (+1 -9)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+3 -3)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-browser.regression.ts (+1 -0)
📝 tests/long-term-memory-conversation-summary-import.regression.ts (+148 -2)
📝 tests/long-term-memory-loading.regression.mjs (+7 -4)

📄 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 #883
Closes #884
Closes #885

Why this change

  • Prevents source ID collisions and silent data overwrites when importing duplicate or conflicting source entries across chat summaries, lorebooks, and characters (#883).
  • Fixes invalid argument passing to storage.updateNote during source extraction, eliminating runtime crashes and type errors (#884).
  • Removes undeclared and unused batch extraction scope argument in import interop, ensuring authoritative per-item source note destination scopes are respected without risk of cross-item scope contamination (#885).
  • Releases Long-Term Memory version 1.3.1 with changelog and updated catalog entries.

What changed

  • packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts:
    • Disambiguated duplicate source ID collisions and handled conflicting source inputs during import.
    • Removed unused extractionScope calculation and dropped excess scope argument when calling processLongTermMemorySourceBatch.
  • packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts:
    • Removed unsupported third metadata argument to storage.updateNote.
  • packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts and client components:
    • Updated schemas and UI handling for robust source note provenance.
  • scripts/build-feature-packages.mjs:
    • Bumped Long-Term Memory feature version to 1.3.1.
  • packages/long-term-memory/CHANGELOG.md:
    • Added release notes for version 1.3.1.
  • Rebuilt generated outputs:
    • packages/long-term-memory/manifest.json
    • packages/long-term-memory/server.mjs
    • packages/long-term-memory/client.js
    • artifacts/long-term-memory-1.3.1.zip
    • catalog/catalog.json, catalog/v2/catalog.json, catalog/v3/catalog.json, and sidecar notes.json files.
  • Preserved upstream staging version artifacts/long-term-memory-1.3.0.zip bit-for-bit.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: None (compatible with current Engine range min: 2.4.1, maxExclusive: 4.0.0)
  • New or changed permissions/entrypoints: None
  • Restart, storage, update, or uninstall impact: Package version bump from 1.3.0 to 1.3.1; existing vaults and notes remain backward-compatible; offline restart, backup, and installation verified.

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

  • Ran full automated catalog validation (validate-catalog.mjs, test-catalog-lanes.mjs, validate-package-locales.mjs, catalog-release-notes.regression.mjs).
  • Ran complete repo CI test suite via test-ci.sh (all passed).
  • Executed Long-Term Memory package regression suites (test-ltm.sh conversation-summary-import, installation, routes-*).
  • Executed npm run check (Prettier and ESLint, 0 errors) and npm run typecheck:packages.
  • Verified git diff --check and git diff upstream/staging cleanly.

Documentation impact

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

UI evidence (if applicable)

N/A — backend import, extraction, and type correction fixes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved source import handling for duplicate and conflicting source IDs.
    • Duplicate sources with identical content are imported once; conflicting sources are rejected without overwriting existing notes.
    • Corrected source extraction updates and import error retry classification.
    • Switching memory categories now reliably resets the “no memories” section.
  • Release

    • Long-Term Memory updated to version 1.3.1 with refreshed release metadata and artifacts.

🔄 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/898 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/17/2026 **Status:** ✅ Merged **Merged:** 9/17/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `extraction-audit-repair` --- ### 📝 Commits (5) - [`4565375`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4565375e14ad401ead5f01fa6de2e3b6252437cf) fix(long-term-memory): handle duplicate source IDs - [`8434e19`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8434e19dcfb4c77f552eee29f72516efb881654f) fix(long-term-memory): call updateNote with supported arguments in source extraction - [`3d1cafc`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3d1cafc9d11d387339682a39fcff72544fa2d2d2) fix(long-term-memory): remove undeclared batch scope in import interop - [`e3008aa`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e3008aad0bd5bf1b2cea4b33ef003008c62c47b4) feat(long-term-memory): 1.3.1 — release payload and catalog entry - [`0d8021f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0d8021fa01bafdd9c32fba542e5a794e30551781) fix(long-term-memory): bound candidate and conflict failure titles to 240 characters ### 📊 Changes **19 files changed** (+316 additions, -114 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.1.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/long-term-memory/CHANGELOG.md` (+6 -0) 📝 `packages/long-term-memory/client.js` (+15 -15) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+35 -35) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx` (+8 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts` (+44 -14) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts` (+1 -9) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+3 -3) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-browser.regression.ts` (+1 -0) 📝 `tests/long-term-memory-conversation-summary-import.regression.ts` (+148 -2) 📝 `tests/long-term-memory-loading.regression.mjs` (+7 -4) </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 #883 Closes #884 Closes #885 ## Why this change - Prevents source ID collisions and silent data overwrites when importing duplicate or conflicting source entries across chat summaries, lorebooks, and characters (#883). - Fixes invalid argument passing to `storage.updateNote` during source extraction, eliminating runtime crashes and type errors (#884). - Removes undeclared and unused batch extraction scope argument in import interop, ensuring authoritative per-item source note destination scopes are respected without risk of cross-item scope contamination (#885). - Releases Long-Term Memory version 1.3.1 with changelog and updated catalog entries. ## What changed - `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts`: - Disambiguated duplicate source ID collisions and handled conflicting source inputs during import. - Removed unused `extractionScope` calculation and dropped excess `scope` argument when calling `processLongTermMemorySourceBatch`. - `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts`: - Removed unsupported third metadata argument to `storage.updateNote`. - `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` and client components: - Updated schemas and UI handling for robust source note provenance. - `scripts/build-feature-packages.mjs`: - Bumped Long-Term Memory feature version to 1.3.1. - `packages/long-term-memory/CHANGELOG.md`: - Added release notes for version 1.3.1. - Rebuilt generated outputs: - `packages/long-term-memory/manifest.json` - `packages/long-term-memory/server.mjs` - `packages/long-term-memory/client.js` - `artifacts/long-term-memory-1.3.1.zip` - `catalog/catalog.json`, `catalog/v2/catalog.json`, `catalog/v3/catalog.json`, and sidecar `notes.json` files. - Preserved upstream staging version `artifacts/long-term-memory-1.3.0.zip` bit-for-bit. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: None (compatible with current Engine range `min: 2.4.1`, `maxExclusive: 4.0.0`) - New or changed permissions/entrypoints: None - Restart, storage, update, or uninstall impact: Package version bump from 1.3.0 to 1.3.1; existing vaults and notes remain backward-compatible; offline restart, backup, and installation verified. ## 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 - Ran full automated catalog validation (`validate-catalog.mjs`, `test-catalog-lanes.mjs`, `validate-package-locales.mjs`, `catalog-release-notes.regression.mjs`). - Ran complete repo CI test suite via `test-ci.sh` (all passed). - Executed Long-Term Memory package regression suites (`test-ltm.sh conversation-summary-import`, `installation`, `routes-*`). - Executed `npm run check` (Prettier and ESLint, 0 errors) and `npm run typecheck:packages`. - Verified `git diff --check` and `git diff upstream/staging` cleanly. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) N/A — backend import, extraction, and type correction fixes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved source import handling for duplicate and conflicting source IDs. - Duplicate sources with identical content are imported once; conflicting sources are rejected without overwriting existing notes. - Corrected source extraction updates and import error retry classification. - Switching memory categories now reliably resets the “no memories” section. - **Release** - Long-Term Memory updated to version 1.3.1 with refreshed release metadata and artifacts. <!-- 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-21 05:04:46 +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#1182
No description provided.