The bug that was quietly un-earning my users' achievements
Small maker update, not a launch post, just a bug I'm glad I caught.
Shipped the achievement unlock celebration (confetti, glow, chime) a couple of weeks ago. Then noticed a user's streak achievements briefly reverted to locked, then quietly re-unlocked themselves. No errors, just quietly wrong.
Turned out unlockAchievements() was firing from three different places (dashboard, roast endpoint, check-in) with no locking, so overlapping writes clobbered each other. Fixed with compare-and-swap instead of a blind overwrite, verified against the real DB, not a mock.
Also shipped real Web Push in the same stretch: one-tap opt-in, daily nudge written in roast my life's own voice from each user's real data, not a generic "come back!" blast.
Anyone else caught a race condition with zero errors, just "the data's subtly wrong"? Curious how you found it.

Replies