FA-29436 / HTTP retries / Open access
One-shot request body replay refusal: A successful empty upload permits another retry · case 01
A successful empty upload permits another retry
ROOT CAUSE
A successful empty upload permits another retry
THE FAILURE
A successful empty upload permits another retry
Unsuccessful approach: The attempted repair changes the faulty site to terminal = consumed != 0 out.append 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 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 = False
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', 'no-failure', 'retry'] | ['success', 'terminal', 'retry'] | Failed |
| 6 | ['retry', 'success', 'no-failure'] | ['retry', 'success', 'terminal'] | Failed |
SHA-256 / 8dfcd37a9d6090068186cf0321c8bccf05a63e5512d4859e82c07bff0cc462df
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:
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 = consumed != 0
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', 'no-failure', 'retry'] | ['success', 'terminal', 'retry'] | Failed |
| 6 | ['retry', 'success', 'no-failure'] | ['retry', 'success', 'terminal'] | Failed |
SHA-256 / 7864ec2e577f52c9c2483c1ba1bca6585c70b4dddb770da29c98f070ed647c7e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:43.113706+00:00.
Case digest / d9ea98b1e5d375d221c78c057120fa1aba5dda0da906063afc3d87af8f797062