Locks explode behavior ahead of optimization: per-arm goldens, length/closed invariants, plan ordering, and legacy-vs-batch differential.