Which file types are "ineligible" for iCloud drive?
This is not an answer but here is a partial list of kind of file names that are considered ineligible for iCloud drive.

Warning: this list is purely based on trial and error on macOS 10.12.16. As of now, there does not appear to be an official documentation on this. So this behaviour may change in future.


Filenames with an extension and ending with tilde. (regex: .*\..*~)
Filenames ending with .tmp
Filenames starting with ~$
Filenames starting with .~
Directories named tmp


It seems that iCloud drive tries to identify temporary files by their names and does not upload them into the clouds.