[GH-ISSUE #1544] [Issue]: Lorebook additional matching sources are not used during prompt activation #787

Closed
opened 2026-10-20 17:33:22 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Xelvanis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1544

Originally assigned to: @Xelvanis on GitHub.

Found during the 2026-05-29 native Tauri Lorebooks QA pass on origin/refactor commit f120eb33.

Proof method: seeded disposable lorebook/chat records through the app's Tauri storage API, then ran the app's own prompt-preview assembly from the native WebView. The same pass included positive controls for selected, global, character-scoped, persona-scoped, and roleplay-trigger-filtered entries.

What happened

Lorebook entries with additionalMatchingSources saved correctly, but prompt assembly did not use those sources during activation.

Repro

  1. Create a character whose description contains a unique key, for example LQA_CHAR_SOURCE_KEY.
  2. Attach that character to a roleplay chat.
  3. Create an active lorebook entry with:
    • keys: ["LQA_CHAR_SOURCE_KEY"]
    • additionalMatchingSources: ["character_description"]
    • content marker LQA_ADDITIONAL_SOURCE_CONTENT_SHOULD_APPEAR
  4. Run prompt preview / active world-info scan without putting the key in chat history.

Expected

The entry should activate because the selected additional matching source contains the key.

Actual

The entry did not activate. The character description containing the key was present in the assembled prompt, but the lorebook content marker was absent.

Likely owner

scanForActivatedEntries(...) supports additionalMatchingSourceText, but loadActivatedLore(...) in src/engine/generation/prompt-assembly.ts calls it without passing character/persona source text.

Likely affected sources include character name/description/personality/scenario/tags and persona description/tags.

Acceptance criteria

  • Prompt assembly provides the scanner with the active character/persona matching-source text.
  • Additional-source activation works without requiring the key to appear in chat history.
  • Add regression tests for at least character description and persona description source matching.
Originally created by @Xelvanis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1544 Originally assigned to: @Xelvanis on GitHub. Found during the 2026-05-29 native Tauri Lorebooks QA pass on `origin/refactor` commit `f120eb33`. Proof method: seeded disposable lorebook/chat records through the app's Tauri storage API, then ran the app's own prompt-preview assembly from the native WebView. The same pass included positive controls for selected, global, character-scoped, persona-scoped, and roleplay-trigger-filtered entries. ## What happened Lorebook entries with `additionalMatchingSources` saved correctly, but prompt assembly did not use those sources during activation. ## Repro 1. Create a character whose description contains a unique key, for example `LQA_CHAR_SOURCE_KEY`. 2. Attach that character to a roleplay chat. 3. Create an active lorebook entry with: - `keys: ["LQA_CHAR_SOURCE_KEY"]` - `additionalMatchingSources: ["character_description"]` - content marker `LQA_ADDITIONAL_SOURCE_CONTENT_SHOULD_APPEAR` 4. Run prompt preview / active world-info scan without putting the key in chat history. ## Expected The entry should activate because the selected additional matching source contains the key. ## Actual The entry did not activate. The character description containing the key was present in the assembled prompt, but the lorebook content marker was absent. ## Likely owner `scanForActivatedEntries(...)` supports `additionalMatchingSourceText`, but `loadActivatedLore(...)` in `src/engine/generation/prompt-assembly.ts` calls it without passing character/persona source text. Likely affected sources include character name/description/personality/scenario/tags and persona description/tags. ## Acceptance criteria - Prompt assembly provides the scanner with the active character/persona matching-source text. - Additional-source activation works without requiring the key to appear in chat history. - Add regression tests for at least character description and persona description source matching.
bsakaguchi 2026-10-20 17:33:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#787
No description provided.