mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2047] [MERGED] Fix batched lorebook activation entry reads #5409
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#5409
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2047
Author: @cha1latte
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/3/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-2035-lorebook-entry-batch📝 Commits (1)
db1d97dFix batched lorebook activation entry reads📊 Changes
9 files changed (+305 additions, -11 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/entities.rs(+71 -0)📝
src-tauri/src/http_dispatch.rs(+50 -1)📝
src-tauri/src/lib.rs(+1 -0)📝
src/engine/capabilities/storage.ts(+1 -0)➕
src/engine/generation/active-lorebook-scanner.test.ts(+94 -0)📝
src/engine/generation/active-lorebook-scanner.ts(+74 -6)📝
src/engine/generation/tools-runtime.ts(+3 -3)📝
src/shared/api/remote-runtime.ts(+1 -0)📝
src/shared/api/storage-api.ts(+10 -1)📄 Description
Linked issue
Closes #2035
Why this change
What changed
list_where_instorage primitive.StorageGatewaymethod for batched lorebook-entry reads.Refactor impact
Primary owner:
Impact areas reviewed:
scanActiveLorebooks.Boundary notes:
StorageGatewaycapability.Pressure points touched:
src-tauri/src/lib.rscommand registration.src-tauri/src/http_dispatch.rsremote command dispatch.src/engine/generation/active-lorebook-scanner.tsprompt assembly scanner.src/engine/generation/tools-runtime.tsstored lorebook search.Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
pnpm exec vitest run src/engine/generation/active-lorebook-scanner.test.ts: passed. The scanner read three active lorebooks with one batched entry read and zero single-book entry reads, while excluding an entry in a disabled folder.cargo test --manifest-path src-tauri/Cargo.toml lorebook_entries_list_by_lorebook_ids -- --nocapture: passed. Covers the native command helper and remote dispatch path with should-not-match lorebook rows.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json: passed.pnpm check: passed after the final staged diff, including the new test file.Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
N/A. This is a backend/prompt-assembly read-path fix with no visible UI state. Verification is command-based and recorded above.
Summary by CodeRabbit
New Features
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.