Circuit Breaker
Hard · Reliability
A breaker opens after threshold consecutive failures (false results) and then rejects everything until cooldown successes are *attempted*? Keep it simple: after it opens, the next cooldown calls return "open" without counting as success/fail, then it closes again.
RunBreaker(threshold, cooldown, events) where events are 1 success and 0 failure of the underlying call. Return the list of outcomes: "ok", "err", or "open".
Next: Hottest Line