FAILURE MAP
← Case archive

FA-29906 / HTTP retries / Open access

Retry budget reservation lifecycle: Reserve result violates retry transition semantics · case 01

Reserve result violates retry transition semantics

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Reserve result violates retry transition semantics

THE FAILURE

Reserve result violates retry transition semantics

Unsuccessful approach: The attempted repair changes the faulty site to out.append('denied') but still violates a regression oracle.

Case contract

configure(capacity) resets a shared retry pool. reserve(request) consumes one token only for a new reservation; commit spends its token and removes the reservation, abort refunds exactly once, refill is capped. Repeated reserve is idempotent; unknown commit/abort does nothing. Return admissions and available token count.

Why this case matters

Offline deterministic model of HTTP request retries.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    capacity=0; available=0; held=set(); out=[]
    for e in events:
        if e[0]=='configure':
            capacity=e[1]; available=capacity; held.clear()
        elif e[0]=='reserve':
            if e[1] in held: out.append('held'); continue
            if available==0: out.append('denied'); continue
            available-=1
            held.add(e[1])
            out.append('held')
        elif e[0]=='commit':
            if e[1] in held:
                held.remove(e[1])
        elif e[0]=='abort':
            if e[1] in held:
                held.remove(e[1])
                available=min(capacity,available+1)
        elif e[0]=='refill':
            available=min(capacity-len(held),available+e[1])
    return [out,available,sorted(held)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([('configure',3),('reserve','a'),('reserve','b'),('abort','a')]), [['reserved','reserved'],2,['b']])
check('1', solve([('configure',3),('reserve','a'),('commit','a'),('reserve','a'),('commit','a'),('reserve','a'),('commit','a'),('refill',2)]), [['reserved','reserved','reserved'],2,[]])
check('2', solve([]), [[],0,[]])
check('3', solve([('configure',0),('reserve','a')]), [['denied'],0,[]])
check('4', solve([('configure',2),('reserve','a'),('reserve','a'),('reserve','b'),('reserve','c')]), [['reserved','held','reserved','denied'],0,['a','b']])
check('5', solve([('configure',3),('reserve','a'),('reserve','b'),('commit','a'),('abort','a'),('abort','b'),('abort','b')]), [['reserved','reserved'],2,[]])
check('6', solve([('configure',N+3),('reserve','a'),('refill',N+10)]), [['reserved'],N+2,['a']])
check('7', solve([('configure',4),('reserve','a'),('commit','a'),('reserve','b'),('commit','b'),('refill',1)]), [['reserved','reserved'],3,[]])
check('8', solve([('configure',1),('reserve','a'),('configure',2),('reserve','a')]), [['reserved','reserved'],1,['a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
0[['held', 'held'], 2, ['b']][['reserved', 'reserved'], 2, ['b']]Failed
1[['held', 'held', 'held'], 2, []][['reserved', 'reserved', 'reserved'], 2, []]Failed
2[[], 0, []][[], 0, []]Passed
3[['denied'], 0, []][['denied'], 0, []]Passed
4[['held', 'held', 'held', 'denied'], 0, ['a', 'b']][['reserved', 'held', 'reserved', 'denied'], 0, ['a', 'b']]Failed
5[['held', 'held'], 2, []][['reserved', 'reserved'], 2, []]Failed
6[['held'], 3, ['a']][['reserved'], 3, ['a']]Failed
7[['held', 'held'], 3, []][['reserved', 'reserved'], 3, []]Failed
8[['held', 'held'], 1, ['a']][['reserved', 'reserved'], 1, ['a']]Failed

SHA-256 / 276b3b053b6d514f4895fa079a524fe0d7bae30996bd5befe4cc6806f98c42b8

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    capacity=0; available=0; held=set(); out=[]
    for e in events:
        if e[0]=='configure':
            capacity=e[1]; available=capacity; held.clear()
        elif e[0]=='reserve':
            if e[1] in held: out.append('held'); continue
            if available==0: out.append('denied'); continue
            available-=1
            held.add(e[1])
            out.append('denied')
        elif e[0]=='commit':
            if e[1] in held:
                held.remove(e[1])
        elif e[0]=='abort':
            if e[1] in held:
                held.remove(e[1])
                available=min(capacity,available+1)
        elif e[0]=='refill':
            available=min(capacity-len(held),available+e[1])
    return [out,available,sorted(held)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([('configure',3),('reserve','a'),('reserve','b'),('abort','a')]), [['reserved','reserved'],2,['b']])
check('1', solve([('configure',3),('reserve','a'),('commit','a'),('reserve','a'),('commit','a'),('reserve','a'),('commit','a'),('refill',2)]), [['reserved','reserved','reserved'],2,[]])
check('2', solve([]), [[],0,[]])
check('3', solve([('configure',0),('reserve','a')]), [['denied'],0,[]])
check('4', solve([('configure',2),('reserve','a'),('reserve','a'),('reserve','b'),('reserve','c')]), [['reserved','held','reserved','denied'],0,['a','b']])
check('5', solve([('configure',3),('reserve','a'),('reserve','b'),('commit','a'),('abort','a'),('abort','b'),('abort','b')]), [['reserved','reserved'],2,[]])
check('6', solve([('configure',N+3),('reserve','a'),('refill',N+10)]), [['reserved'],N+2,['a']])
check('7', solve([('configure',4),('reserve','a'),('commit','a'),('reserve','b'),('commit','b'),('refill',1)]), [['reserved','reserved'],3,[]])
check('8', solve([('configure',1),('reserve','a'),('configure',2),('reserve','a')]), [['reserved','reserved'],1,['a']])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
0[['denied', 'denied'], 2, ['b']][['reserved', 'reserved'], 2, ['b']]Failed
1[['denied', 'denied', 'denied'], 2, []][['reserved', 'reserved', 'reserved'], 2, []]Failed
2[[], 0, []][[], 0, []]Passed
3[['denied'], 0, []][['denied'], 0, []]Passed
4[['denied', 'held', 'denied', 'denied'], 0, ['a', 'b']][['reserved', 'held', 'reserved', 'denied'], 0, ['a', 'b']]Failed
5[['denied', 'denied'], 2, []][['reserved', 'reserved'], 2, []]Failed
6[['denied'], 3, ['a']][['reserved'], 3, ['a']]Failed
7[['denied', 'denied'], 3, []][['reserved', 'reserved'], 3, []]Failed
8[['denied', 'denied'], 1, ['a']][['reserved', 'reserved'], 1, ['a']]Failed

SHA-256 / b65be4797a357e17d75f75fa8e2e9bf8a7b0570442be67569a5d57fbf14b60f5

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Stipulated bounded simulator, not a complete HTTP implementation or a standards conformance claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:41:48.185976+00:00.

Case digest / 1842e0ab210790eae421ab417c1dbbe2acdf3ef60970db5231c35e423be6639b