[PR #1365] [MERGED] feat(long-term-memory): 1.4.31 — store and follow cause links between events (#1362) #1422

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

📋 Pull Request Information

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

Base: staging ← Head: feature(long-term-memory)/1362-event-cause-links


📝 Commits (5)

  • 9fec83a feat(long-term-memory): 1.4.33 — store and follow cause links between events (#1362)
  • 6546d29 chore(long-term-memory): renumber the release to 1.4.31 and rebuild outputs (#1362)
  • be7363b Merge remote-tracking branch 'upstream/staging' into feature(long-term-memory)/1362-event-cause-links
  • f10f008 Merge branch 'staging' into feature(long-term-memory)/1362-event-cause-links
  • f138124 Merge branch 'staging' into feature(long-term-memory)/1362-event-cause-links

📊 Changes

15 files changed (+151 additions, -46 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.31.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/evidence-unit-extraction.ts (+5 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/graph.ts (+6 -4)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-extraction-graph.regression.ts (+50 -0)
📝 tests/long-term-memory-index-keys.regression.ts (+44 -0)

📄 Description

Linked issue

Closes #1362

Why this change

Long-Term Memory could not record that one remembered event directly caused another, and linked recall could not follow such a link, nor a thread's paid_off_in link to the event that paid it off. Extraction now asks for a same-response event-to-event caused_by link, and linked recall follows both link types from either end.

The branch also renumbers its provisional release from 1.4.33 to 1.4.31 so the package version is the next one after the fetched upstream/staging base (1.4.30) rather than skipping two versions with no published release behind them, and rebuilds the generated outputs from source.

What changed

  • packages/long-term-memory — 1.4.30 → 1.4.31
    • src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts: adds one prompt rule asking for a caused_by link from an event to the same-response event that directly caused it, under the existing SERVER-ENFORCED LINK REQUIREMENTS heading. This is a model request; the server does not enforce the link's presence.
    • src/engine/packages/server/src/services/long-term-memory/graph.ts: linked recall follows an event's caused_by link to its cause event and a thread's paid_off_in link to its event, from either end. The #1360 seed rule, the 0.2 own-relevance floor, scope filtering, memory cap and token budget are unchanged; a graph weight of 0 still turns linked recall off.
    • tests/long-term-memory-extraction-graph.regression.ts: pins that an event-to-event caused_by link survives compilation beside extracted_from, that a bare provider target resolves to timeline_<subjectId>, and that the prompt carries the new rule.
    • tests/long-term-memory-index-keys.regression.ts: pins which link types are followed and which stay unfollowed.
  • scripts/build-feature-packages.mjs: Long-Term Memory version 1.4.31.
  • Generated outputs rebuilt from source: packages/long-term-memory/manifest.json, packages/long-term-memory/server.mjs, artifacts/long-term-memory-1.4.31.zip, catalog/catalog.json, catalog/v2/catalog.json, catalog/v3/catalog.json and the matching notes.json sidecars. client.js and agents.json are unchanged.

upstream/staging (f2646592) was merged into the branch; it merged without conflicts.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none. engine.min 2.4.1 and engine.maxExclusive 4.0.0 are unchanged, as are capabilityApi and builtAgainst.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: restart is still required. No schema, storage or migration change. Existing vaults gain the new links only when a chat is extracted again; nothing is backfilled.

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

Not performed by the agent: no Engine install or update, supported-mode check, restart check, or uninstall cleanup was run. Those remain for a human. Every box above is left unchecked for that reason.

Automated proof run locally on this HEAD (be7363bcc), all exit 0:

  • node scripts/build-feature-packages.mjs long-term-memory — the rebuild reproduced the committed outputs byte-identically (git status clean afterwards), so the merged catalog state regenerates from source.
  • npm run check (0 errors; 811 pre-existing warnings)
  • node scripts/test-catalog-lanes.mjs
  • node scripts/validate-package-locales.mjs
  • node scripts/validate-catalog.mjs
  • node scripts/tests/catalog-release-notes.regression.mjs
  • git diff --check
  • test-ltm.sh extraction-graph, test-ltm.sh index-keys, test-ltm.sh runtime

Known gap: the private parity harness measured the new rule against a 1.4.18-era vault snapshot that contains no event-to-event caused_by and no thread paid_off_in links, so it found zero newly followable edges. The measured recall parity (76/76 rows; pooled F1 .573 → .597 short and .465 → .506 long, off-topic injections unchanged) therefore shows no regression rather than a benefit. The benefit is unmeasured until a vault is re-extracted.

Documentation impact

No documentation changes are needed: catalog membership, compatibility and user-visible setup are unchanged. The README catalog table already lists long-term-memory, and the package CHANGELOG.md carries the 1.4.31 entry that the catalog build turns into release notes.

UI evidence (if applicable)

Not applicable — no UI change.

Summary by CodeRabbit

  • New Features

    • Long-Term Memory now links timeline events that directly cause one another and follows those links in either direction during recall. Recall also follows links between a thread and its payoff event.
    • Existing recall rules remain unchanged. Existing vaults gain these links after re-extraction; existing data is not backfilled.
  • Documentation

    • Added release notes for Long-Term Memory 1.4.31.

🔄 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/1365 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/1362-event-cause-links` --- ### 📝 Commits (5) - [`9fec83a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9fec83aa41c39b66896c9f5e231298365eb4b3ae) feat(long-term-memory): 1.4.33 — store and follow cause links between events (#1362) - [`6546d29`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6546d29561982f0ded0c9a53c093d90a19afa0a2) chore(long-term-memory): renumber the release to 1.4.31 and rebuild outputs (#1362) - [`be7363b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/be7363bcce8b7d53d3e6c1abf7f97c6977ae0125) Merge remote-tracking branch 'upstream/staging' into feature(long-term-memory)/1362-event-cause-links - [`f10f008`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f10f0089f909dcf6bea5a2f9ba9b985085e7784b) Merge branch 'staging' into feature(long-term-memory)/1362-event-cause-links - [`f138124`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f138124d60112febf037090d4cc8fb4f69e4786a) Merge branch 'staging' into feature(long-term-memory)/1362-event-cause-links ### 📊 Changes **15 files changed** (+151 additions, -46 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.31.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/evidence-unit-extraction.ts` (+5 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/graph.ts` (+6 -4) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+50 -0) 📝 `tests/long-term-memory-index-keys.regression.ts` (+44 -0) </details> ### 📄 Description ## Linked issue Closes #1362 ## Why this change Long-Term Memory could not record that one remembered event directly caused another, and linked recall could not follow such a link, nor a thread's `paid_off_in` link to the event that paid it off. Extraction now asks for a same-response event-to-event `caused_by` link, and linked recall follows both link types from either end. The branch also renumbers its provisional release from 1.4.33 to 1.4.31 so the package version is the next one after the fetched `upstream/staging` base (1.4.30) rather than skipping two versions with no published release behind them, and rebuilds the generated outputs from source. ## What changed - `packages/long-term-memory` — 1.4.30 → 1.4.31 - `src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts`: adds one prompt rule asking for a `caused_by` link from an event to the same-response event that directly caused it, under the existing `SERVER-ENFORCED LINK REQUIREMENTS` heading. This is a model request; the server does not enforce the link's presence. - `src/engine/packages/server/src/services/long-term-memory/graph.ts`: linked recall follows an event's `caused_by` link to its cause event and a thread's `paid_off_in` link to its event, from either end. The `#1360` seed rule, the 0.2 own-relevance floor, scope filtering, memory cap and token budget are unchanged; a graph weight of 0 still turns linked recall off. - `tests/long-term-memory-extraction-graph.regression.ts`: pins that an event-to-event `caused_by` link survives compilation beside `extracted_from`, that a bare provider target resolves to `timeline_<subjectId>`, and that the prompt carries the new rule. - `tests/long-term-memory-index-keys.regression.ts`: pins which link types are followed and which stay unfollowed. - `scripts/build-feature-packages.mjs`: Long-Term Memory version 1.4.31. - Generated outputs rebuilt from source: `packages/long-term-memory/manifest.json`, `packages/long-term-memory/server.mjs`, `artifacts/long-term-memory-1.4.31.zip`, `catalog/catalog.json`, `catalog/v2/catalog.json`, `catalog/v3/catalog.json` and the matching `notes.json` sidecars. `client.js` and `agents.json` are unchanged. `upstream/staging` (`f2646592`) was merged into the branch; it merged without conflicts. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none. `engine.min` 2.4.1 and `engine.maxExclusive` 4.0.0 are unchanged, as are `capabilityApi` and `builtAgainst`. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: restart is still required. No schema, storage or migration change. Existing vaults gain the new links only when a chat is extracted again; nothing is backfilled. ## 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 Not performed by the agent: no Engine install or update, supported-mode check, restart check, or uninstall cleanup was run. Those remain for a human. Every box above is left unchecked for that reason. Automated proof run locally on this HEAD (`be7363bcc`), all exit 0: - `node scripts/build-feature-packages.mjs long-term-memory` — the rebuild reproduced the committed outputs byte-identically (`git status` clean afterwards), so the merged catalog state regenerates from source. - `npm run check` (0 errors; 811 pre-existing warnings) - `node scripts/test-catalog-lanes.mjs` - `node scripts/validate-package-locales.mjs` - `node scripts/validate-catalog.mjs` - `node scripts/tests/catalog-release-notes.regression.mjs` - `git diff --check` - `test-ltm.sh extraction-graph`, `test-ltm.sh index-keys`, `test-ltm.sh runtime` Known gap: the private parity harness measured the new rule against a 1.4.18-era vault snapshot that contains no event-to-event `caused_by` and no thread `paid_off_in` links, so it found zero newly followable edges. The measured recall parity (76/76 rows; pooled F1 .573 → .597 short and .465 → .506 long, off-topic injections unchanged) therefore shows no regression rather than a benefit. The benefit is unmeasured until a vault is re-extracted. ## Documentation impact No documentation changes are needed: catalog membership, compatibility and user-visible setup are unchanged. The README catalog table already lists `long-term-memory`, and the package `CHANGELOG.md` carries the 1.4.31 entry that the catalog build turns into release notes. ## UI evidence (if applicable) Not applicable — no UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Long-Term Memory now links timeline events that directly cause one another and follows those links in either direction during recall. Recall also follows links between a thread and its payoff event. * Existing recall rules remain unchanged. Existing vaults gain these links after re-extraction; existing data is not backfilled. * **Documentation** * Added release notes for Long-Term Memory 1.4.31. <!-- 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:11:14 +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#1422
No description provided.