Currently if the command completes successfully but does not actually touch the output files then this is not detected. However in many cases this could indicate an error -- either that the wrong files are being checked or that the command is doing the wrong thing.
One option might be to delete the files however that seems undesirable, at least as a default. A better option might be to stat the files and ensure that their modification times have increased. That is likely to handle most cases. Letting users opt out of that check also seems useful -- for cases where the underlying command has its own idempotency checks.
Currently if the command completes successfully but does not actually touch the output files then this is not detected. However in many cases this could indicate an error -- either that the wrong files are being checked or that the command is doing the wrong thing.
One option might be to delete the files however that seems undesirable, at least as a default. A better option might be to
statthe files and ensure that their modification times have increased. That is likely to handle most cases. Letting users opt out of that check also seems useful -- for cases where the underlying command has its own idempotency checks.