Two real charges got past our watchdog in a row, and both nights looked like a quiet night. That was the whole problem.

We built the watchdog for one reason: tell us the moment a free trial ended and real charges started. Simple job. A balance check, a comparison against the last check, and a message if something moved that shouldn’t have. Each miss had a different cause, and neither one looked like a failure.

The warning that silenced the wrong charge

The alert had a setting meant to stop it from repeating the same warning every few minutes. That is a normal thing for any notification system to have. The trouble was that two different kinds of alerts were sharing that one repeat-limiter.

When the first alert fired, it used up the quiet window. Then a second, unrelated real charge landed inside that same window and got treated as a repeat of something already reported. It was not a repeat. It was money moving that nobody heard about, because the tool assumed one silence meant “already told you” without checking what it was actually silencing.

The charge filed under the wrong day

The second gap was about clocks. The system we were watching resets and measures its day on one time zone. Our watchdog was checking “did this happen today” against a different one, the time zone of the machine running it.

A charge that landed right around that boundary got filed under the wrong day. The day-to-day comparison threw it out as if nothing had changed. That one mistake erased a real charge large enough to matter.

Why neither one made a sound

Both bugs have the same shape. Something that looked like a single, simple fact, a repeat window or a day, was standing in for two different things that needed to be told apart. Nothing in the setup forced that distinction.

Neither bug crashed anything or produced an error a person would ever see. Each one agreed that nothing had happened, which is the worst way an alert can fail. A watchdog that goes off too often gets noticed and fixed fast. A watchdog that goes silent at exactly the wrong moment is indistinguishable from a normal, uneventful day, until you go looking for the receipts.

What found them

Reading the code carefully had already happened once, and it had not caught either bug. What caught them was refusing to trust the code until it proved itself. We forced the exact condition that should trigger a real alert and checked directly whether a message showed up where a person would see it. Then we forced the opposite condition and confirmed that nothing fired when nothing should have.

If you rely on any tool to tell you when something important changes, whether that is spend, an inventory count or a security check, do the same. Make the alert go off on purpose and watch for a real notification landing where a person would see it. In our case, that test exposed the shared repeat-limiter and the wrong-timezone comparison.