mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2356] [MERGED] Fix linked lorebook header sync #5557
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#5557
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/2356
Author: @cha1latte
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/issue-2280-lorebook-header-sync📝 Commits (3)
ba58d93Fix linked lorebook header sync11d1df1Invalidate character caches after linked lorebook writesf0eef7bPreserve linked character book metadata📊 Changes
2 files changed (+360 additions, -2 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/entities.rs(+344 -0)📝
src/features/catalog/lorebooks/hooks/use-lorebooks.ts(+16 -2)📄 Description
Linked issue
Closes #2280
Why this change
lorebooksrow without re-syncing the linked character's embeddeddata.character_book, so later character card exports could carry a stale ST header.What changed
lorebooksupdates through an atomic lorebook/entries/characters sync path.character_bookheader from the updated lorebook row, includingname,description,scan_depth,token_budget, andrecursive_scanning.Refactor impact
Primary owner:
Rust storage
Impact areas reviewed:
src-tauri/src/commands/storage/commands/entities.rsdata.character_bookverbatim after storage sync.Boundary notes:
src-tauri; no React, engine, shared API, remote runtime, schema, dependency, auth, prompt, or release boundary changes.Pressure points touched:
lorebooks.Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
cargo test --manifest-path src-tauri/Cargo.toml updating_linked_lorebook_metadata_syncs_character_book_header -- --nocapturefailed because the embedded header stayed{}.cargo test --manifest-path src-tauri/Cargo.toml updating_linked_lorebook_metadata_syncs_character_book_header -- --nocapturepassed.cargo test --manifest-path src-tauri/Cargo.toml linked_lorebook -- --nocapturepassed, covering linked entry create/update/delete/move, embedded reimport, malformed-book atomic failure, and the metadata sync regression.pnpm check.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json.pnpm check, and proof gate clean.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
Backend/export-state bug; no meaningful app UI state changes. Evidence is a GitHub-renderable proof card built from the captured Rust repro and
pnpm checkoutputs:Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.