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
| policy | once | duplicated | lost | extra_rows | attempts |
|---|---|---|---|---|---|
| never | 9,807 | 0 | 193 | 0 | 10,000 |
| blind | 9,468 | 532 | 0 | 550 | 10,756 |
| keyed | 10,000 | 0 | 0 | 0 | 10,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
- Chapter 1 · Intent Compilation: a Five-Slot Rule Compiler, Asking for Missing Slots and Hierarchical Decomposition
- Chapter 2 · The Directed Acyclic Task Graph: Kahn's Topological Sort, the Critical Path and Monte Carlo Durations
- Chapter 3 · Multi-Agent Claiming: Contract-Net Bidding, Graham's List Scheduling and Timing Anomalies
- Chapter 4 · Resource Locks: a Global Order against Deadlock, Leases for Orphaned Locks and Fencing Tokens
- Chapter 6 · Exception Escalation: Human Interventions, Budget Overrun, Deadline Probability and Little's Law
- Chapter 7 · Eastern and Western Sources Examined: Division into Units in Sunzi's Chapter on Momentum and Smith's Pin Factory
- Chapter 8 · Field Tools and Checker Specifications: the Dispatch Ledger, the Intent Compilation and Task-DAG Dispatch Checker, and a Pre-Registered Test