repo: refactor startup sync loop