backoffFor method
Backoff before same-entry attempt attempt (1-based): exponential from
baseDelay, capped at maxBackoff, with 75–100% jitter (omp's
Anthropic-style jitter so concurrent sessions do not retry in lockstep).
Implementation
Duration backoffFor(int attempt, double jitterFraction) {
var ms = baseDelay.inMilliseconds * (1 << (attempt - 1).clamp(0, 20));
if (ms > maxBackoff.inMilliseconds) ms = maxBackoff.inMilliseconds;
final jitter = 0.75 + 0.25 * jitterFraction.clamp(0.0, 1.0);
return Duration(milliseconds: (ms * jitter).round());
}