There's so many cases where a hacky Exec or five becomes necessary. For example, I am not aware of any Puppet module that does disk partitioning + formatting. Our solution was to write a class with a few Execs to do that. But there's so many edge cases where this can go wrong if it's not truly idempotent. An accidental disk wipe across our fleet would be a disaster, so what did we do? We basically wrapped the class in a big if guard that checks if the disk is already partitioned. That's not idempotent at all of course or declarative - it's just a script.
I can think of another horrifying example. We extract archives on to the machine to a specific target directory, and all files in that directory should have a specific owner and group. So we have a File resource that states the target directory exists which is ordered before the Archive resource. But we need to recursively chown after extraction too because tarballs preserve the original owner and group on extraction. We can't add a File resource with the same path that states the owner and group after extraction because duplicate resources aren't allowed. The only solution in this case is a hacky Exec. And that isn't declarative either because you'd have to check the owner/group of all files recursively to know whether it's in the right state or not. We just have this Exec run if the Archive resource refreshes. What if something else adds a file to this directory with the wrong owner/group? It wouldn't be corrected. Again, not declarative.
And god help you if a machine in the fleet runs out of disk space and resources only partially apply. The state will be completely fucked up and you'll have to manually nuke directories to correct it. Because Puppet only pretends to be declarative.
/rant :(