fix(alarms): spend a skip only after its fire grace
The resolver now keeps a skip armed until its occurrence is out of the fire grace too, so a reschedule in those two minutes cannot spend it early and let a fire already in flight ring the dismissed alarm; onFire refuses that fire by the armed watermark. The notifier also cancels notices it posted itself, which the platform may not list as active yet. Fixes #16
This commit is contained in:
1 parent
b4af164826
commit
a88e696d52
5 files changed
+63
-10
No files matched your search
@@ -250,10 +250,12 @@ so the skip eats a second alarm. With the watermark:
|
||||
one after;
|
||||
- watermark still in the future ⇒ fire the first candidate after it; write
|
||||
nothing;
|
||||
- watermark at or before now ⇒ consumed: clear the flag and the watermark,
|
||||
record the skipped occurrence as the handled one, and *still* return the
|
||||
first candidate after it, so the skipped occurrence cannot ring on its way
|
||||
out through the grace window, on this pass or the next (#16).
|
||||
- watermark and its fire grace both behind now ⇒ consumed: clear the flag and
|
||||
the watermark, record the skipped occurrence as the handled one, and *still*
|
||||
return the first candidate after it, so the skipped occurrence cannot ring on
|
||||
this pass or the next. Not spent during the grace itself (#16): a late fire
|
||||
for the skipped occurrence can still be accepted until then, and `onFire`
|
||||
refuses it by the armed watermark.
|
||||
|
||||
Arming is deferred while a snooze is pending, and a **non-repeating** alarm with
|
||||
the flag set is *disabled* rather than skipped: a one-shot has exactly one
|
||||
|
||||
Reference in new issue
Block a user