FA-29691 / HTTP retries / Open access
Retry after consumer-visible response delivery: A retry transport failure inherits the preceding response status · case 01
A retry transport failure inherits the preceding response status
ROOT CAUSE
A retry transport failure inherits the preceding response status
VERIFIED REPAIR
Restore the specified transition status=None elif.
Unsuccessful approach: The attempted repair changes the faulty site to status=status elif but still violates a regression oracle.
Case contract
begin starts an attempt only while nonterminal, headers records a status, deliver(bytes) records irreversible delivery, fail allows retry only before any delivered bytes. A zero-byte delivery is reversible. finish terminally succeeds. cancel terminally cancels. New attempts reset their local status but never erase already exposed data. Return retry decisions and exposed byte 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):
active=False; delivered=0; status=None; terminal=False; out=[]
for e in events:
if e[0]=='begin':
if terminal: out.append('terminal'); continue
active=True
status=200
elif e[0]=='headers' and active:
status=e[1]
elif e[0]=='deliver' and active:
delivered+=e[1]
elif e[0]=='fail':
if terminal: out.append('terminal'); continue
if not active: out.append('inactive'); continue
active=False
if delivered>0:
terminal=True
out.append(['partial',status])
else: out.append(['retry',status])
elif e[0]=='finish' and active:
terminal=True; active=False; out.append('success')
elif e[0]=='cancel':
terminal=True; active=False; out.append('cancelled')
return [out,delivered]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0])
check('1', solve([('fail',)]), [['inactive'],0])
check('2', solve([('begin',),('headers',503),('deliver',0),('fail',),('fail',),('begin',),('fail',)]), [[['retry',503],'inactive',['retry',None]],0])
check('3', solve([('begin',),('headers',200),('deliver',1),('deliver',0),('fail',),('begin',)]), [[['partial',200],'terminal'],1])
check('4', solve([('begin',),('headers',502),('deliver',N+2),('deliver',2),('fail',)]), [[['partial',502]],N+4])
check('5', solve([('begin',),('finish',),('begin',),('fail',)]), [['success','terminal','terminal'],0])
check('6', solve([('begin',),('cancel',),('begin',)]), [['cancelled','terminal'],0])
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 | [[], 0] | [[], 0] | Passed |
| 1 | [['inactive'], 0] | [['inactive'], 0] | Passed |
| 2 | [[['retry', 503], 'inactive', ['retry', 200]], 0] | [[['retry', 503], 'inactive', ['retry', None]], 0] | Failed |
| 3 | [[['partial', 200], 'terminal'], 1] | [[['partial', 200], 'terminal'], 1] | Passed |
| 4 | [[['partial', 502]], 5] | [[['partial', 502]], 5] | Passed |
| 5 | [['success', 'terminal', 'terminal'], 0] | [['success', 'terminal', 'terminal'], 0] | Passed |
| 6 | [['cancelled', 'terminal'], 0] | [['cancelled', 'terminal'], 0] | Passed |
SHA-256 / 705cd3efbf72eca5226288c0bc11aa0ce15210ad7eca00b3750e5a328565d541
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
active=False; delivered=0; status=None; terminal=False; out=[]
for e in events:
if e[0]=='begin':
if terminal: out.append('terminal'); continue
active=True
status=status
elif e[0]=='headers' and active:
status=e[1]
elif e[0]=='deliver' and active:
delivered+=e[1]
elif e[0]=='fail':
if terminal: out.append('terminal'); continue
if not active: out.append('inactive'); continue
active=False
if delivered>0:
terminal=True
out.append(['partial',status])
else: out.append(['retry',status])
elif e[0]=='finish' and active:
terminal=True; active=False; out.append('success')
elif e[0]=='cancel':
terminal=True; active=False; out.append('cancelled')
return [out,delivered]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0])
check('1', solve([('fail',)]), [['inactive'],0])
check('2', solve([('begin',),('headers',503),('deliver',0),('fail',),('fail',),('begin',),('fail',)]), [[['retry',503],'inactive',['retry',None]],0])
check('3', solve([('begin',),('headers',200),('deliver',1),('deliver',0),('fail',),('begin',)]), [[['partial',200],'terminal'],1])
check('4', solve([('begin',),('headers',502),('deliver',N+2),('deliver',2),('fail',)]), [[['partial',502]],N+4])
check('5', solve([('begin',),('finish',),('begin',),('fail',)]), [['success','terminal','terminal'],0])
check('6', solve([('begin',),('cancel',),('begin',)]), [['cancelled','terminal'],0])
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 | [[], 0] | [[], 0] | Passed |
| 1 | [['inactive'], 0] | [['inactive'], 0] | Passed |
| 2 | [[['retry', 503], 'inactive', ['retry', 503]], 0] | [[['retry', 503], 'inactive', ['retry', None]], 0] | Failed |
| 3 | [[['partial', 200], 'terminal'], 1] | [[['partial', 200], 'terminal'], 1] | Passed |
| 4 | [[['partial', 502]], 5] | [[['partial', 502]], 5] | Passed |
| 5 | [['success', 'terminal', 'terminal'], 0] | [['success', 'terminal', 'terminal'], 0] | Passed |
| 6 | [['cancelled', 'terminal'], 0] | [['cancelled', 'terminal'], 0] | Passed |
SHA-256 / f87bdc6d2de92bddd1869b0d74babc08471feb6ec8612b84d83aac135f5175dc
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
active=False; delivered=0; status=None; terminal=False; out=[]
for e in events:
if e[0]=='begin':
if terminal: out.append('terminal'); continue
active=True
status=None
elif e[0]=='headers' and active:
status=e[1]
elif e[0]=='deliver' and active:
delivered+=e[1]
elif e[0]=='fail':
if terminal: out.append('terminal'); continue
if not active: out.append('inactive'); continue
active=False
if delivered>0:
terminal=True
out.append(['partial',status])
else: out.append(['retry',status])
elif e[0]=='finish' and active:
terminal=True; active=False; out.append('success')
elif e[0]=='cancel':
terminal=True; active=False; out.append('cancelled')
return [out,delivered]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0])
check('1', solve([('fail',)]), [['inactive'],0])
check('2', solve([('begin',),('headers',503),('deliver',0),('fail',),('fail',),('begin',),('fail',)]), [[['retry',503],'inactive',['retry',None]],0])
check('3', solve([('begin',),('headers',200),('deliver',1),('deliver',0),('fail',),('begin',)]), [[['partial',200],'terminal'],1])
check('4', solve([('begin',),('headers',502),('deliver',N+2),('deliver',2),('fail',)]), [[['partial',502]],N+4])
check('5', solve([('begin',),('finish',),('begin',),('fail',)]), [['success','terminal','terminal'],0])
check('6', solve([('begin',),('cancel',),('begin',)]), [['cancelled','terminal'],0])
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 | [[], 0] | [[], 0] | Passed |
| 1 | [['inactive'], 0] | [['inactive'], 0] | Passed |
| 2 | [[['retry', 503], 'inactive', ['retry', None]], 0] | [[['retry', 503], 'inactive', ['retry', None]], 0] | Passed |
| 3 | [[['partial', 200], 'terminal'], 1] | [[['partial', 200], 'terminal'], 1] | Passed |
| 4 | [[['partial', 502]], 5] | [[['partial', 502]], 5] | Passed |
| 5 | [['success', 'terminal', 'terminal'], 0] | [['success', 'terminal', 'terminal'], 0] | Passed |
| 6 | [['cancelled', 'terminal'], 0] | [['cancelled', 'terminal'], 0] | Passed |
SHA-256 / 364ede61dc03da887ab908f371923b3dd15510b1408c40eef135c5261cb33632
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:45.653217+00:00.
Case digest / 681e67022062180016757f0aef7882d7b800b5595f9124ab8507c716f4536262