mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2275] 09-CHAT-ERROR-chat-message-validation rejects legacy invalid payloads #1112
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#1112
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 @Promansis on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2275
Originally assigned to: @Promansis on GitHub.
Summary
09-CHAT-ERROR-chat-message-validation: refactor chat metadata and bulk message action validation accepts cases that legacy rejected or normalized. Invalid Discord webhook URLs can be persisted through chat metadata, invalidinactiveCharacterIdsare not clamped to active chat characters at the storage boundary, and empty/filtered bulk message delete or hidden payloads can resolve as successful no-ops.Expected behavior
Legacy behavior should be preserved for the Target 9 validation surface:
inactiveCharacterIdsmust be an array of strings and should be normalized to IDs that belong to the chat.Actual behavior
Refactor has UI affordances and several negative controls, but the metadata write path is generic and does not enforce the legacy chat-specific validation. The settings UI shows an invalid Discord URL warning while still calling
patchChatMetadata, which merges arbitrary metadata and sends it through genericstorage_update. Bulk delete and bulk hidden hooks filter IDs down to a unique array, then allow an empty list to flow through as a no-op success.Steps to reproduce
refactor, update a chat with metadata containingdiscordWebhookUrl: "not-a-discord-webhook"throughstorageApi.patchChatMetadataor the Discord Mirror setting.PATCH /:id/metadata.messageIdsarray.Impact area
Environment
refactor(refactor@37585ab9from #2268 scan context)Logs, screenshots, or video
Static proof from Batch 8 parityscan:
inactiveCharacterIds:main:packages/server/src/routes/chats.routes.ts:475,main:packages/server/src/routes/chats.routes.ts:483.main:packages/server/src/routes/chats.routes.ts:1097,main:packages/server/src/routes/chats.routes.ts:1140.src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:5605,src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx:5614.src/shared/api/storage-api.ts:199,src/shared/api/storage-api.ts:433,src-tauri/src/commands/storage/commands/entities.rs:474.src/features/catalog/chats/hooks/use-chats.ts:581,src/features/catalog/chats/hooks/use-chats.ts:717.{"deleted": 0}:src-tauri/src/commands/storage/chats.rs:616.Regression notes
Worked in legacy
mainaccording to #2268 Target 9 inventory and Batch 8 static trace. This issue tracks parity gap for09-CHAT-ERROR-chat-message-validationand links back to #2268.Acceptance criteria:
09-CHAT-ERROR-chat-message-validationrejects invalid Discord webhook URLs through every durable chat metadata write path.inactiveCharacterIdsmetadata writes reject non-array/non-string payloads and normalize to valid chat character IDs.Additional context
Parent parity tracker: #2268.
Batch 8 also inspected
09-CHAT-UI-message-action-controls. No issue is filed for that surface because the user-visible action controls were present in the direct UI owners inspected.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: