@Erik DeBenedictis: I do prefer to have output in a predictable order just for the reason you cite---so that other tools can run "diff" in a meaningful way. This is also pretty critically useful for "git", since many changes are introduced into a repository if the order of output lines keeps changing all the time. Since a lot of magic's database is done with hash tables, it's the hash enumeration that causes output to be random. To sort the output, I need to check performance impact, but I don't think there is going to be any particular performance issue with sorting devices in the "ext2spice" output. I do need to come up with some consistent metric to sort on, though. Probably something like sorting on the coordinate position of the device.
If you could please do me a favor, create an issue on
https://github.com/RTimothyEdwards/magic so that it is logged in the git issue system and I will be less likely to forget about it, which is easy to do for things that are buried in a Slack conversation somewhere.