The full option bag for Task#retry; pass a RetryDelay directly when the delay is all you need.
delayMs: RetryDelay
Wait between attempts. Omitted or 0 retries immediately, as it always has.
timeoutMs: number
Deadline for each individual attempt. The attempt is abandoned when it fires — its signal goes off so cancellation-aware work stops — and counts as a failure like any other.
when: (error: unknown,attempt: number) => boolean
Which failures are worth another attempt. Returning false rethrows immediately, spending
no further attempts and no delay.
Retrying everything is the wrong default for a KNOWN flake: a genuinely broken call — a
missing binary, a bad profile — gets a pointless second run and the "we only tolerate this
one upstream bug" documentation disappears from the code. This is tokio-retry's retry_if
condition. (backoff reaches the same place from the other side, by making the error type
say Transient or Permanent; a predicate is the lighter fit here, because the declared-
vs-bug axis is already what this library's error types encode.)