FA-29911 / HTTP retries / Open access
Retry budget reservation lifecycle: Commit remove violates retry transition semantics · case 01
Commit remove violates retry transition semantics
ROOT CAUSE
Commit remove violates retry transition semantics
THE FAILURE
Commit remove violates retry transition semantics
Unsuccessful approach: The attempted repair changes the faulty site to held.clear() elif 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('reserved')
elif e[0]=='commit':
if e[1] in held:
held.discard("global")
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 0 | [['reserved', 'reserved'], 2, ['b']] | [['reserved', 'reserved'], 2, ['b']] | Passed |
| 1 | [['reserved', 'held', 'held'], 2, ['a']] | [['reserved', 'reserved', 'reserved'], 2, []] | Failed |
| 2 | [[], 0, []] | [[], 0, []] | Passed |
| 3 | [['denied'], 0, []] | [['denied'], 0, []] | Passed |
| 4 | [['reserved', 'held', 'reserved', 'denied'], 0, ['a', 'b']] | [['reserved', 'held', 'reserved', 'denied'], 0, ['a', 'b']] | Passed |
| 5 | [['reserved', 'reserved'], 3, []] | [['reserved', 'reserved'], 2, []] | Failed |
| 6 | [['reserved'], 3, ['a']] | [['reserved'], 3, ['a']] | Passed |
| 7 | [['reserved', 'reserved'], 2, ['a', 'b']] | [['reserved', 'reserved'], 3, []] | Failed |
| 8 | [['reserved', 'reserved'], 1, ['a']] | [['reserved', 'reserved'], 1, ['a']] | Passed |
SHA-256 / 1c100f3aae6440de60698874106c65bf9091c2f2dd3defd54491e003aaf57a27
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('reserved')
elif e[0]=='commit':
if e[1] in held:
held.clear()
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 0 | [['reserved', 'reserved'], 2, ['b']] | [['reserved', 'reserved'], 2, ['b']] | Passed |
| 1 | [['reserved', 'reserved', 'reserved'], 2, []] | [['reserved', 'reserved', 'reserved'], 2, []] | Passed |
| 2 | [[], 0, []] | [[], 0, []] | Passed |
| 3 | [['denied'], 0, []] | [['denied'], 0, []] | Passed |
| 4 | [['reserved', 'held', 'reserved', 'denied'], 0, ['a', 'b']] | [['reserved', 'held', 'reserved', 'denied'], 0, ['a', 'b']] | Passed |
| 5 | [['reserved', 'reserved'], 1, []] | [['reserved', 'reserved'], 2, []] | Failed |
| 6 | [['reserved'], 3, ['a']] | [['reserved'], 3, ['a']] | Passed |
| 7 | [['reserved', 'reserved'], 3, []] | [['reserved', 'reserved'], 3, []] | Passed |
| 8 | [['reserved', 'reserved'], 1, ['a']] | [['reserved', 'reserved'], 1, ['a']] | Passed |
SHA-256 / f6df0a8a792abd2e77182d63a100b0e28c9d5bf4d21296c3be7334bf5b228af0
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 / 01e81c9fd3470b34ab52ce93248678c99bf668753e6a85bee67e1ec171dc4e5d