[PR #1511] [MERGED] fix(long-term-memory): keep backfilled character facts whose cause is written in words (1.4.59) #1522

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/summary-backfill-link-targets


📝 Commits (2)

  • 9fb0890 fix(long-term-memory): keep backfilled character facts whose cause is written in words (#1505)
  • 5d3e112 Merge upstream/staging into fix(long-term-memory)/summary-backfill-link-targets; release long-term-memory 1.4.59

📊 Changes

13 files changed (+279 additions, -84 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.59.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 (+35 -35)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/structured-summary-normalizer.ts (+43 -9)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-extraction-graph.regression.ts (+157 -0)

📄 Description

Pull request

Linked issue

Closes #1505

Why this change

  • When a structured chat summary gives a character fact's cause in words (caused_by: the night lesson), the server's backfill turned the words into timeline_the_night_lesson without checking that such an event exists. Validation then dropped the fact the server itself had added, and the extraction reported a partial success with "Dropped a candidate that linked to a memory this extraction could not find or did not keep". In live runs this was most of those drops: up to 3 lost facts per run on both Haiku and Sonnet.

What changed

  • long-term-memory: the structured-summary backfill resolves a character line's cause or evidence value like a relationship cause (an id the extraction holds, else an exact or word match over the answer's events and existing timeline notes). An unmatched value on a static fact is left out and the fact is kept. On a change fact it falls back to the event the line or summary declares only when the extraction holds that event; a change fact still without an event is dropped as source_event_graph_open.
  • Regressions in tests/long-term-memory-extraction-graph.regression.ts.
  • Release: long-term-memory 1.4.59, with the CHANGELOG entry, version, manifest, rebuilt server.mjs, artifact and catalog entries. At land, the branch was merged with upstream/staging (1.4.58, #1509); only the CHANGELOG conflicted, and the release script resolved it.

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 cases fail on staging (the backfilled fact is dropped as unknown_link_target) and pass with the fix. Cases: a static fact whose cause matches nothing is kept with no link; a cause in words resolves to the matching event in the answer or already in memory; an event id or the source note id keeps its link; a change fact's unmatched cause invents no link, even when the summary declares an event the model left out.

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/1511 **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)/summary-backfill-link-targets` --- ### 📝 Commits (2) - [`9fb0890`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9fb0890fab5904462ec6539cc2bc3d68d0de4f44) fix(long-term-memory): keep backfilled character facts whose cause is written in words (#1505) - [`5d3e112`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5d3e112f6f3868cba8966d17af92939a80548227) Merge upstream/staging into fix(long-term-memory)/summary-backfill-link-targets; release long-term-memory 1.4.59 ### 📊 Changes **13 files changed** (+279 additions, -84 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.59.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` (+35 -35) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/extraction/structured-summary-normalizer.ts` (+43 -9) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+157 -0) </details> ### 📄 Description # Pull request ## Linked issue Closes #1505 ## Why this change - When a structured chat summary gives a character fact's cause in words (`caused_by: the night lesson`), the server's backfill turned the words into `timeline_the_night_lesson` without checking that such an event exists. Validation then dropped the fact the server itself had added, and the extraction reported a partial success with "Dropped a candidate that linked to a memory this extraction could not find or did not keep". In live runs this was most of those drops: up to 3 lost facts per run on both Haiku and Sonnet. ## What changed - `long-term-memory`: the structured-summary backfill resolves a character line's cause or evidence value like a relationship cause (an id the extraction holds, else an exact or word match over the answer's events and existing timeline notes). An unmatched value on a static fact is left out and the fact is kept. On a change fact it falls back to the event the line or summary declares only when the extraction holds that event; a change fact still without an event is dropped as `source_event_graph_open`. - Regressions in `tests/long-term-memory-extraction-graph.regression.ts`. - **Release:** `long-term-memory` 1.4.59, with the CHANGELOG entry, version, manifest, rebuilt `server.mjs`, artifact and catalog entries. At land, the branch was merged with `upstream/staging` (1.4.58, #1509); only the CHANGELOG conflicted, and the release script resolved it. ## 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 cases fail on `staging` (the backfilled fact is dropped as `unknown_link_target`) and pass with the fix. Cases: a static fact whose cause matches nothing is kept with no link; a cause in words resolves to the matching event in the answer or already in memory; an event id or the source note id keeps its link; a change fact's unmatched cause invents no link, even when the summary declares an event the model left out. ## 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:04 +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#1522
No description provided.