mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4354] [MERGED] fix: reconcile orphaned Noodle character accounts on open #6345
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#6345
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/4354
Author: @Gunterlie
Created: 7/31/2026
Status: ✅ Merged
Merged: 7/31/2026
Merged by: @Gunterlie
Base:
staging← Head:noodle-ghost-cleanup-pd📝 Commits (2)
98a8b49fix: reconcile orphaned Noodle character accounts on open588b900fix: don't abort Noodle bootstrap on ghost-account cleanup failure📊 Changes
1 file changed (+11 additions, -1 deletions)
View changed files
📝
packages/server/src/services/noodle/noodle-public-support.ts(+11 -1)📄 Description
Linked issue
No existing issue found for this — should be opened before merge to gather opinions per CONTRIBUTING.md.
Closes #
Why this change
Deleting a character is supposed to delete its Noodle account too (
characters.routes.tsdelete handler), but that cleanup is best-effort: if it throws, the error is only logged and the account is left behind. Those orphaned "ghost" accounts keep showing up in the Noodle feed/profile list with no character behind them, and there was no reconciliation path to clear them — a user affected by one had no self-serve way to remove it.What changed
noodle-public-support.ts'sbootstrapVisibleNoodle(runs on everyGET /noodle/, i.e. every time Noodle is opened) already loops character-backed accounts against live characters and used to justcontinuepast any account whose character no longer exists.deleteAccountByEntity("character", entityId)teardown instead, so ghost accounts (and their posts/interactions/subscriptions/digests, via that function's existing cascade) are cleared the next time Noodle is opened.logger.errorand moves on, instead of throwing and aborting bootstrap for every other account. Failed cleanups are simply retried on the next open.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
noodle_accountsrow pointing at a deleted character id), then reopen Noodle and confirm the ghost account and its posts disappear.deleteAccountByEntityto throw for one ghost account (e.g. via a temporary DB error) and confirm other accounts still load and the error is logged instead of the whole Noodle bootstrap failing.Docs and release impact
UI evidence (if applicable)
N/A — behavior-only fix, no UI surface changed.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.