[GH-ISSUE #4849] [Issue]: Enforce chat settings profile mode and branch boundaries #2680

Closed
opened 2026-10-21 05:52:51 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Xelvanis on GitHub (Aug 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4849

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Chat settings profiles can currently be applied to a chat in a different mode, and reusable profiles can capture branch display/lineage metadata. This lets an imported or directly requested profile mutate an incompatible chat and lets profile reuse transfer false branch identity between chats.

Expected behavior

  • Importing a profile for another chat mode stores it without applying it to the open chat.
  • Direct profile application rejects a profile/chat mode mismatch before any chat write.
  • Saving, importing, duplicating, and applying profiles cannot transfer branchName, branchParentChatId, branchParentMessageId, or branchMessageId.
  • Applying a profile preserves the target chat's own legitimate branch identity.

Actual behavior

The client immediately applies a successfully imported profile without checking its mode. The server's apply route/storage path also does not compare the profile mode with the target chat mode. The profile metadata exclusion list omits the four branch identity fields, so they can be captured and replayed onto unrelated chats.

Steps to reproduce

  1. Export a Roleplay settings profile, then import it from a Conversation chat's settings drawer.
  2. Observe that the new profile is stored and immediately applied to the Conversation chat.
  3. Alternatively, call POST /api/chat-presets/:profileId/apply/:chatId using a profile and chat with different modes; the request succeeds and writes the chat.
  4. Save a profile from a branch chat, then apply it to another chat; branch display/lineage metadata can be transferred.

Environment

  • Marinara Engine version: 2.4.2 (staging)
  • Install type: source
  • OS + version: N/A (contract/storage issue)
  • Browser or app shell: N/A

Logs, screenshots, or video

No runtime log is required. The behavior is visible in the current client import callback and server profile application/storage paths.

Additional context

The ordinary profile picker is filtered by the live chat mode, but imports bypass that filter. Legacy visual_novel data should continue to be migrated to Roleplay rather than treated as a separate compatibility mode.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Aug 10, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4849 Originally assigned to: @SpicyMarinara on GitHub. <!-- task-id: settings-profile-mode-and-branch-boundaries --> ## Summary Chat settings profiles can currently be applied to a chat in a different mode, and reusable profiles can capture branch display/lineage metadata. This lets an imported or directly requested profile mutate an incompatible chat and lets profile reuse transfer false branch identity between chats. ## Expected behavior - Importing a profile for another chat mode stores it without applying it to the open chat. - Direct profile application rejects a profile/chat mode mismatch before any chat write. - Saving, importing, duplicating, and applying profiles cannot transfer `branchName`, `branchParentChatId`, `branchParentMessageId`, or `branchMessageId`. - Applying a profile preserves the target chat's own legitimate branch identity. ## Actual behavior The client immediately applies a successfully imported profile without checking its mode. The server's apply route/storage path also does not compare the profile mode with the target chat mode. The profile metadata exclusion list omits the four branch identity fields, so they can be captured and replayed onto unrelated chats. ## Steps to reproduce 1. Export a Roleplay settings profile, then import it from a Conversation chat's settings drawer. 2. Observe that the new profile is stored and immediately applied to the Conversation chat. 3. Alternatively, call `POST /api/chat-presets/:profileId/apply/:chatId` using a profile and chat with different modes; the request succeeds and writes the chat. 4. Save a profile from a branch chat, then apply it to another chat; branch display/lineage metadata can be transferred. ## Environment - Marinara Engine version: 2.4.2 (`staging`) - Install type: source - OS + version: N/A (contract/storage issue) - Browser or app shell: N/A ## Logs, screenshots, or video No runtime log is required. The behavior is visible in the current client import callback and server profile application/storage paths. ## Additional context The ordinary profile picker is filtered by the live chat mode, but imports bypass that filter. Legacy `visual_novel` data should continue to be migrated to Roleplay rather than treated as a separate compatibility mode. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:52:51 +07:00
Author
Owner

@Xelvanis commented on GitHub (Aug 10, 2026):

guuuuh, Codex submitted this without asking >:

<!-- gh-comment-id:5237454984 --> @Xelvanis commented on GitHub (Aug 10, 2026): guuuuh, Codex submitted this without asking >:
Author
Owner

@SpicyMarinara commented on GitHub (Aug 10, 2026):

Implementation is now owned by @SpicyMarinara in draft PR #4856.

<!-- gh-comment-id:5238511282 --> @SpicyMarinara commented on GitHub (Aug 10, 2026): Implementation is now owned by @SpicyMarinara in draft PR #4856.
Author
Owner

@Xelvanis commented on GitHub (Aug 10, 2026):

WTB, ability to assign myself to issues 😂I'll be quicker on PRs next time, lol

<!-- gh-comment-id:5238563589 --> @Xelvanis commented on GitHub (Aug 10, 2026): WTB, ability to assign myself to issues 😂I'll be quicker on PRs next time, lol
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2680
No description provided.