[PR #1139] [MERGED] fix(long-term-memory): 1.3.32 — keep flat-summary timeline events and stop structured backfill duplicates #1312

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/1137-summary-normalization-timeline-units


📝 Commits (3)

  • c41f418 fix(long-term-memory): 1.3.32 — keep flat-summary timeline events and stop structured backfill duplicates
  • 3c661a2 fix(long-term-memory): 1.3.32 review fixes — require symmetric provider coverage for structured character backfill
  • 7469306 Merge branch 'staging' into fix(long-term-memory)/1137-summary-normalization-timeline-units

📊 Changes

13 files changed (+290 additions, -111 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.32.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+5 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+36 -36)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/structured-summary-normalizer.ts (+54 -9)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-extraction-graph.regression.ts (+155 -26)

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

Why this change

  • Long-Term Memory dropped otherwise-valid timeline events extracted from flat chat summaries that have no recognized ## headings, because normalization only repaired the event section when the source parsed into structured sections.
  • Structured backfill could append a character memory unit the provider had already returned for the same source, and text under an unrecognized structured heading was attributed to the previous section.
  • A short structured character line followed by a richer sibling line for the same subject and section could cause the richer fact to be discarded as already covered.

What changed

  • structured-summary-normalizer.ts: normalize timeline_event units to sectionKey: "event" on the flat (zero-section) path so valid events and the memories that link to them survive; close the current structured section when a heading-shaped line maps to no known bucket; treat a same-subject/same-section backfill character fact as covered only when a pre-backfill unit shares at least 0.8 token overlap in both directions, so a provider fact that only partially covers a richer structured fact no longer hides it.
  • tests/long-term-memory-extraction-graph.regression.ts: regression coverage for the flat-summary timeline event, the unrecognized-heading boundary, provider-vs-backfill duplicate suppression, and the richer sibling structured fact that must survive a provider holding only the shorter fact.
  • Rebuilt outputs for long-term-memory: manifest.json, server.mjs, catalog/** (catalog.json, notes.json, v2, v3), and artifacts/long-term-memory-1.3.32.zip.

Package and security impact

  • Affected package IDs: long-term-memory (1.3.31 to 1.3.32)
  • Engine compatibility impact: none; engine.min 2.4.1, engine.maxExclusive 4.0.0, builtAgainst unchanged (Engine 2.4.1, commit c0ce4d88)
  • New or changed permissions/entrypoints: none; permissions and entrypoints unchanged
  • Restart, storage, update, or uninstall impact: restartRequired: true unchanged; no storage or data migration

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

  • MARINARA_AGENTS_ROOT=<worktree> MARINARA_ENGINE_ROOT=/home/damo/dev/Marinara-Engine bash test-ltm.sh extraction-graph passed; the same runner passed for local-characters and extraction-reliability.
  • npm run check passed; git diff --check was clean.
  • node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/tests/catalog-release-notes.regression.mjs, and node scripts/validate-catalog.mjs all passed.
  • Rebuilt with node scripts/build-feature-packages.mjs long-term-memory; the manifest hashes/sizes, the working-tree payloads, and the archive member hash agree.
  • Follow-up review fix: characterFactCovers now requires symmetric ≥0.8 overlap in both directions; re-ran extraction-graph, local-characters, extraction-reliability, npm run check, git diff --check, and the catalog validators, and rebuilt the package outputs.
  • The Engine-backed LTM regressions are local-only; hosted CI does not run them, so this coverage cannot be reproduced from hosted checks.

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.


🔄 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/1139 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1137-summary-normalization-timeline-units` --- ### 📝 Commits (3) - [`c41f418`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c41f41811a74c0120cb5b1461d575fb0eba1d2d0) fix(long-term-memory): 1.3.32 — keep flat-summary timeline events and stop structured backfill duplicates - [`3c661a2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3c661a20dbbf8debf28c0e44132adb0424dbe39a) fix(long-term-memory): 1.3.32 review fixes — require symmetric provider coverage for structured character backfill - [`7469306`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7469306e3b3d63b7930c5abc5ec05ff26b21cfec) Merge branch 'staging' into fix(long-term-memory)/1137-summary-normalization-timeline-units ### 📊 Changes **13 files changed** (+290 additions, -111 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.32.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+5 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+36 -36) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/structured-summary-normalizer.ts` (+54 -9) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+155 -26) </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 <!-- Every PR should reference an issue or feature request. --> Closes #1137 ## Why this change <!-- What user problem, package bug, or catalog goal does this solve? --> - Long-Term Memory dropped otherwise-valid timeline events extracted from flat chat summaries that have no recognized `##` headings, because normalization only repaired the event section when the source parsed into structured sections. - Structured backfill could append a character memory unit the provider had already returned for the same source, and text under an unrecognized structured heading was attributed to the previous section. - A short structured character line followed by a richer sibling line for the same subject and section could cause the richer fact to be discarded as already covered. ## What changed <!-- Include affected package IDs and generated outputs. --> - `structured-summary-normalizer.ts`: normalize `timeline_event` units to `sectionKey: "event"` on the flat (zero-section) path so valid events and the memories that link to them survive; close the current structured section when a heading-shaped line maps to no known bucket; treat a same-subject/same-section backfill character fact as covered only when a pre-backfill unit shares at least 0.8 token overlap in both directions, so a provider fact that only partially covers a richer structured fact no longer hides it. - `tests/long-term-memory-extraction-graph.regression.ts`: regression coverage for the flat-summary timeline event, the unrecognized-heading boundary, provider-vs-backfill duplicate suppression, and the richer sibling structured fact that must survive a provider holding only the shorter fact. - Rebuilt outputs for `long-term-memory`: `manifest.json`, `server.mjs`, `catalog/**` (`catalog.json`, `notes.json`, `v2`, `v3`), and `artifacts/long-term-memory-1.3.32.zip`. ## Package and security impact - Affected package IDs: `long-term-memory` (1.3.31 to 1.3.32) - Engine compatibility impact: none; `engine.min` 2.4.1, `engine.maxExclusive` 4.0.0, `builtAgainst` unchanged (Engine 2.4.1, commit `c0ce4d88`) - New or changed permissions/entrypoints: none; permissions and entrypoints unchanged - Restart, storage, update, or uninstall impact: `restartRequired: true` unchanged; no storage or data migration ## 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 <!-- Describe exactly what you tested, step by step. --> - `MARINARA_AGENTS_ROOT=<worktree> MARINARA_ENGINE_ROOT=/home/damo/dev/Marinara-Engine bash test-ltm.sh extraction-graph` passed; the same runner passed for `local-characters` and `extraction-reliability`. - `npm run check` passed; `git diff --check` was clean. - `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, and `node scripts/validate-catalog.mjs` all passed. - Rebuilt with `node scripts/build-feature-packages.mjs long-term-memory`; the manifest hashes/sizes, the working-tree payloads, and the archive member hash agree. - Follow-up review fix: `characterFactCovers` now requires symmetric ≥0.8 overlap in both directions; re-ran `extraction-graph`, `local-characters`, `extraction-reliability`, `npm run check`, `git diff --check`, and the catalog validators, and rebuilt the package outputs. - The Engine-backed LTM regressions are local-only; hosted CI does not run them, so this coverage cannot be reproduced from hosted checks. ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:08:13 +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#1312
No description provided.