mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3194] [Issue]: Cross-chat awareness leaks "Hide from AI" messages into other chats' prompts #1716
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#1716
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 @Magiwarriorx on GitHub (Jul 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3194
Originally assigned to: @SpicyMarinara on GitHub.
Summary
The Conversation-mode cross-chat "awareness" block feeds sibling-chat messages to the model without filtering
hiddenFromAI, so a message marked "Hide from AI" in one chat is sent to the model when generating in another chat that shares a character.Expected behavior
A message marked "Hide from AI" is never sent to the model, in any chat. The in-chat transcript already enforces this; awareness should too.
Actual behavior
buildAwarenessBlockselects sibling-chat messages filtered only by time window and injects them verbatim as a system message. ThehiddenFromAIflag lives inmessage.extra, which the awareness query never reads — so hidden messages leak into other chats' model context.Steps to reproduce
Environment
staging@a90e7158)Additional context
!isMessageHiddenFromAI(generate.routes.ts:1835, helperroutes/generate/generate-route-utils.ts:575). Awareness (services/conversation/awareness.service.ts:231-243) selectscontentbut notextraand filters only by time window, so it cannot honor the flag. Injected verbatim atgenerate.routes.ts:4655;mergeConversationCharacterMemoriesdoes not sanitize.message.extra.hiddenFromAI(chats.routes.ts:1645);contentis preserved, so it remains available to leak. Also reachable via the bulk action (chats.routes.ts:1665).crossChatAwareness !== false(generate.routes.ts:3529); default window ~1h, but temporal phrases widen it to days (awareness.service.ts:38-55), all unfiltered.extrain the awareness query and apply the sameisMessageHiddenFromAIfilter the main transcript uses. Aregression:promptguard would fit the existing lane.isConversationStartmarker — a user-settable per-chat context-reset boundary — so it can pull messages the user placed before that boundary in chat B. Unsure whether that's intended (awareness is arguably "recent activity elsewhere," separate from B's own context scope), so flagging rather than asserting.Template check
@SpicyMarinara commented on GitHub (Jul 4, 2026):
Agreed, if hidden from AI, it should stay that way.
@SpicyMarinara commented on GitHub (Jul 4, 2026):
Addressed in draft PR #3199.