What does Zero-Courier Dispatch conclude, in numbers, about “Automatic Recovery after Failure: Idempotency Keys, Exponential Backoff with Jitter, Retry Budgets and Circuit Breakers”?

Answer: Chapter 5 shows blind retries causing 532 duplicates in ten thousand operations, and retries every second sending 147,693 calls during a thirty-second outage; none of the four guard rails can be dropped.

Scope of the numbers: Its parameters are illustrative and all calculations are generated by its programs. It names no server, account, key or deployment command, and it is general business analysis, not personalised advice.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 532

policyonceduplicatedlostextra_rowsattempts
never9,8070193010,000
blind9,468532055010,756
keyed10,00000010,756
chance an attempt runs but its reply is lost 0.049
expected duplicated ops, blind, first retry 480.2
Show the full program
# Chapter 5. p51: duplicate side effects with and without idempotency.
# Model (illustrative): 10,000 operations that each append one row to a
# shared ledger. An attempt is lost on the way in with chance 0.02; a
# delivered attempt runs the append; its reply is lost with chance
# 0.05; the caller then times out and retries, up to 3 retries. Three
# policies: never retry; retry blindly; retry with an idempotency key
# that the store remembers, so a repeated key returns the first reply.
import random

N = 10000


def run(policy):
    rng = random.Random(40751)
    once = dup = lost = extra = attempts = 0
    for _ in range(N):
        effects, seen_key = 0, False
        for attempt in range(4):
            attempts += 1
            if rng.random() < 0.02:
                ok = False
            else:
                if policy == "keyed" and seen_key:
                    pass
                else:
                    effects += 1
                    seen_key = True
                ok = rng.random() >= 0.05
            if ok or policy == "never":
                break
        once += effects == 1
        dup += effects > 1
        lost += effects == 0
        extra += max(0, effects - 1)
    return once, dup, lost, extra, attempts


if __name__ == "__main__":
    print("policy        once   duplicated  lost  extra_rows  attempts")
    for name in ("never", "blind", "keyed"):
        once, dup, lost, extra, att = run(name)
        print("{:<12} {:>6,} {:>11,} {:>5} {:>11} {:>9,}".format(
            name, once, dup, lost, extra, att))
    p = 0.98 * 0.05
    print("chance an attempt runs but its reply is lost {:.3f}".format(p))
    print("expected duplicated ops, blind, first retry {:.1f}".format(
        N * p * 0.98))

Single source and citation

Fan, Y. (2026). Commander Intent Compilation, Automated DAG Task Decomposition and Zero-Courier Multi-Agent Dispatch (Version 1.0.0), Chapter 5: Automatic Recovery after Failure: Idempotency Keys, Exponential Backoff with Jitter, Retry Budgets and Circuit Breakers. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-407 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026407,
  author    = {Fan, Yafu},
  title     = {Commander Intent Compilation, Automated DAG Task Decomposition and Zero-Courier Multi-Agent Dispatch},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book