mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1411] [Issue]: Lorebook vectorization misses secondary key parity #700
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#700
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 @Xelvanis on GitHub (May 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1411
Originally assigned to: @Xelvanis on GitHub.
## Summary
Refactor lorebook vectorization missed staging parity for secondary lorebook keys and lorebook-level vectorization exclusion.
Expected behavior
Lorebook vectorization should build embedding input from an entry's primary keys and secondary keys, including imported legacy aliases such as
secondary_keysandkeysecondary. If a lorebook record hasexcludeFromVectorization: true, the vectorization command should skip the whole book before calling the embedding provider.Actual behavior
The refactor native vectorization helper only used
keys, so secondary-key trigger text was not included in embedding input. It also only honored per-entryexcludeFromVectorization, so a lorebook-level exclusion could still attempt provider vectorization.Steps to reproduce
secondaryKeys,secondary_keys, orkeysecondary.lorebook_vectorizecommand for that lorebook.excludeFromVectorization: trueon the lorebook record and run vectorization again.Impact area
Environment
refactorbefore branchfix/lorebook-secondary-key-vector-parityLogs, screenshots, or video
No user logs or screenshots. This was identified through refactor-vs-staging code comparison and reproduced with focused Rust command/helper tests on the fix branch.
Regression notes
Staging builds lorebook embedding text from primary and secondary keys and skips all entries when the lorebook has
excludeFromVectorization: true.Additional context
Fix branch:
fix/lorebook-secondary-key-vector-parity.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (May 27, 2026):
Addressed directly on refactor in
7eb42c13. Lorebook vectorization now builds embedding text from primary keys plus canonical secondaryKeys and legacy aliases secondary_keys/keysecondary, and lorebook-level excludeFromVectorization returns a successful no-op before any embedding provider call. Validated with cargo test --manifest-path src-tauri/Cargo.toml lorebook --lib, git diff --check, and pnpm check.