ExponentialBackoff
Full-jitter exponential backoff. Stateless: delay is a pure function of the 0-based attempt, so the caller keeps the attempt counter (it resets naturally each retry episode). Randomness is an injected dependency — pass a seeded Random in tests for determinism.
The delay for an attempt is uniform in [0, min(cap, base · factor^attempt)) ("full jitter") — decorrelating many simultaneous retriers so a shared-transport blip that flaps N edges at once does not produce a synchronized reconnect storm.