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
Any folder or file named dropbox
or Dropbox
or OneDrive
.
It seems that iCloud drive tries to identify temporary files by their names and does not upload them into the clouds.
10/31/2021 Verified dropbox and onedrive were marked ineligible. Changed them to dbx and odr and they backed up. Now I'm switched to Apple ecosystem.