mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2197] [Issue]: search_lorebook no longer matches lorebook entry keys #1095
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#1095
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/2197
Originally assigned to: @Promansis on GitHub.
Summary
The Batch 7 lorebook parityscan found that refactor
search_lorebookno longer searches lorebook entry keys. Legacymainmatched entry name, content, and primary keys for the built-in tool; refactor scores only name, tag, and content.Expected behavior
The built-in
search_lorebooktool should find relevant scoped lorebook entries when the query matches entry keys, not only entry name/tag/content. Results should preserve enough key/category context for agents and tool-enabled generations to understand why an entry matched.Actual behavior
Refactor loads scoped stored lorebook entries and activated entries, but
searchLorebookToolbuilds its search haystack fromname,tag, andcontentonly. A query that exists only in an entry key can return no results even though legacy would return the entry.Steps to reproduce
keysinclude a unique term that does not appear in the entry name, tag, or content.search_lorebook.search_lorebookwith that unique key term.Impact area
Environment
refactor/577de008search_lorebookLogs, screenshots, or video
Static trace:
search_lorebook:src/engine/contracts/types/agent.ts.entry.name,entry.tag, andentry.contentonly:src/engine/generation/tools-runtime.ts.mainsearchede.name,e.content, ande.keys:packages/server/src/routes/generate.routes.ts.Regression notes
Legacy
mainsupported key-only matches for thesearch_lorebooktool. Refactor preserved the tool but dropped key matching from the search implementation.Additional context
Parity target: #2181
Parity row:
07-LB-API-search-toolClassification from Batch 7 scan:
Confirmed regression.Suggested fix: include primary keys, and likely secondary keys if product wants parity with authoring data, in the search haystack and result context.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: