From 2d2813ec2b35eb6148869dceff171ad83f542056 Mon Sep 17 00:00:00 2001 From: sudacode Date: Thu, 9 Jul 2026 18:32:46 -0700 Subject: [PATCH] docs(launcher): design stale sync socket guard --- ...26-07-09-sync-stale-socket-guard-design.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/plans/2026-07-09-sync-stale-socket-guard-design.md diff --git a/docs/plans/2026-07-09-sync-stale-socket-guard-design.md b/docs/plans/2026-07-09-sync-stale-socket-guard-design.md new file mode 100644 index 00000000..c5767020 --- /dev/null +++ b/docs/plans/2026-07-09-sync-stale-socket-guard-design.md @@ -0,0 +1,26 @@ +# Sync Stale Socket Guard Design + +## Problem + +The sync quiescence guard treats any configured mpv socket path as a running +session when the filesystem entry exists. Unix socket files can remain after +mpv exits, so a stale `/tmp/subminer-socket` blocks the remote merge even when +nothing is listening. + +## Design + +Reuse the launcher's existing Unix socket connection check. The sync guard will +block only when it can connect to the configured socket. Missing, stale, or +otherwise unreachable socket paths will not block sync, and sync will not +delete them. + +Because socket connection checks are asynchronous, the sync dispatch, merge +mode, host mode, and quiescence checks will become async. The already-async +launcher entrypoint will await sync dispatch. Snapshot, transfer, merge, +cleanup, and error behavior otherwise remain unchanged. + +## Validation + +Add focused tests proving a stale socket is ignored and a live socket remains a +hard failure. Re-run sync command and socket tests, type checking, launcher +tests, docs checks, and the SubMiner launcher/docs verification lanes.