mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1511] Heavy profiles cannot be imported: marinara-profile.json exceeds the 128MB read cap #759
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#759
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 @Romuromylus on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1511
Originally assigned to: @Romuromylus on GitHub.
Summary
Import Profile rejects any backup whose
marinara-profile.jsonis 128MB or larger, so users with large chat histories cannot migrate their data into the refactor.Repro
{ type: "marinara_profile", data: { fileStorage: { tables: { chats, messages } } } }), zip it, and use Import Profile.{"code":"invalid_input","message":"marinara-profile.json in profile ZIP is too large"}.Root cause
src-tauri/src/commands/storage/profile/zip_import.rsreadsmarinara-profile.jsonwithMAX_PROFILE_JSON_BYTES = 128 * 1024 * 1024and errors when the limit is hit. Because table rows (chats, messages) are embedded insidemarinara-profile.json, the file scales with history size. The heavy dataset's profile JSON was 248MB here, so it is never read.A contributing factor: a single chat record in this dataset is 74.7MB on its own, driven by a
memoriesarray with 10,897 elements stored inline on the chat row (chats.memories). Inline unbounded memory growth on the chat record makes even one long game or roleplay chat large enough to threaten the cap on its own.Impact
There is no working path to import a heavy real-world profile. The error message is clear, but the operation is impossible for affected users.
Suggested directions (for discussion)
marinara-profile.jsoninstead of reading it fully into memory, or raise/remove the cap for the file-import path.chats.memories) to separate zip entries instead of inlining them inmarinara-profile.json.chats.memoriesshould live inline on the chat record at all.Environment
refactor @
ef244c80, Windows 11, Tauri desktop (pnpm tauri dev).Found during smoke test #1484 (Heavy Data / Legacy / Import Pass). Project board: https://github.com/orgs/Pasta-Devs/projects/4
@Romuromylus commented on GitHub (May 29, 2026):
Fixed by #1518 (merged into
refactorasa9cc0827). marinara-profile.json is now streamed viaserde_json::from_readeroff the zip entry and the cap raised to 1 GiB, so heavy profiles import. Moving large inline fields (e.g.chats.memories) out of the JSON remains a separate, larger format change.