mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2185] [Issue]: Lorebook recursive scan cannot activate entries across active lorebooks #1088
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#1088
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 (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2185
Originally assigned to: @cha1latte on GitHub.
Summary
The lorebook runtime rescan found that recursive scanning now runs per lorebook instead of across the full relevant entry set. Entry content from one active lorebook cannot recursively activate entries in another active lorebook, even though legacy scanned across all relevant entries.
Expected behavior
Recursive scanning should preserve legacy behavior: scan initially active entries, use selected recursive content as the next frontier, and allow that frontier to activate any remaining relevant entry across the active lorebook set while respecting max recursion depth and
preventRecursion.Actual behavior
Refactor scans each lorebook independently in
scanLorebookEntries. When recursive scanning is enabled for a lorebook,recursiveScanonly receives that book's entries. Cross-lorebook recursive activation is therefore impossible.Refactor also performs recursion before final chat-level budgeting, while legacy recursed from budget-selected entries. That can make recursive activation depend on entries that would later be excluded by budget.
Steps to reproduce
main.Impact area
Environment
refactorLogs, screenshots, or video
Static trace:
src/engine/generation/active-lorebook-scanner.tssrc/engine/generation-core/lorebooks/keyword-scanner.tspackages/server/src/services/lorebook/index.tsonmainRegression notes
Legacy
mainrecursed acrossallEntriesfrom all relevant lorebooks. Refactor recurses only within one book at a time.Additional context
Parity row:
07-LB-RUNTIME-recursive-scan.Classification from rescan:
Confirmed regression.Template check