Skip to content

sync: a deleted save folder is "missing", not "emptied"; one back with fewer files is asked about - #69

Merged
Omar-VF merged 1 commit into
Liquid-co:dev-publicfrom
ChakraFusion:pr/missing-wins
Oct 16, 2026
Merged

Omar-VF merged 1 commit into
Liquid-co:dev-publicfrom
ChakraFusion:pr/missing-wins

Conversation

@ChakraFusion

Copy link
Copy Markdown

As agreed on #66: "missing" wins over "emptied".

Deleting a save folder removes its files first. A watcher that saw them go held the game as emptied and asked; the question stayed after the folder turned out to be missing, and even after it came back.

  • Folder gone: an unanswered emptied hold is dropped once the whole save folder is gone. The game pauses quietly, as a missing folder does. A hold someone answered (put back, or delete there too) stays.
  • Folder back: before it is watched again, it is compared with the files both devices last shared. Back empty, or with fewer of them, it is held and asked about like an emptied folder, never synced as deletions. It is checked before the watch restarts, because the watch's catch-up could otherwise start a sync first.

This also fixes a data-loss case on dev-public: a folder that came back with only some of its files had the rest deleted on the other device.

Tests (each fails without the change):

  • TestMissingFolder_ComingBackEmptyIsHeld: the case you asked for, next to TestMissingFolder_ARestartDoesNotRecreateItEmpty.
  • TestMissingFolder_ComingBackWithFewerFilesIsHeld: without the change, the other device loses slot2.sav.
  • TestMissingFolder_AnEmptiedHoldGivesWayToMissing: the hold is dropped when the folder is gone, and a folder back whole syncs again.

The full unit and e2e suites pass locally, and CI on my fork is green.

🤖 Generated with Claude Code

…h fewer files is asked about

As agreed on Liquid-co#66. Deleting a folder removes its files first; a watcher that
saw them go held the game as emptied and asked, and the question stayed
after the folder turned out to be missing, even after it came back.

- When the whole save folder is gone, an unanswered emptied hold is
  dropped: the game pauses quietly, as a missing folder does. A hold
  someone answered (put back, or delete there too) stays.
- When it is back, before it is watched again, it is compared with the
  files both devices last shared. Back empty, or with fewer of them, it is
  held and asked about like an emptied folder - never synced as deletions.
  Before this, a folder back with only some files had the rest deleted on
  the other device.

Tests: TestMissingFolder_ComingBackEmptyIsHeld,
TestMissingFolder_ComingBackWithFewerFilesIsHeld and
TestMissingFolder_AnEmptiedHoldGivesWayToMissing all fail without this
(the second with the other device losing slot2.sav).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 15, 2026

Copy link
Copy Markdown

@ChakraFusion is attempting to deploy a commit to the sivadaboi's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Omar-VF
Omar-VF merged commit 0994afd into Liquid-co:dev-public Oct 16, 2026
10 of 11 checks passed
ChakraFusion pushed a commit to ChakraFusion/OpenSave that referenced this pull request Oct 16, 2026
Entries for Liquid-co#49, Liquid-co#70, Liquid-co#69, Liquid-co#72, Liquid-co#68 and Liquid-co#47, added at the end of the
Fixed list so they do not touch Liquid-co#75's own entry. Liquid-co#57 is test-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants