A dry run is a promise. Can the OS enforce it?
A --dry-run flag is a promise: run this command, and it will tell you what it would do without actually doing it. The implementation is often a boolean. That boolean has no authority over the filesystem, the network, or the helper function someone added last Tuesday. Every part of the program has to remember to cooperate. I’ve been working on runtime safety features in Rye, a scripting language. One question keeps pulling these features together: Can a dry run depend less on my remembering to implement the dry run? Linux can enforce some useful boundaries here. But getting the boundaries right exposes a distinction: preventing a script from changing things is not the same as showing what a successful execution would do. ...