[GH-ISSUE #1211] [Feature]: Complete Long-Term Memory recall explanations (scope, index snapshot, semantic outcome) #619

Closed
opened 2026-10-20 17:29:06 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1211

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Even after the Debug page cleanup, recall explanations cannot answer why an expected memory never became a candidate.

Findings from a read-only pass at 324446533:

  • Notes are filtered before ranking by scope, mode, archived/resolved status, and character targeting (retrieval.ts:104-123). Exclusions from this stage never appear in the rejection list.
  • The recall_explanation event (generation-injection.ts:127) does not record effective includeResolved, mode, exclusive character targeting, context-message count, indexed/eligible chunk counts, or a recall-time index snapshot.
  • embeddingsAvailable cannot distinguish disabled / unavailable / incompatible index / no positive matches / contributed.
  • rejected is capped at 20 and counts.rejected is the same capped number, so truncation cannot be detected from the UI.

Proposed package or change

Extend the existing recall_explanation event (schema, producer, and UI):

  • Record effective recall parameters: mode, includeResolved, exclusive character targeting, and context-message count.
  • Record indexed vs eligible chunk counts and the actual index timestamp/count plus the observed load/rebuild outcome used for that recall.
  • Record a small semantic outcome enum: disabled, unavailable, incompatible, no_matches, contributed.
  • Label the list "recorded rejected candidates - up to 20"; add total/omitted counts only if needed.
  • Show concise explanations in the UI and keep detailed scores expanded.

Do not record query text, source text, or out-of-scope content.

Why should this be optional?

This is package-owned diagnostics for a downloadable Agent package (long-term-memory). It ships with the package and should not become Engine core behavior.

Alternatives considered

A separate retrieval-trace store was rejected; extending the existing bounded recall_explanation event keeps the current storage caps and privacy boundaries.

Additional context

Owner files: generation-injection.ts, retrieval.ts, schema.ts, ActivityView.tsx. Existing coverage: tests/long-term-memory-runtime.regression.ts (recall explanation and retrieval receipts). Evidence from a read-only investigation at 324446533; no code changed yet. This is independent of the confirmed-injection correlation issue, but should land alongside the UI cleanup.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1211 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Even after the Debug page cleanup, recall explanations cannot answer why an expected memory never became a candidate. Findings from a read-only pass at `324446533`: - Notes are filtered before ranking by scope, mode, archived/resolved status, and character targeting (`retrieval.ts:104-123`). Exclusions from this stage never appear in the rejection list. - The `recall_explanation` event (`generation-injection.ts:127`) does not record effective `includeResolved`, mode, exclusive character targeting, context-message count, indexed/eligible chunk counts, or a recall-time index snapshot. - `embeddingsAvailable` cannot distinguish disabled / unavailable / incompatible index / no positive matches / contributed. - `rejected` is capped at 20 and `counts.rejected` is the same capped number, so truncation cannot be detected from the UI. ## Proposed package or change Extend the existing `recall_explanation` event (schema, producer, and UI): - Record effective recall parameters: mode, `includeResolved`, exclusive character targeting, and context-message count. - Record indexed vs eligible chunk counts and the actual index timestamp/count plus the observed load/rebuild outcome used for that recall. - Record a small semantic outcome enum: `disabled`, `unavailable`, `incompatible`, `no_matches`, `contributed`. - Label the list "recorded rejected candidates - up to 20"; add total/omitted counts only if needed. - Show concise explanations in the UI and keep detailed scores expanded. Do not record query text, source text, or out-of-scope content. ## Why should this be optional? This is package-owned diagnostics for a downloadable Agent package (`long-term-memory`). It ships with the package and should not become Engine core behavior. ## Alternatives considered A separate retrieval-trace store was rejected; extending the existing bounded `recall_explanation` event keeps the current storage caps and privacy boundaries. ## Additional context Owner files: `generation-injection.ts`, `retrieval.ts`, `schema.ts`, `ActivityView.tsx`. Existing coverage: `tests/long-term-memory-runtime.regression.ts` (recall explanation and retrieval receipts). Evidence from a read-only investigation at `324446533`; no code changed yet. This is independent of the confirmed-injection correlation issue, but should land alongside the UI cleanup. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:29:06 +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#619
No description provided.