Files
65fb4737a0 Always reprocess from last action time in schedule workflow (#6028)
## What changed?
In the schedule workflow, we should always reprocess from the last
action in order to handle getting woken up by a signal in between the
nominal time and actual time. This is basically what #5381 should have
been in the first place, and applies that logic to all iterations.

Note that this adds the logic but doesn't activate it yet.

## Why?
Fixes bug: signals (including refresh) in between nominal and actual
time could lead to dropped actions. This only happens if the cache runs
out or we do a CaN at just the right time, so it's not that easy to
reproduce.

This has also blocked activating #5799 since that makes this bug more
likely.

## How did you test it?
Added new unit test and replay test.
Reproduced locally by disabling cache and sending frequent signals to
try to disrupt a schedule. Verified that new version did not drop
actions.

## Potential risks
This changes workflow logic, but is pretty easy to see that the old
control flow is unaffected.

There's one more potential situation which isn't always handled
correctly: unpause in between nominal and actual times will usually run
the jittered action (this is probably the less surprising behavior), but
rarely, if a CaN happens at the same time, it can get skipped because
the cache will be regenerated.

---------

Co-authored-by: Rodrigo Zhou <[email protected]>
2024-05-31 12:32:49 -07:00
..