Term for when consecutive events are "broken"
"Until the streak is broken"; alternatively (synonymously) run or spell.
Or, you could describe it as a "series of events" (or sequence, which has an embedded notion of "consecutivity"), as in "the series was interrupted by...".
Finally, you could describe the entire thing as "a continuity", though that tends to deemphasize the discrete events.
You mention this relates to software, so some other terms came to my mind:
- pattern: You are describing a behavior that keeps happening, until it doesn't (the pattern is broken).
- repetition (or loop): Doing the same thing over and over again, until you decide to stop (the repetition stops today; the loop ended).
Also in software, I would refer to such a situation as a missed event or skipped event. In this case, the "daily visit" is the event, so you could end your phrase with "until a day is missed", or "until a day is skipped".
It looks like you mean something like until the string is broken. See [Merriam-Webster's definition 5(b)(1):
a series of things arranged in or as if in a line : a string of cars : a string of names
Thus one could have a string of days, and speak of something happening until the string is broken.
I don't really see why you need to say anything. Why not '5 doughnuts to be awarded each consecutive day you visit the shop'. By adding 'until the run is broken' you are effectively saying the same thing over again. You have covered your bases by use of the word 'consecutive'.