mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #730] [MERGED] Preserve file-native backups during self-heal #4752
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#4752
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/730
Author: @NeoKazuya
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Romuromylus
Base:
main← Head:fix/file-native-self-heal-backup📝 Commits (2)
afc887dPreserve file-native backups during self-heal0ad07fdMerge branch 'main' into fix/file-native-self-heal-backup📊 Changes
2 files changed (+167 additions, -7 deletions)
View changed files
📝
packages/server/src/db/file-backed-store.ts(+20 -7)📝
packages/server/test/file-backed-store.test.ts(+147 -0)📄 Description
Linked issue
Closes #728
Why this change
.bak, then the self-heal save copies the still-corrupt non-NUL primary over that valid.bakbefore rewriting the primary..bakis refreshed from a valid primary, the recovery source is gone.What changed
.bakduring startup..bakrefresh for the self-heal write of those recovered files, so the valid backup remains available while the primary is repaired..bakfrom repaired primaries.chats.jsonandmanifest.jsonwith valid.bakfiles.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
tables/chats.jsonrecovers from a valid.bak, repairs the primary file, and leaves.bakparseable.manifest.jsonrecovers from a valid.bak, repairs the primary file, and leaves.bakparseable..bakparseable.pnpm --dir packages/server exec tsx --import ./test/setup-env.ts --test test/file-backed-store.test.ts.pnpm check,pnpm version:check, andpnpm guard:installer-artifacts./and/api/health.Docs and release impact
UI evidence (if applicable)
N/A - backend file-storage recovery behavior only.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.