Puppet evaluates the class body in order, left-to-right, top-to-bottom, so I think your hypothesis is mistaken. Moreover, your error message does not seem to agree with your hypothesis: it is about a
local file on the node, whereas the only variable in your class controls which 'source' file to use on the master. (The same principle is in operation even if you're running in masterless mode.)
It looks like Puppet wants to update your
sendmail.cf. In standard fashion, it tries to create the new version as a temp file first, which (if all goes well) it will later move to replace the original file. It is unable to create the temp file, however, or else something prevents access to it or removes it again immediately after it is created. Perhaps your disk is full, but more likely some form of access control is getting in Puppet's way.
John