mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3744] [MERGED] fix(noodle): make account settings patches atomic #6085
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#6085
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/3744
Author: @Gunterlie
Created: 7/17/2026
Status: ✅ Merged
Merged: 7/17/2026
Merged by: @SpicyMarinara
Base:
staging← Head:noodl-split-1a-typed-settings📝 Commits (6)
e97575afix(noodle): make account settings patches atomicd947649docs(noodle): add PR stack plan870edd4fix(noodle): address atomic settings reviewf834157refactor(noodle): trust typed follow timestampseb3bb97docs: align Noodle settings acceptance criteria04c93c3fix(noodle): close settings review gaps📊 Changes
12 files changed (+1172 additions, -155 deletions)
View changed files
➕
.github/plans/noodl-split/coderabbit-dont-review-plans.md(+1 -0)➕
.github/plans/noodl-split/noodler-pr-stack-plan-v2.md(+463 -0)➕
.github/plans/noodl-split/paseo-slice-kickoff-prompt.md(+80 -0)📝
packages/client/src/components/noodle/NoodleView.tsx(+46 -61)📝
packages/client/src/hooks/use-noodle.ts(+56 -1)📝
packages/server/src/routes/noodle.routes.ts(+55 -42)📝
packages/server/src/services/noodle/noodle-profile-selection.ts(+1 -6)📝
packages/server/src/services/storage/noodle.storage.ts(+215 -35)📝
packages/shared/src/schemas/noodle.schema.ts(+63 -4)📝
packages/shared/src/types/noodle.ts(+25 -1)📝
scripts/regressions/noodle-prompt.regression.ts(+2 -2)📝
scripts/regressions/noodle-settings.regression.ts(+165 -3)📄 Description
Linked issue
Related implementation discussion: #3618
The oversized NoodleR approach was closed after maintainer acknowledgment that the work should be rebuilt as a focused PR stack from current
staging. This PR is Slice 1A of that stack and resolves P1 Finding 1: account settings can silently overwrite one another.Why this change
NoodleAccount.settingswas an untyped JSON record, and the generic account update path replaced the entire object. Independent profile, follow, notification, avatar-sync, and generated-follow writers could read stale snapshots and silently erase one another.Later NoodleR slices will add more independent writers, so the stack needs a typed ownership boundary and an atomic patch operation before those features land. The committed stack plan keeps the remaining slices, dependencies, findings, and acceptance criteria visible from
stagingafter this PR merges.What changed
NoodleAccountSettingscontract with requiredprofile,social,scheduler, andprivacysubtrees.schedulerandprivacyas strict empty containers for their later owning slices.PATCH /noodle/accounts/:id/settingswith a discriminated subtree patch schema.patchAccountSettings()storage behavior that reads and merges against the latest persisted row.avatarCropas settings-backed storage with its existing top-level account projection..github/plans/noodl-split/.Architecture
Current ownership is:
profile: avatar crop, banner, location, generated-profile marker, manual-edit markersocial: following IDs, follow timestamps, notification read cursorscheduler: reserved empty containerprivacy: reserved empty containerpatchAccountSettings()opens a serialized file-store transaction, reads the latest row, normalizes legacy or canonical data, merges only the requested subtree, persists the canonical object, and returns the updated account.The generic account-update route is now column-only and strictly rejects
settings, closing the previous whole-object replacement escape path.The committed v2 stack plan defines the dependency graph and acceptance criteria for subsequent slices. The kickoff prompt gives future agents the same scope and proof instructions.
Known limitations
schedulerandprivacyintentionally define no fields yet. Slices 6, 7, and 8 will extend their owned contracts when those behaviors are designed.pnpm smoke:uicould not execute because Chromium could not load the environment dependencylibnspr4.so.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAutomated commands run during implementation:
pnpm regression:noodlepnpm regression:promptpnpm checkpnpm guard:installer-artifactsThe concurrency regression was first run against the old replacement path and failed because the competing social write erased
bannerUrl. With the new operation, concurrent profile, social, scheduler, and privacy patches survive live-state inspection and storage reopen.Manual verification notes
settingspayload.pnpm smoke:uion a machine with Chromium runtime dependencies installed.Docs and release impact
Docs added:
.github/plans/noodl-split/noodler-pr-stack-plan-v2.md.github/plans/noodl-split/paseo-slice-kickoff-prompt.mdNo user-facing README, configuration, FAQ, changelog, or release metadata changes are required for this internal contract slice.
UI evidence
Not applicable. No visual UI changes are introduced.
Summary by CodeRabbit
New Features
profilesettings.Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.