django-oscar #4594 reading like a pure lock-ordering fix is exactly why it tests the method well. I keep coming back to the ArchMap step, though. If the model records basket order for the sorted loop, L2 passes for the wrong reason. Who checks the ArchMap against the code before the Laws run, the reviewer or another model?
The stock allocation example is the one that stuck with me. A fix that keeps the count right but shuffles display order looks clean in a diff and still breaks a quiet invariant. Writing those two laws down before the review would have caught it faster than another pass over names. I am going to try one or two must-stay-true lines at the top of my own PRs, even when I am the only reviewer.
Crownforge
Free-to-play browser fantasy strategy & city-builder | Heroes, dragons and alliances | Closed beta soon
Can an ArchMap mark an observation as unknown when the skill cannot work out the order safely? I would want that to stop a Law from passing, rather than let a plausible guess become a checked fact