Skip to main content

compute_backoff

Function compute_backoff 

Source
pub fn compute_backoff(
    count: u64,
    base: i64,
    max: i64,
    allow_extended: bool,
) -> i64
Expand description

Compute exponential backoff duration using base-3 growth.

Returns min(base * 3^(count-1), max) for count >= 1. For count == 0 or 1 (first failure), returns base.

countbase=300sresult
0300300
1300300
2300900
33002700
43008100
5-61440014400 (max, not yet extended)
7-98640086400 (24h extended tier)
10+172800172800 (48h extended tier)

The extended tier applies when the model has hit the max cap multiple times, indicating a persistently broken model that won’t self-resolve quickly.