Add support for validation jobs to sync.ts, and refactor
#3541
+829
−606
sync.ts, and refactor
#3541