mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2699] [Issue]: Character card import field loss — RisuAI drops post-history/book/extensions; V3-only fields dropped; embedded-book fields flattened #1344
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#1344
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 @kolacheee on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2699
Originally assigned to: @SpicyMarinara on GitHub.
Summary
The character-card importer drops fields on several paths: a RisuAI card loses its post-history instructions, embedded character_book, character_version, and all extensions; all V3-only top-level fields (
group_only_greetings,nickname,assets,creation_date,source,creator_notes_multilingual) are silently dropped so they never survive import or round-trip; andnormalizeCharacterBookdrops per-entry trigger fields on the character-stored/re-exported copy of an embedded book.Expected behavior
Every card field present on the source (V1/V2/V3/CharX/RisuAI) should be preserved on import and survive a round-trip export.
Actual behavior
convertRisuToV2hardcodespost_history_instructions: "",character_book: null, andextensions: {}— so a RisuAI card's post-history, embedded lorebook, and every extension (depth_prompt, talkativeness, world, regex_scripts, …) are discarded.normalizeV2/normalizeCharacterDataextract only the V2 field set; V3-only top-level fields (group_only_greetings,nickname,assets,creation_date,source,creator_notes_multilingual) are never read, so they're lost at import and can never be re-exported.normalizeCharacterBookmaps each entry'spositionto onlybefore_char/after_char(loses at-depth) and re-derivesidfromuid, dropping per-entry trigger fields (depth, role, probability, selectiveLogic, sticky/cooldown/delay, group) on the copy stored on the character record (which is what a re-export would emit).How it breaks the pipeline
Code trace (staging @
b826f8f4) —packages/server/src/services/import/st-character.importer.ts:convertRisuToV2:730-748(post_history_instructions: "":740,character_book: null:746,extensions: {}:745).normalizeV2:612-646(only V2 fields);normalizeCharacterData:478-494.normalizeCharacterBook:666-707(position→before/after:671-677; id from uid:690; no depth/role/probability/selectiveLogic/timing/group). (The functional lorebook trigger mapping is filed #2690/#2691; this is the character-stored/re-exported copy.)Steps to reproduce
group_only_greetings/assets/nickname→ those fields are absent on the imported character and on any re-export.Suggested fix
convertRisuToV2, map RisuAI's post-history, lorebook, and extension fields instead of hardcoding empty.normalizeV2, carry V3-only top-level fields through (store them, even if unmodeled, so re-export is lossless).normalizeCharacterBook, preserve the full entry parameter set (at-depth position, depth, role, probability, selectiveLogic, sticky/cooldown/delay, group) rather than flattening.Environment
b826f8f4)Additional context
Found via a systematic multi-agent audit of import/export round-trips. Part of a set of import/export fidelity issues filed together.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 21, 2026):
Fixed in branch
codex/spicy-issue-sweep-2026-06-21.What changed:
Final repo checks will run after the full issue sweep.