Repository navigation
watcher: a watch stopped during its snapshot starts no sync - #58
Merged
Omar-VF merged 1 commit intoOct 15, 2026
Merged
Conversation
A snapshot can take longer than stopping waits for its watch (watchStopTimeout, 5 s). The watch was given up, but its handleChange ran on, finished the snapshot and called OnChanged, which syncs the game - a game whose auto-sync had just been switched off. Seen in the logs Liquid-co#57 printed for TestMultiRootScenario_ALateReportDoes NotHideADivergence on Windows CI: "the watcher for loclatereport did not stop within 5s and was abandoned", then "auto-snapshot created" and a sync with the other device, whose "in sync" report gave it a fresh last-synced time just before the test's edits. - handleChange keeps the snapshot, which is the save as it changed, but announces nothing once its watch was stopped. - The daemon's OnChanged starts no sync for a game whose auto-sync is off, which also covers the catch-up, run outside any one watch. Test: TestAWatchStoppedDuringItsSnapshotAnnouncesNothing holds a snapshot mid-way and stops the watch (fails without the change: the change is announced after the stop). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@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. |
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.
Found from the logs #57 printed for the
TestMultiRootScenario_ALateReportDoesNotHideADivergencefailure on Windows CI. Device B's log there: "the watcher for loclatereport did not stop within 5s and was abandoned", then "auto-snapshot created", then a sync with A, after the test had switched auto-sync off.Cause: a snapshot can take longer than stopping waits for the watch (
watchStopTimeout, 5 s). The watch was given up, but itshandleChangeran on, finished the snapshot, and calledOnChanged, which starts a sync. A game whose auto-sync had just been switched off was synced anyway; in the test, that sync's "in sync" report gave A a fresh last-synced time right before both devices edited.Fix:
handleChangekeeps the snapshot (it is the save as it changed) but doesn't callOnChangedonce its watch was stopped.OnChangeddoesn't start a sync for a game whose auto-sync is off. That also covers the catch-up check, which runs outside any one watch.Test:
TestAWatchStoppedDuringItsSnapshotAnnouncesNothingstops a watch while its snapshot is held mid-way. It fails without the change (the change is announced after the stop).🤖 Generated with Claude Code