mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4857] [MERGED] fix: enforce strict Persona API server boundaries #6519
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#6519
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4857
Author: @Xelvanis
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/10/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/persona-strict-decoded-boundary📝 Commits (2)
304b2defix: enforce strict Persona API server boundariesb26ab63fix: address Persona boundary review feedback📊 Changes
9 files changed (+1334 additions, -241 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
package.json(+2 -1)📝
packages/server/src/routes/characters.routes.ts(+190 -128)📝
packages/server/src/services/import/marinara.importer.ts(+110 -58)📝
packages/server/src/services/personas/persona-projector.ts(+59 -1)📝
packages/server/src/services/storage/characters.storage.ts(+32 -53)📝
packages/shared/src/index.ts(+1 -0)➕
packages/shared/src/schemas/persona.schema.ts(+304 -0)➕
scripts/regressions/persona-api-normalization.regression.ts(+635 -0)📄 Description
Linked issue
Closes #4646. That issue is already closed and cannot be reopened; it is listed with the repository's required issue-link syntax. This PR implements the strict server write/import/export boundary from that Persona API normalization work, while client write migration remains a separate follow-up.
Why this change
Persona fields such as tags, stats, conversation behavior, crop data, and tracker configuration are structured values at the API boundary but serialized JSON in file-backed storage. Loose request handling made validation inconsistent and could make historical Persona imports or exports fail because of one malformed recoverable field.
Direct API writes should be strict, while legacy native files and saved rows should remain recoverable. Serialization should happen once at the server/storage boundary rather than leaking storage representation into the public contract.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdAutomated and focused checks completed
pnpm checkpnpm regression:persona-api(runs decoded reads followed by normalization)pnpm --filter @marinara-engine/server lintThe final checks passed after rebasing the committed PR onto freshly fetched
origin/staging.Manual verification notes
An isolated headed local-browser session covered the final reviewed source state:
Imported Personaappeared in the Personas panel.Exported 2 personastoast appeared.No client or UI files changed in this PR, so light/dark visual evidence is not applicable.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)CHANGELOG.mdincludes the user-facing entry. Nodocs/, translated-documentation, localization, or version files are affected.UI evidence (if applicable)
Not applicable: this is a server/shared boundary change and all client/UI paths remain unchanged. Isolated browser verification is described above.
Summary by CodeRabbit
Bug Fixes
Compatibility
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.