mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7044] [Issue]: Limit LTM recall input to filtered conversation history #3944
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3944
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 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7044
Originally assigned to: @Promansis on GitHub.
Summary
Engine sends the assembled prompt, including preset/agent injections, as Long-Term Memory (LTM) recall input. Non-history text can occupy the package's recent-message query window and add or displace memories unrelated to the actual conversation.
Expected behavior
Pass only conversation-history messages to LTM, after the existing Advanced Memory history filtering. Preserve legitimate narrator/system history and existing audience/character/history-start restrictions. Leave query-window size, query construction, retrieval and ranking in the package.
Actual behavior
The generation handoff maps
sharedPromptForAgents(finalMessages)directly to role/content. The shared Advanced Memory helper intentionally retains non-history prompt messages, and the handoff then discards theircontextKindorigin metadata. The package takes the last configured number of supplied messages, so tail injections can enter the query and displace recent conversation turns.Steps to reproduce
Earlier investigation exercised actual Engine prompt/history helpers and the activated LTM package with synthetic notes. A real-provider/browser generation-route reproduction has not been run:
Environment
staging, source inspected at35621d44bbe7bf3336943e1076e4e8065a8b835a; no release-build reproduction claimed.Logs, screenshots, or video
Earlier synthetic characterization covered 18 cases. Its characterization assertions passed; the desired history-only assertion failed at the first tail-injection case. With a one-chunk budget, the injected topic could displace the conversation-relevant note. The history-only control also preserved narrator/system history and did not reintroduce history excluded by Advanced Memory.
That fixture was not rerun for this filing. Live-chat frequency, provider/model quality and full HTTP/browser behavior remain unmeasured. Current Engine handoff and current package query selection still retain the reported behavior; recent Agents diagnostic additions do not change this input selection.
Current source references:
Additional context
Keep this as a small Engine input-boundary fix:
sharedPromptForAgentsglobally: other agents still need their existing prompt inputs. Preserve current recall enablement/regeneration behavior and the final provider prompt/injection placement.Implementation proof should capture the actual package query for no-injection, before/after-history injection, multiple tail injections, and Advanced Memory enabled/disabled cases. Preserve narrator/system history and audience/history-start exclusions; verify other agents and the final provider prompt remain unchanged. Reuse prompt-scope/Advanced Memory regression infrastructure and a focused package-runtime handoff proof, then run repository-required validation. None of the post-fix gates has been run for this filing.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: