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