A retry plan can be modeled as deterministic data before it drives real scheduling.

Retry Plan Case

retry.ts
type RetryPlan = {
    attempts: number[];
    finalDelay: number;
};

function buildRetryPlan(maxRetries: number): RetryPlan {
    const attempts: number[] = [];

    for (let retry = 1; retry <= maxRetries; retry += 1) {
        attempts.push(retry * 100);
    }

    const finalDelay: number = attempts.length === 0 ? 0 : attempts[attempts.length - 1];
    return { attempts, finalDelay };
}

const maxRetries: number = ;
const plan: RetryPlan = buildRetryPlan(maxRetries);

console.log(`attempts=${plan.attempts.join(",")};final=${plan.finalDelay}`);
type RetryPlan = {
    attempts: number[];
    finalDelay: number;
};

function buildRetryPlan(maxRetries: number): RetryPlan {
    const attempts: number[] = [];

    for (let retry = 1; retry <= maxRetries; retry += 1) {
        attempts.push(retry * 100);
    }

    const finalDelay: number = attempts.length === 0 ? 0 : attempts[attempts.length - 1];
    return { attempts, finalDelay };
}

const maxRetries: number = ;
const plan: RetryPlan = buildRetryPlan(maxRetries);

console.log(`attempts=${plan.attempts.join(",")};final=${plan.finalDelay}`);
retry plan Model retry timing as plain data first so tracing can inspect the resulting plan.