mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2188] [Issue]: Lorebook prompt assembly consumes runtime state before marker insertion is known #1089
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#1089
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/2188
Originally assigned to: @cha1latte on GitHub.
Summary
The lorebook runtime rescan found that refactor scans and mutates lorebook runtime state before confirming that the selected prompt preset has lorebook or world-info markers. Legacy scanned lorebooks only when a lorebook/world-info marker expanded.
Expected behavior
Prompt assembly should only consume lorebook runtime side effects when lorebook content is actually part of the prompt, or it should explicitly document and prove that markerless prompts intentionally still scan and consume sticky/cooldown/delay/ephemeral state.
Actual behavior
Refactor calls
scanActiveLorebooksbefore iterating the selected preset sections. If the selected preset lackslorebook,world_info_before, orworld_info_aftermarkers, activated lore may not be inserted, but timing and ephemeral state can still be returned and later persisted after generation.Steps to reproduce
Impact area
Environment
refactorLogs, screenshots, or video
Static trace:
src/engine/generation/prompt-assembly.ts.worldBefore/worldAftervalues insectionContent.lorebook,world_info_before, orworld_info_afterinpackages/server/src/services/prompt/marker-expander.tsonmain.Regression notes
Legacy
maincached a scan inside marker expansion and applied side effects once per prompt build only when lorebook/world-info markers were encountered.Additional context
Parity row:
07-LB-RUNTIME-prompt-markers.Classification from rescan:
Confirmed regression.Template check