[GH-ISSUE #1198] [Issue]: Long-Term Memory: remove unused warnings/cooldown plumbing and version the /search response change #610

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Two pieces of Long-Term Memory plumbing are dead: retrieveLongTermMemory always returns warnings: [], and reciprocalRankFuse supports cooldown score penalties that no caller ever passes. Remove the dead plumbing and handle the public /search response compatibility, keeping the separate index-status warnings intact.

Affected package

  • long-term-memory

Expected behavior

  • The always-empty retrieval warnings field is removed from the recall result and its /search response, or the response-shape change is documented and versioned as a deliberate compatibility change.
  • The unwired cooldown plumbing is removed (or explicitly documented as intentionally retained) rather than left as dead code.
  • The distinct index-status warnings field (served by /status / index status, defined in routes.ts and schema.ts) is preserved.
  • Recall, ranking, scoring, and injected prompt behavior are unchanged.

Actual behavior

  • retrieval.ts returns warnings: [] as string[] unconditionally; no package consumer, the client, or the Engine reads it.
  • reciprocalRankFuse accepts { cooldowns } and applies penalties when passed (ranking.ts ~34, 76-82), and a measurement shows it works (vector fused 0.009914 -> 0.004957 with penalty 0.5), but retrieval.ts calls reciprocalRankFuse(lanes) with no cooldowns. No caller passes the option.

Steps to reproduce

  1. Call the Long-Term Memory /search route; observe warnings is always [].
  2. Search the package source for any caller of reciprocalRankFuse that passes cooldowns; there are none.

Environment

  • Marinara Engine version: 2.4.1 or newer (package engine.min)
  • Package version: 1.3.39 (current upstream staging)
  • Install type: source
  • OS + version: server-side; not OS-specific
  • Browser or app shell: not applicable (/search is a server route; the client never calls it)

Logs, screenshots, or video

Not applicable (static dead-code finding).

Additional context

  • Findings record: Part I unit 12 (A9/B10), read-only investigation under marinara-workflow.
  • A9: retrieval warnings is always empty and unused. The only related test asserts chunks (tests/long-term-memory-routes.regression.ts ~1721-1731). /search is a public HTTP route, so removing the field is a response-shape change that needs a documented/versioned compatibility decision.
  • B10: the cooldown mechanism is unwired — dead plumbing of the same class as warnings.
  • Keep the separate index-status warnings (routes.ts ~529, schema.ts ~1631); only the retrieval-response field is in scope.
  • Scope guard: no scoring, ranking, tier, dedup, budget, or prompt changes. Low priority, independent of all other units.
  • Related but separate: unit 11 fixes the debug recall_explanation output; unit 6 (A18) changes vector reuse and tone hashing.

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 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1198 Originally assigned to: @Promansis on GitHub. ## Summary Two pieces of Long-Term Memory plumbing are dead: `retrieveLongTermMemory` always returns `warnings: []`, and `reciprocalRankFuse` supports cooldown score penalties that no caller ever passes. Remove the dead plumbing and handle the public `/search` response compatibility, keeping the separate index-status `warnings` intact. ## Affected package - `long-term-memory` ## Expected behavior - The always-empty retrieval `warnings` field is removed from the recall result and its `/search` response, or the response-shape change is documented and versioned as a deliberate compatibility change. - The unwired cooldown plumbing is removed (or explicitly documented as intentionally retained) rather than left as dead code. - The distinct index-status `warnings` field (served by `/status` / index status, defined in `routes.ts` and `schema.ts`) is preserved. - Recall, ranking, scoring, and injected prompt behavior are unchanged. ## Actual behavior - `retrieval.ts` returns `warnings: [] as string[]` unconditionally; no package consumer, the client, or the Engine reads it. - `reciprocalRankFuse` accepts `{ cooldowns }` and applies penalties when passed (`ranking.ts` ~34, 76-82), and a measurement shows it works (`vector` fused `0.009914 -> 0.004957` with penalty `0.5`), but `retrieval.ts` calls `reciprocalRankFuse(lanes)` with no cooldowns. No caller passes the option. ## Steps to reproduce 1. Call the Long-Term Memory `/search` route; observe `warnings` is always `[]`. 2. Search the package source for any caller of `reciprocalRankFuse` that passes `cooldowns`; there are none. ## Environment - Marinara Engine version: 2.4.1 or newer (package `engine.min`) - Package version: `1.3.39` (current upstream `staging`) - Install type: source - OS + version: server-side; not OS-specific - Browser or app shell: not applicable (`/search` is a server route; the client never calls it) ## Logs, screenshots, or video Not applicable (static dead-code finding). ## Additional context - Findings record: Part I unit 12 (`A9/B10`), read-only investigation under `marinara-workflow`. - `A9`: retrieval `warnings` is always empty and unused. The only related test asserts `chunks` (`tests/long-term-memory-routes.regression.ts` ~1721-1731). `/search` is a public HTTP route, so removing the field is a response-shape change that needs a documented/versioned compatibility decision. - `B10`: the cooldown mechanism is unwired — dead plumbing of the same class as `warnings`. - Keep the separate index-status `warnings` (`routes.ts` ~529, `schema.ts` ~1631); only the retrieval-response field is in scope. - Scope guard: no scoring, ranking, tier, dedup, budget, or prompt changes. Low priority, independent of all other units. - Related but separate: unit 11 fixes the debug `recall_explanation` output; unit 6 (A18) changes vector reuse and tone hashing. ## 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:01 +07:00
  • closed this issue
  • added the
    bug
    label
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#610
No description provided.