[PR #1219] [MERGED] feat(long-term-memory): 1.4.3 — correlate recall attempts with confirmed injection (#1212) #1350

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

📋 Pull Request Information

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

Base: staging ← Head: feature(long-term-memory)/1212-trace-recall-injection


📝 Commits (3)

  • a7ba7e2 feat(long-term-memory): 1.4.3 — correlate recall attempts with confirmed injection (#1212)
  • 428faf0 Merge remote-tracking branch 'upstream/staging' into feature(long-term-memory)/1212-trace-recall-injection
  • c8d502e fix(long-term-memory): key recall attempt lock by file and restore test settings on failure (#1212)

📊 Changes

22 files changed (+595 additions, -185 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.3.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/client.js (+18 -18)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+39 -39)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ActivityView.tsx (+30 -15)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/LastInjectionSummary.tsx (+51 -24)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+9 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/generation-injection.ts (+110 -35)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+17 -3)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/usage.ts (+32 -1)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+25 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+39 -0)

...and 2 more files

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

Why this change

  • The last-injection view could not tell a recall that never ran apart from one that ran and was cancelled, failed, skipped, or completed without confirmation. This made recall troubleshooting unreliable: absence of a receipt was presented as a recall outcome even when the host had not invoked the recall at all.
  • This change correlates recall selection with the confirmed injection through a single attempt id, so the panel reports what the package actually observed.

What changed

  • Affected package ID: long-term-memory (1.4.3).
  • schema.ts: added recall attempt/outcome schemas and the attempt field on the last-injection response.
  • generation-injection.ts: one attemptId per recall invocation, recorded at entry with outcome completed (ready/no_matches), skipped (chat_not_found/empty_query/prompt_budget), cancelled, or failed; strictly increasing per-chat attempt timestamps so overlapping recalls order by invocation start; getChat failures recorded as failed.
  • usage.ts: attempt read/write at events/runtime-receipts/attempt-<sha256(chatId)>.json, monotonic-order guard, and attemptId carried on the confirmed receipt.
  • routes.ts: /last-injection/:chatId returns attempt with derived confirmed.
  • LastInjectionSummary.tsx, ActivityView.tsx, locales/en.json: surface cancelled/failed/skipped/completed-but-unconfirmed distinctly from “never ran”.
  • Regenerated manifest.json, client.js, catalog lanes and artifacts/long-term-memory-1.4.3.zip; changelog entry added.
  • Reconciliation: merged upstream/staging 1.4.2 (honest debug activity toggle, #1210/#1218); preserved its locale and changelog changes.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: unchanged; engine.min 2.4.1 / engine.maxExclusive unchanged.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: writes attempt records under events/runtime-receipts/; diagnostics contain no prompt or memory text.

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 filled in by the agent.

Documentation impact

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

UI evidence (if applicable)

  • Not provided.

Summary by CodeRabbit

  • New Features

    • Long-Term Memory now tracks recall attempts and distinguishes completed, skipped, cancelled, and failed outcomes.
    • The last-injection panel shows why a recall was skipped and whether an injection was confirmed, helping distinguish recalls that ran from those that did not.
  • Documentation

    • Added Long-Term Memory version 1.4.3 release notes.

🔄 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/1219 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/3/2026 **Status:** ✅ Merged **Merged:** 10/3/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/1212-trace-recall-injection` --- ### 📝 Commits (3) - [`a7ba7e2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a7ba7e200af993bab1390fe237f4eb4f14689c86) feat(long-term-memory): 1.4.3 — correlate recall attempts with confirmed injection (#1212) - [`428faf0`](https://github.com/Pasta-Devs/Marinara-Agents/commit/428faf08fecd2fc27a9269d0db51b79519d1c70c) Merge remote-tracking branch 'upstream/staging' into feature(long-term-memory)/1212-trace-recall-injection - [`c8d502e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c8d502e4fa5b7322343351baf2510c9b8cfd4e7e) fix(long-term-memory): key recall attempt lock by file and restore test settings on failure (#1212) ### 📊 Changes **22 files changed** (+595 additions, -185 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.3.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/client.js` (+18 -18) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+39 -39) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ActivityView.tsx` (+30 -15) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/LastInjectionSummary.tsx` (+51 -24) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+9 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/generation-injection.ts` (+110 -35) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+17 -3) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/usage.ts` (+32 -1) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+25 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+39 -0) _...and 2 more files_ </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`. ## Linked issue Closes #1212 ## Why this change - The last-injection view could not tell a recall that never ran apart from one that ran and was cancelled, failed, skipped, or completed without confirmation. This made recall troubleshooting unreliable: absence of a receipt was presented as a recall outcome even when the host had not invoked the recall at all. - This change correlates recall selection with the confirmed injection through a single attempt id, so the panel reports what the package actually observed. ## What changed - Affected package ID: `long-term-memory` (1.4.3). - `schema.ts`: added recall attempt/outcome schemas and the `attempt` field on the last-injection response. - `generation-injection.ts`: one attemptId per recall invocation, recorded at entry with outcome `completed` (`ready`/`no_matches`), `skipped` (`chat_not_found`/`empty_query`/`prompt_budget`), `cancelled`, or `failed`; strictly increasing per-chat attempt timestamps so overlapping recalls order by invocation start; `getChat` failures recorded as `failed`. - `usage.ts`: attempt read/write at `events/runtime-receipts/attempt-<sha256(chatId)>.json`, monotonic-order guard, and `attemptId` carried on the confirmed receipt. - `routes.ts`: `/last-injection/:chatId` returns `attempt` with derived `confirmed`. - `LastInjectionSummary.tsx`, `ActivityView.tsx`, `locales/en.json`: surface cancelled/failed/skipped/completed-but-unconfirmed distinctly from “never ran”. - Regenerated `manifest.json`, `client.js`, catalog lanes and `artifacts/long-term-memory-1.4.3.zip`; changelog entry added. - Reconciliation: merged `upstream/staging` 1.4.2 (honest debug activity toggle, #1210/#1218); preserved its locale and changelog changes. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: unchanged; `engine.min` 2.4.1 / `engine.maxExclusive` unchanged. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: writes attempt records under `events/runtime-receipts/`; diagnostics contain no prompt or memory text. ## 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 filled in by the agent. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Not provided. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Long-Term Memory now tracks recall attempts and distinguishes completed, skipped, cancelled, and failed outcomes. * The last-injection panel shows why a recall was skipped and whether an injection was confirmed, helping distinguish recalls that ran from those that did not. * **Documentation** * Added Long-Term Memory version 1.4.3 release notes. <!-- 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:09:22 +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#1350
No description provided.