mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1505] [Issue]: refactor; lorebook retrievers are missing scoping options from main #753
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#753
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 @jake9000 on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1505
Originally assigned to: @SpicyMarinara on GitHub.
Summary
for #1482
On MAIN, there is a function which informs the RAG agents which lorebooks they can search. On REFACTOR, they are using a legacy method.
related:
ebc75bab— "Implement chat-active lorebooks for knowledge agents"I was kinda happy about this because I had previously made an extremely bad extension to get a similar effect.
Expected behavior
Only lorebooks that are linked to a chat (or a character/persona in a chat) should be in scope for the retrieval agents
Actual behavior
The retrieval agent utilizes all lorebooks that 'seem relevant.' In my case it meant that trackers would suddenly display an incorrect city name and I could not shake it no matter how many messages or tracker clears I clicked on. You can't have more than one active chat session utilizing a retrieval agent unless you want to reconfigure it every time you switch tabs.
Additional context
sorry but here is a quick ai output as well.
Here's the definitive comparison:
Main branch — ✅ Feature works as described
The flow in packages/server/src/routes/generate.routes.ts:
Unlinked lorebooks can never leak into knowledge retrieval on main.
Refactor branch — ❌ Not implemented
they'd always produce "No relevant information found"
The lorebook-to-chat scope filter (lorebookAppliesToContext in prompt-assembly.ts) exists in refactor, but it only applies to the keyword-scan
activation pipeline, not to knowledge retrieval.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (May 29, 2026):
Addressed in
b2cebc28on refactor. Knowledge retrieval/router agents now use the dedicated knowledge executors with scoped source material from active chat lorebooks, chat-linked lorebooks, character/persona-linked lorebooks, or explicit agent source settings. Router candidates also pass the lorebook context filters before injection. Added regression tests for active-chat and active-character lorebook scoping.