[PR #1022] [MERGED] fix(long-term-memory): collapse shared branch summaries into one Sources row #1253

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

📋 Pull Request Information

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

Base: staging ← Head: fix/long-term-memory/duplicate-chat-summaries


📝 Commits (1)

  • df42a67 fix(long-term-memory): collapse shared branch summaries into one Sources row (#1020)

📊 Changes

13 files changed (+150 additions, -33 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.9.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+7 -7)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts (+24 -3)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-conversation-summary-import.regression.ts (+75 -1)

📄 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 #1020

Why this change

  • Branches of the same chat share summary entry identity, so the Sources tab showed every branch's copy as a separate ready-to-import row. Importing the same summary again created duplicate source notes.

What changed

  • long-term-memory: previewPackageInterop now collapses identical chat_summary candidates (entryId + source text) into one preview row, preferring an already-imported sibling so the row reflects imported state instead of re-offering the summary. Import-time resolution, conflicting same-ID summaries, distinct summaries, and branch provenance are unchanged.
  • Rebuilt generated outputs for long-term-memory 1.3.9: server.mjs, manifest.json, artifacts/long-term-memory-1.3.9.zip, catalog lanes and notes; version bump in scripts/build-feature-packages.mjs with a CHANGELOG.md entry.
  • Regression coverage in tests/long-term-memory-conversation-summary-import.regression.ts: shared-branch fixtures collapse to one row, and after importing the sibling the collapsed row reports imported with totals {matches: 1, ready: 0, imported: 1}.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; engine range unchanged (min 2.4.1)
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: install/uninstall/regression covered by test-ltm.sh all (1.3.9 install, offline restart, backup inclusion, uninstall, reinstall, durable-byte preservation)

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

  • Agent-run: test-ltm.sh conversation-summary-import (new collapse + imported-sibling assertions; bite-checked by temporarily reverting the fix), test-ltm.sh all, test-ci.sh (full local PR gate), validate-catalog.mjs, catalog release-notes regression, and git diff --check all pass on HEAD df42a674. Publication proof captured with state.mjs against upstream/staging base.

Documentation impact

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

UI evidence (if applicable)

  • Sources tab previously listed one ready row per branch for the same summary; after the fix identical branch summaries collapse to a single row that follows imported state.

Summary by CodeRabbit

  • New Features

    • Long-Term Memory now collapses identical chat summaries into a single Sources preview row.
    • Conflicting summaries, distinct summaries, and branch-specific import provenance remain preserved.
    • Imported sibling summaries are recognized correctly in subsequent previews.
  • Release

    • Updated Long-Term Memory to version 1.3.9.

🔄 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/1022 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/21/2026 **Status:** ✅ Merged **Merged:** 9/21/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix/long-term-memory/duplicate-chat-summaries` --- ### 📝 Commits (1) - [`df42a67`](https://github.com/Pasta-Devs/Marinara-Agents/commit/df42a6743f5e14237173cbccd6c539499995294f) fix(long-term-memory): collapse shared branch summaries into one Sources row (#1020) ### 📊 Changes **13 files changed** (+150 additions, -33 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.9.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+7 -7) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts` (+24 -3) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-conversation-summary-import.regression.ts` (+75 -1) </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`. <!-- Open as a draft while implementation is in progress. Mark Ready for review only after validation and self-review. --> ## Linked issue Closes #1020 ## Why this change - Branches of the same chat share summary entry identity, so the Sources tab showed every branch's copy as a separate ready-to-import row. Importing the same summary again created duplicate source notes. ## What changed - `long-term-memory`: `previewPackageInterop` now collapses identical `chat_summary` candidates (`entryId` + source text) into one preview row, preferring an already-imported sibling so the row reflects imported state instead of re-offering the summary. Import-time resolution, conflicting same-ID summaries, distinct summaries, and branch provenance are unchanged. - Rebuilt generated outputs for `long-term-memory` 1.3.9: `server.mjs`, `manifest.json`, `artifacts/long-term-memory-1.3.9.zip`, catalog lanes and notes; version bump in `scripts/build-feature-packages.mjs` with a `CHANGELOG.md` entry. - Regression coverage in `tests/long-term-memory-conversation-summary-import.regression.ts`: shared-branch fixtures collapse to one row, and after importing the sibling the collapsed row reports `imported` with `totals {matches: 1, ready: 0, imported: 1}`. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; engine range unchanged (min 2.4.1) - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: install/uninstall/regression covered by `test-ltm.sh all` (1.3.9 install, offline restart, backup inclusion, uninstall, reinstall, durable-byte preservation) ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `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 - Agent-run: `test-ltm.sh conversation-summary-import` (new collapse + imported-sibling assertions; bite-checked by temporarily reverting the fix), `test-ltm.sh all`, `test-ci.sh` (full local PR gate), `validate-catalog.mjs`, catalog release-notes regression, and `git diff --check` all pass on HEAD `df42a674`. Publication proof captured with `state.mjs` against `upstream/staging` base. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Sources tab previously listed one ready row per branch for the same summary; after the fix identical branch summaries collapse to a single row that follows imported state. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Long-Term Memory now collapses identical chat summaries into a single Sources preview row. * Conflicting summaries, distinct summaries, and branch-specific import provenance remain preserved. * Imported sibling summaries are recognized correctly in subsequent previews. * **Release** * Updated Long-Term Memory to version 1.3.9. <!-- 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:06:50 +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#1253
No description provided.