FA-29426 / HTTP retries / Open access
One-shot request body replay refusal: Repeated retry commands create attempts without another failure · case 01
Repeated retry commands create attempts without another failure
ROOT CAUSE
Repeated retry commands create attempts without another failure
VERIFIED REPAIR
Require a new failure before each retry admission.
Unsuccessful approach: The attempted repair changes the faulty site to elif not failed and consumed != 0: but still violates a regression oracle.
Case contract
Events open, send(nonnegative bytes), fail(known_unprocessed bool), retry, succeed. State tracks whether any bytes were emitted by a one-shot stream. A failure known unprocessed does not restore consumed stream bytes. Only an open stream with zero consumed bytes may retry. Terminal success closes the logical request. Output one decision per retry and terminal success.
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):
opened = False; consumed = 0; failed = False; terminal = False; out = []
for e in events:
if e[0] == 'open':
opened = True
consumed = 0
failed = False
terminal = False
elif e[0] == 'send' and opened and not terminal:
consumed += e[1]
elif e[0] == 'fail' and opened and not terminal:
failed = True
elif e[0] == 'retry':
if terminal:
out.append('terminal')
elif not opened:
out.append('no-body')
elif failed:
out.append('no-failure')
elif consumed != 0:
out.append('unreplayable')
else:
out.append('retry')
failed = False
elif e[0] == 'succeed' and opened and not terminal:
terminal = True
out.append('success')
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('retry',)]), ['no-body'])
check('2', solve([('open',),('retry',),('fail',True),('retry',),('retry',)]), ['no-failure','retry','no-failure'])
check('3', solve([('open',),('send',1),('send',0),('fail',True),('retry',)]), ['unreplayable'])
check('4', solve([('open',),('send',N),('fail',False),('retry',),('open',),('fail',False),('retry',)]), ['unreplayable','retry'])
check('5', solve([('open',),('succeed',),('retry',),('open',),('fail',True),('retry',)]), ['success','terminal','retry'])
check('6', solve([('open',),('send',0),('fail',False),('retry',),('succeed',),('retry',)]), ['retry','success','terminal'])
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 | [] | [] | Passed |
| 1 | ['no-body'] | ['no-body'] | Passed |
| 2 | ['retry', 'no-failure', 'no-failure'] | ['no-failure', 'retry', 'no-failure'] | Failed |
| 3 | ['no-failure'] | ['unreplayable'] | Failed |
| 4 | ['no-failure', 'no-failure'] | ['unreplayable', 'retry'] | Failed |
| 5 | ['success', 'terminal', 'no-failure'] | ['success', 'terminal', 'retry'] | Failed |
| 6 | ['no-failure', 'success', 'terminal'] | ['retry', 'success', 'terminal'] | Failed |
SHA-256 / 32b4d04649458f999fe446e6ba3b3ec739eb5c5488e10ab26a3046ae338c161d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
opened = False; consumed = 0; failed = False; terminal = False; out = []
for e in events:
if e[0] == 'open':
opened = True
consumed = 0
failed = False
terminal = False
elif e[0] == 'send' and opened and not terminal:
consumed += e[1]
elif e[0] == 'fail' and opened and not terminal:
failed = True
elif e[0] == 'retry':
if terminal:
out.append('terminal')
elif not opened:
out.append('no-body')
elif not failed and consumed != 0:
out.append('no-failure')
elif consumed != 0:
out.append('unreplayable')
else:
out.append('retry')
failed = False
elif e[0] == 'succeed' and opened and not terminal:
terminal = True
out.append('success')
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('retry',)]), ['no-body'])
check('2', solve([('open',),('retry',),('fail',True),('retry',),('retry',)]), ['no-failure','retry','no-failure'])
check('3', solve([('open',),('send',1),('send',0),('fail',True),('retry',)]), ['unreplayable'])
check('4', solve([('open',),('send',N),('fail',False),('retry',),('open',),('fail',False),('retry',)]), ['unreplayable','retry'])
check('5', solve([('open',),('succeed',),('retry',),('open',),('fail',True),('retry',)]), ['success','terminal','retry'])
check('6', solve([('open',),('send',0),('fail',False),('retry',),('succeed',),('retry',)]), ['retry','success','terminal'])
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 | [] | [] | Passed |
| 1 | ['no-body'] | ['no-body'] | Passed |
| 2 | ['retry', 'retry', 'retry'] | ['no-failure', 'retry', 'no-failure'] | Failed |
| 3 | ['unreplayable'] | ['unreplayable'] | Passed |
| 4 | ['unreplayable', 'retry'] | ['unreplayable', 'retry'] | Passed |
| 5 | ['success', 'terminal', 'retry'] | ['success', 'terminal', 'retry'] | Passed |
| 6 | ['retry', 'success', 'terminal'] | ['retry', 'success', 'terminal'] | Passed |
SHA-256 / 5fc1c0a0ee60a1c54f7edf03cdd9859402c8f539db37d593a085c0d2c5d7e87a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
opened = False; consumed = 0; failed = False; terminal = False; out = []
for e in events:
if e[0] == 'open':
opened = True
consumed = 0
failed = False
terminal = False
elif e[0] == 'send' and opened and not terminal:
consumed += e[1]
elif e[0] == 'fail' and opened and not terminal:
failed = True
elif e[0] == 'retry':
if terminal:
out.append('terminal')
elif not opened:
out.append('no-body')
elif not failed:
out.append('no-failure')
elif consumed != 0:
out.append('unreplayable')
else:
out.append('retry')
failed = False
elif e[0] == 'succeed' and opened and not terminal:
terminal = True
out.append('success')
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('retry',)]), ['no-body'])
check('2', solve([('open',),('retry',),('fail',True),('retry',),('retry',)]), ['no-failure','retry','no-failure'])
check('3', solve([('open',),('send',1),('send',0),('fail',True),('retry',)]), ['unreplayable'])
check('4', solve([('open',),('send',N),('fail',False),('retry',),('open',),('fail',False),('retry',)]), ['unreplayable','retry'])
check('5', solve([('open',),('succeed',),('retry',),('open',),('fail',True),('retry',)]), ['success','terminal','retry'])
check('6', solve([('open',),('send',0),('fail',False),('retry',),('succeed',),('retry',)]), ['retry','success','terminal'])
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 | [] | [] | Passed |
| 1 | ['no-body'] | ['no-body'] | Passed |
| 2 | ['no-failure', 'retry', 'no-failure'] | ['no-failure', 'retry', 'no-failure'] | Passed |
| 3 | ['unreplayable'] | ['unreplayable'] | Passed |
| 4 | ['unreplayable', 'retry'] | ['unreplayable', 'retry'] | Passed |
| 5 | ['success', 'terminal', 'retry'] | ['success', 'terminal', 'retry'] | Passed |
| 6 | ['retry', 'success', 'terminal'] | ['retry', 'success', 'terminal'] | Passed |
SHA-256 / c12e429efcab33f8b6acc89e00d7b6391bf9095add0ab1702fc47db2b6155519
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:43.077977+00:00.
Case digest / 6ff63ba275804a200aee8ec20182e7746e0cd7dab1803f83eaa35bd9b779cc8c