mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2277] [Issue]: Lorebook entries with game-state activation conditions are silently suppressed in plain (non-game) chats #1113
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#1113
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 @Romuromylus on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2277
Originally assigned to: @cha1latte on GitHub.
Summary
A lorebook entry that carries an activation condition (a game-state field gate) no longer activates in plain roleplay/conversation chats, even when it keyword-matches. The web app activated it; the refactor blocks it with no error or indication.
Expected behavior
When no game state is present (the normal situation in a plain chat), an entry that has activation conditions but otherwise keyword-matches should still activate and inject its world info, matching main's permissive behavior.
Actual behavior
In the refactor the entry is blocked whenever no game state is present, so a user who adds a game-state field gate to an otherwise normal lorebook entry finds that entry never injects in ordinary chats.
Steps to reproduce
Impact area
Regression notes
Worked on main. Main evaluateConditions returns permissively with no game state:
packages/server/src/services/lorebook/keyword-scanner.ts:87(if (!gameState) return true), and plain-chat callers pass null gameState (packages/server/src/routes/generate.routes.ts:3582conversation,:3638preset-less roleplay/visual_novel). In the refactor the unified scan path buildsgameState = parseRecord(...)which returns{}(not null) when absent (src/engine/generation/active-lorebook-scanner.ts:794,src/engine/.../runtime-records.ts:13-22); the truthy empty record skipssrc/engine/generation-core/lorebooks/keyword-scanner.ts:81but the per-condition loop then hitsgetGameStateValue({}, field) === nulland line 85 returns false. Conditions are preserved verbatim on import (active-lorebook-scanner.ts:211) and Rust only stores/normalizes the field (contracts.rs:70,normalization.rs:306), so no permissive path exists anywhere in the refactor.Environment
5ddb9840(compared against main @b4ab97f)Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: