[PR #1528] [MERGED] fix(long-term-memory): keep the source note's own id as a link target (1.4.68) #1531

Closed
opened 2026-10-22 04:03:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/bare-source-note-link


📝 Commits (2)

  • b738695 fix(long-term-memory): keep the source note's own id as a link target (#1524)
  • 196c449 Merge upstream/staging into fix(long-term-memory)/bare-source-note-link; release long-term-memory 1.4.68

📊 Changes

14 files changed (+103 additions, -45 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.68.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 (+4 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+2 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/evidence-unit-extraction.ts (+6 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/structured-summary-normalizer.ts (+4 -3)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-extraction-graph.regression.ts (+47 -0)

📄 Description

Pull request

Linked issue

Closes #1524

Why this change

  • The extraction request tells the model it may link to the source note by its id. When the model did that with a link such as "evidenced by" or "planted in", the server rewrote the id into an event id that doesn't exist (timeline_source_…), and validation dropped the memory as "linked to a memory this extraction could not find". On a source whose text has section headings, the structured-summary normalizer did the same even to the written-out source_note:<id> form. With the shorter wording the extraction request has sent since 1.4.65 (#1517), this cost one memory in 4 of 7 live runs; all the dropped memories were static facts, threads or anchors.

What changed

  • long-term-memory: raw parsing keeps the source note's own id as a link target (the id from the request's trusted source_note: evidence), and the structured-summary normalizer leaves that exact id unchanged. Any other source_… id is prefixed and dropped as before.
  • Regression in tests/long-term-memory-extraction-graph.regression.ts.
  • Release: long-term-memory 1.4.68 on staging 0d6ca9e54, with the CHANGELOG entry, version, manifest, rebuilt server.mjs, artifact and catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none

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

  • The new extraction-graph case fails on staging (the fact citing the source note by its id is dropped, none kept) and passes with the fix. It parses and compiles a static fact whose only link is "evidenced by" the bare source note id, on a source with a ## world_fact heading, and checks that a source id the request didn't name is still prefixed. Removing either guard fails it.
  • Typecheck, lint, the package build and every Long-Term Memory regression suite pass on the release head.

Documentation impact

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

🤖 Generated with Claude Code


🔄 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/1528 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/bare-source-note-link` --- ### 📝 Commits (2) - [`b738695`](https://github.com/Pasta-Devs/Marinara-Agents/commit/b73869584659f04b1eef30e2ec3b1e6389cc0a95) fix(long-term-memory): keep the source note's own id as a link target (#1524) - [`196c449`](https://github.com/Pasta-Devs/Marinara-Agents/commit/196c449697835355dde2815e63a0d9c9a251963c) Merge upstream/staging into fix(long-term-memory)/bare-source-note-link; release long-term-memory 1.4.68 ### 📊 Changes **14 files changed** (+103 additions, -45 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.68.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` (+4 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+2 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/evidence-unit-extraction.ts` (+6 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/structured-summary-normalizer.ts` (+4 -3) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+47 -0) </details> ### 📄 Description # Pull request ## Linked issue Closes #1524 ## Why this change - The extraction request tells the model it may link to the source note by its id. When the model did that with a link such as "evidenced by" or "planted in", the server rewrote the id into an event id that doesn't exist (`timeline_source_…`), and validation dropped the memory as "linked to a memory this extraction could not find". On a source whose text has section headings, the structured-summary normalizer did the same even to the written-out `source_note:<id>` form. With the shorter wording the extraction request has sent since 1.4.65 (#1517), this cost one memory in 4 of 7 live runs; all the dropped memories were static facts, threads or anchors. ## What changed - `long-term-memory`: raw parsing keeps the source note's own id as a link target (the id from the request's trusted `source_note:` evidence), and the structured-summary normalizer leaves that exact id unchanged. Any other `source_…` id is prefixed and dropped as before. - Regression in `tests/long-term-memory-extraction-graph.regression.ts`. - **Release:** `long-term-memory` 1.4.68 on staging 0d6ca9e54, with the CHANGELOG entry, version, manifest, rebuilt `server.mjs`, artifact and catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none ## 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 - The new extraction-graph case fails on `staging` (the fact citing the source note by its id is dropped, none kept) and passes with the fix. It parses and compiles a static fact whose only link is "evidenced by" the bare source note id, on a source with a `## world_fact` heading, and checks that a source id the request didn't name is still prefixed. Removing either guard fails it. - Typecheck, lint, the package build and every Long-Term Memory regression suite pass on the release head. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:03:09 +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#1531
No description provided.