Repository navigation
sync: a lost report no longer brings back a file deleted right after - #65
Merged
Omar-VF merged 1 commit intoOct 15, 2026
Merged
Conversation
|
@claude is attempting to deploy a commit to the sivadaboi's projects Team on Vercel. A member of the Team first needs to authorize it. |
When a sync-complete report is lost, the push-proof repair banks the pushed state as the shared base, but the record of which files both devices hold stayed as it was. A file handed over in that push was missing from it, so if it was deleted before the watcher noted the deletion, the next sync read it as a file the peer had and this device never did, and fetched it back. The repair now records the pushed state's files as shared too, as extra locations already do. Not while the game is held as emptied: that record is then kept on purpose. "Put them back" with no snapshot takes the files out of it so the next sync fetches them from the peer; written back by the repair, they read as deleted here and the deletions went to the peer, and both devices lost the save (TestEmptiedFolder_PutBackWithoutASnapshotFetchesThem on Linux CI, every run together with the emptied-hold fix). Seen on Windows CI as TestWatchAutoSyncChain's "deletion never auto-synced to B"; TestDeletion_SurvivesALostReport reproduces it deterministically, and TestEmptiedFolder_PutBackSurvivesALostReport the put-back case (fails 3/3 without the hold check). Co-Authored-By: Claude Opus 5.5 <[email protected]>
ChakraFusion
force-pushed
the
pr/lost-report-deletion
branch
from
October 15, 2026 12:40
a991990 to
dd3cdba
Compare
Author
|
Rebased onto today's |
Omar-VF
added a commit
that referenced
this pull request
Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ChakraFusion
added a commit
to ChakraFusion/OpenSave
that referenced
this pull request
Oct 15, 2026
When a peer is found holding a state this device served it (served.go), the base is banked as agreed, but the record of which files both hold was left as it was, as the push proof did before Liquid-co#65. A file the peer took from what was served and this device deleted before its watcher noted it then read as one the peer had and this device never did, and was fetched back. The served proof now records the served state's files as shared too, except while the game is held as emptied (as in Liquid-co#65). (Asked for on Liquid-co#66.) This needs the previous commit: with served records surviving an untrack, the repair banked a re-tracked game's files as shared and deleted the peer's copies (TestUntrack_LateLineageWriteMustNotSurviveIntoARetrack and TestUntrackThenRetrack_DoesNotInheritStaleLineage fail 3/3 without it). Test: TestDeletion_SurvivesALostReportWhenServed (fails 3/3 without this: the deleted file comes back on both devices). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A real bug, found as
TestWatchAutoSyncChainfailing on Windows ("deletion never auto-synced to B", 5 in 563 runs).Cause: when a sync-complete report is lost, the push-proof repair in
SyncWithPeerbanks the pushed state as the shared base, but leaves the record of which files both devices hold unchanged. A file handed over in that push was missing from it. If the file was deleted before the watcher noted the deletion, the next sync read it as "the peer has it and we never did" and fetched it back.Fix: the repair also records the pushed state's files as shared (
persistLineage(remote, remote)) before banking the base, as extra locations already do (#49). It doesn't do so while the game is held as emptied: "put them back" with no snapshot takes the files out of that record so they're fetched from the peer, and writing them back made both devices lose the save. An earlier version of this fix did exactly that, andTestEmptiedFolder_PutBackWithoutASnapshotFetchesThemcaught it on Linux CI. #49 had the same flaw for extra locations and got the same fix.Tests:
TestDeletion_SurvivesALostReportsets up exactly the state a lost report leaves. It fails every time without the fix (the deleted file comes back) and passes with it. On Windows,TestWatchAutoSyncChainthen passed 760 of 760 runs.TestEmptiedFolder_PutBackSurvivesALostReportcovers the put-back case. It fails 3/3 without the hold check (both devices empty).This and #62 both add a test at the end of
e2e/emptied_folder_test.go. Whichever is merged second has a trivial conflict there: keep both tests.CI on my fork: one Windows job failed in
TestMultiRootScenario_DeletionInAnExtraLocationPropagates, the extra-location deletion flake #49 fixes (#49 isn't in this branch). The emptied-folder tests passed 30/30 on Linux, alone and combined with #62.🤖 Generated with Claude Code