mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6056] [MERGED] fix(launcher): skip the storage writer lease when snapshotting data for an update #7041
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#7041
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/6056
Author: @Romuromylus
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/11/2026
Merged by: @Romuromylus
Base:
staging← Head:fix/6046-snapshot-skip-writer-lease📝 Commits (1)
8e4bce3fix(launcher): skip the storage writer lease when snapshotting data for an update📊 Changes
3 files changed (+55 additions, -6 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
scripts/protect-launcher-data.mjs(+23 -6)📝
scripts/regressions/launcher/update.regression.mjs(+31 -0)📄 Description
Linked issue
Closes #6046
Why this change
On Termux, the launcher's startup auto-update failed before it even reached git:
snapshotLauncherData(scripts/protect-launcher-data.mjs) copies the whole data directory withfs.cpbefore an update so the data can be restored if the update goes wrong. Since #5389 the storage writer lease keeps a Unix socket atdata/storage/.writer-lease/live.sockfor liveness checks. When the previous server is still running, or ended without releasing its lease (the reporter's diagnostics show 10 sessions that ended without a shutdown), that socket is still on disk when the launcher starts,fs.cprejects it withEINVAL, the snapshot throws, and the launcher skips the update on every launch. The.incomplete-update-*directory named in the error is removed by the snapshot's own cleanup, which is why the reporter could not find it.What changed
scripts/protect-launcher-data.mjs: the snapshot copy filter now excludesdata/storage/.writer-lease(per-process runtime state, not user data) and, as a general backstop, any socket or FIFO under the data directory. Everything else the snapshot copied before is unchanged, andrestoreLauncherDataIfMissingis unaffected because the backup no longer contains those entries.scripts/regressions/launcher/update.regression.mjs: the snapshot case now plants a writer-lease directory with anowner.jsonand, on non-Windows hosts, a real listening Unix socket atlive.sock, and asserts the snapshot succeeds, omits the lease directory, and still preserves a sharded storage table next to it. Fails on the previous code with the exactEINVALfrom the report on Linux, and on the lease-directory assertion everywhere.CHANGELOG.md: Unreleased entry.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
node scripts/regressions/launcher/update.regression.mjspasses with the fix and fails against the previousprotect-launcher-data.mjson the new lease-directory assertion (pnpm regression:launcher-updateis the CI lane that runs it).start.sh/start-termux.shcall the script); the Docker image never runs it, so there is nothing to observe on a container deploy.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Not applicable (launcher script).
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.