mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1265] [Issue]: LTM recall clean-up: /search parity, Debug recall order, dead cooldowns, small-budget serializer drops #645
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#645
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1265
Originally assigned to: @Promansis on GitHub.
Summary
Recall clean-up left over from the #1250 / #1258 scoring audit (scoring follow-up: #1264).
/searchdoes not reproduce a real recall turn, the Debug recall list shows relevance in an order that relevance does not explain, cooldown plumbing in ranking is dead, and the prompt serializer still drops selected memories at very small budgets. None of these change recall scoring.Affected package
long-term-memory1.4.15:routes.ts,retrieval.ts,ranking.ts,budget.ts,prompt.tsunderpackages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/ActivityView.tsxunderpackages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/Expected behavior
POST /searchwithout explicit settings returns what a chat turn would recall: the resolved recall settings (style weights, threshold, max memories, include-resolved), the prompt-overhead reserve and prompt-normalized token estimates. Explicit body fields still override. This makes it usable for an in-app "test recall" panel.Actual behavior
/searchdefaults differ from a turn (routes.ts:1426,retrieval.ts:161-236). With no weights in the body, the semantic lane is disabled (semanticWeight ?? 0), lexical, keyword and graph run at weight 1,maxChunksis 20, there is no threshold, no overhead reserve and no prompt-normalized estimate. A query sent to/searchcan return a very different set from the same text in a chat turn. The client does not call/search.ActivityView.tsx:556). Candidates are listed in fused (RRF) order with their relevance score, but no rank. The memory cap cuts in fused order, so a candidate rejected aslower_rankcan show higher relevance than one that was injected (for example 0.45 cut beside 0.35 injected), which reads as a bug.ranking.ts:36,:82-89;cooldownPenaltyinbudget.ts).reciprocalRankFuseacceptscooldowns, but its only caller (retrieval.ts:233) never passes them.prompt.ts). After the 1.4.11 overhead reserve, on a labelled fixture at default settings the serializer still dropped 13 selected chunks at a 256-token budget and 3 at 512 (0 at 4096). It never exceeds the budget.Steps to reproduce
POST /api/long-term-memory/searchwith onlyqueryTextand a chat scope, then send the same text as the last messages of a chat turn with debug logging on. Compare the selected memories and thesemanticOutcome.lower_rankcandidates.Environment
staging)upstream/staging7fc3b91c2)Logs, screenshots, or video
Not applicable; references above are against
7fc3b91c2.Additional context
Suggested approach:
/search: resolve settings withresolveLongTermMemoryRecallSettingsfor the requested mode, reserveestimateLongTermMemoryPromptOverhead, passpromptNormalizedEstimate, and let explicit body fields override. Optionally return the serializer result so a preview equals the injected block. Regression test:/searchwith onlyqueryTextmatches the generation-injection selection for the same text and scope.lower_rankas "cut by the memory limit (lower fused rank)".cooldownsoption,LtmRankCooldownandcooldownPenalty.Independent of the recall scoring fix and can land before or after it.
Template check