mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #181] [Issue]: World Map JSON loses lore links when imported lore entries receive new IDs #91
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#91
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 @thetopham on GitHub (Aug 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/181
Originally assigned to: @thetopham on GitHub.
User report
Confirmed behavior
Lorebook entry IDs are global primary keys in Marinara Engine. On the same installation, Maps can resolve an entry directly by its ID and then read that entry row's
lorebookId, so the map does not need to store the book ID separately.That does not survive a normal cross-installation or clean re-import workflow:
lorebookEntryIds.lorebookId, creates a new lorebook, and creates new lorebook entry IDs.lorebook_entry_missing, and displays "Missing lore entry." It does not reconnect them to the newly imported entries.Therefore neither expected migration sequence preserves the links:
Same-installation map re-import works only while the original lorebook entries still exist. A complete database restore that preserves IDs is a different path and should continue to work.
Expected behavior
World Map export/import should support portable lore links when the corresponding character or lorebook has been imported with new IDs.
A safe solution should:
lorebookIdis insufficient because both IDs can change.If import-session ID mapping requires a new host API or changes to the character/lorebook importers, track that as a paired Marinara-Engine change while keeping the World Map format and UI work package-owned here.
Acceptance coverage
Current workaround
Import the lorebook or embedded character first, import the map, and manually replace each "Missing lore entry" attachment. An advanced workaround is to export the newly imported destination lorebook, build an old-entry-ID to new-entry-ID mapping, and update the World Map JSON before importing it.
@thetopham commented on GitHub (Aug 1, 2026):
Proposed preferred UX: add an optional self-contained World Map export that embeds its lore dependencies, similar to a character with an embedded lorebook.
Export modes
Portable reference contract
The portable bundle should not depend solely on database IDs. A new format version could include:
Import sequence
The World Map importer can handle the complete operation atomically from the user's perspective:
lorebookEntryIdsbefore saving the map, template, or shared world.This removes the required character/lorebook-versus-map import order and avoids asking users with large maps to repair every location manually.
Duplicate and safety behavior
For character bundles that also contain the same lorebook, provenance/fingerprints or a shared import-session map could prevent duplicate lorebooks. If that requires host importer support, it can be a paired Marinara-Engine change while the World Map bundle format remains package-owned here.
@thetopham commented on GitHub (Aug 2, 2026):
Additional beta feedback suggests a useful manual-recovery layer even before automatic cross-import remapping is available.
When exporting a World Map, preserve human-readable source metadata for each linked lore entry so a user can understand and repair a missing link after importing the character/lorebook and map elsewhere. The recovery display should be able to show at least:
Location name -> original lorebook name -> original lorebook entry name -> original entry IDPossible delivery options:
lorebook_entry_missingwarnings and the relinking UI; and/orworld-map-lore-mapping.txtor JSON, that the map creator can distribute with the map, characters, and lorebooks.This metadata should guide manual relinking, not silently match by name. Duplicate lorebook or entry names remain ambiguous, so exact IDs/import-session mappings and explicit user confirmation should stay authoritative.
Suggested acceptance additions:
@thetopham commented on GitHub (Aug 2, 2026):
Manual review confirmed portable lore copies persist and remap correctly, but the main Lorebooks library remains stale until refresh and linked-lore Open navigation has regressed. Starting follow-up work on branch agent/fix-world-map-lore-refresh. Owner: @thetopham.