@@ -298,7 +298,7 @@ func (c *Coordinator) executePullSubscribe() error {
298298 default :
299299 }
300300
301- // Wait for new version notification
301+ // PULL (read only) Subscribe: Wait for new version notification
302302 for {
303303 if err := c .waitForVersionAndPull (false ); err != nil {
304304 // Check if this is a cancellation or reconnection failure (both are terminal)
@@ -426,7 +426,7 @@ func (c *Coordinator) executePull(isSubscription bool) error {
426426 // Check database integrity after pull
427427 localClient .CheckIntegrity ()
428428
429- c .config .Version = remoteClient .GetVersion ()
429+ c .config .Version = remoteClient .GetLatestCommitVersion ()
430430 // Save pull result if needed
431431 if remoteClient .GetNewPullKey () != "" && c .authResolver .CheckNeedsDashFile (c .config .LocalPath , remotePath ) {
432432 if err := c .authResolver .SavePullResult (
@@ -554,6 +554,7 @@ func (c *Coordinator) executePush() error {
554554
555555 // Perform the sync
556556 if err := c .performPushSync (localClient , remoteClient ); err != nil {
557+
557558 // Check if this was a version conflict and auto-merge is enabled
558559 if remoteClient .HasVersionConflict () && c .config .AutoMerge {
559560 latestVersion := remoteClient .GetLatestVersion ()
@@ -575,6 +576,8 @@ func (c *Coordinator) executePush() error {
575576 }
576577 }
577578
579+ c .config .Version = remoteClient .GetLatestCommitVersion ()
580+
578581 // Save push result if we got new keys
579582 if remoteClient .GetNewPushKey () != "" {
580583 if err := c .authResolver .SavePushResult (
@@ -813,8 +816,6 @@ func (c *Coordinator) executePushSubscribe() error {
813816 return c .executePullSubscribe ()
814817 }
815818
816- fmt .Println ("ℹ️ Change notifications will be sent to server for analytics" )
817-
818819 // Create file watcher
819820 fileWatcher , err := watcher .NewWatcher (& watcher.Config {
820821 DatabasePath : c .config .LocalPath ,
@@ -1380,7 +1381,6 @@ func (c *Coordinator) waitForVersionAndPull(isBackground bool) error {
13801381 return err
13811382 }
13821383
1383- // Check if we already have this version
13841384 if c .config .Version == version {
13851385 if isBackground {
13861386 c .logger .Debug ("Already at version, skipping pull" , zap .String ("version" , version ))
0 commit comments