Every fix gets a test
When you fix a bug, write the smallest test that was red before the fix and green after. Keep it. It is now a guard: any future edit that reintroduces that bug turns it red. This is what turns a one-time fix into a permanent one.