Skip to content

fix(up): never leave Windows without 8sync.exe - #103

Merged
8syncdev merged 1 commit into
mainfrom
fix/selfup-safe-replace
Oct 18, 2026
Merged

8syncdev merged 1 commit into
mainfrom
fix/selfup-safe-replace

Conversation

@8syncdev

Copy link
Copy Markdown
Contributor

Seen live 2026-10-18: 8sync.exe gone; only .8sync.old.51892 (0.100.9) and .8sync.new.50188 (a day old) left. The fail-closed guard hook then blocked every Claude Code session until the owner copied the backup back. Likely cause (not fully proven): rooms on older images auto-update concurrently on the same file.

  • Update lock in the install dir (.8sync.update.lock, create_new; >10 min = stale, taken over).
  • Skip the swap when 8sync.exe already has the release's sha256.
  • swap_in: tmp → dst failure → rename old back, else copy it back (never an empty slot); injected rename/copy so the failure paths are tested on every OS.
  • heal_missing: dst missing → copy the newest .8sync.old.* into place; the sweep never runs while dst is missing; .8sync.new.* older than a day is swept.

Tests: selfup 13 passed (new: failed swap restores by rename and by copy, heal from newest backup + sweep only when present, lock refusal/release); cargo verbs:: 537 passed. Gates: /sec OK, /rules ALLOWED, /aup-audit PASS, ccc risk --release medium.

🤖 Generated with Claude Code

One update at a time (lock), skip when the release is already in place, restore
the old binary by rename or copy when the swap fails, heal a missing binary from
the newest moved-aside copy, and never sweep those copies while it is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@8syncdev
8syncdev merged commit e08d738 into main Oct 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant