FA-29671 / HTTP retries / Open access
Retry only unresolved batch members: Partial retry drops pending or explicitly retryable members · case 01
Partial retry drops pending or explicitly retryable members
ROOT CAUSE
Partial retry drops pending or explicitly retryable members
VERIFIED REPAIR
Restore the specified transition state[k][0] in ('pending','retry').
Unsuccessful approach: The attempted repair changes the faulty site to state[k][0]=='pending' but still violates a regression oracle.
Case contract
open(list of item IDs) establishes ordered batch. result(id,status,value) records first success, retryable failure, or permanent failure; unknown IDs ignored. retry returns unresolved/retryable items in original order including duplicates. done returns values or null in original positions. Success/permanent terminal entries cannot be overwritten by late responses.
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):
order=[]; state={}; out=[]
for e in events:
if e[0]=='open':
order=list(e[1]); state={k:['pending',None] for k in order}
elif e[0]=='result':
k,status,value=e[1:]
if k not in state: continue
if state[k][0] in ('success','permanent'): continue
if status=='success': state[k]=['success',value]
elif status=='permanent': state[k]=['permanent',None]
else: state[k]=['retry',None]
elif e[0]=='retry':
out.append([k for k in order if state[k][0]=='retry'])
elif e[0]=='done':
out.append([state[k][1] if state[k][0]=='success' else None for k in order])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('open',['b','a','b']),('retry',),('result','b','success',N),('done',),('retry',)]), [['b','a','b'],[N,None,N],['a']])
check('2', solve([('open',['a','b']),('result','a','retry',N),('result','b','permanent',N),('retry',),('done',)]), [['a'],[None,None]])
check('3', solve([('open',['a']),('result','z','success',N),('retry',),('done',)]), [['a'],[None]])
check('4', solve([('open',['a','b']),('result','a','success',N),('result','a','retry',0),('result','b','permanent',0),('result','b','retry',0),('retry',),('done',)]), [[],[N,None]])
check('5', solve([('open',['a']),('result','a','success',N),('open',['a']),('retry',),('done',)]), [['a'],[None]])
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 | [[], [1, None, 1], []] | [['b', 'a', 'b'], [1, None, 1], ['a']] | Failed |
| 2 | [['a'], [None, None]] | [['a'], [None, None]] | Passed |
| 3 | [[], [None]] | [['a'], [None]] | Failed |
| 4 | [[], [1, None]] | [[], [1, None]] | Passed |
| 5 | [[], [None]] | [['a'], [None]] | Failed |
SHA-256 / d2e3e89f640fa4066414d85891f07f98017d3db886a99006ad991d49a588b3ef
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
order=[]; state={}; out=[]
for e in events:
if e[0]=='open':
order=list(e[1]); state={k:['pending',None] for k in order}
elif e[0]=='result':
k,status,value=e[1:]
if k not in state: continue
if state[k][0] in ('success','permanent'): continue
if status=='success': state[k]=['success',value]
elif status=='permanent': state[k]=['permanent',None]
else: state[k]=['retry',None]
elif e[0]=='retry':
out.append([k for k in order if state[k][0]=='pending'])
elif e[0]=='done':
out.append([state[k][1] if state[k][0]=='success' else None for k in order])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('open',['b','a','b']),('retry',),('result','b','success',N),('done',),('retry',)]), [['b','a','b'],[N,None,N],['a']])
check('2', solve([('open',['a','b']),('result','a','retry',N),('result','b','permanent',N),('retry',),('done',)]), [['a'],[None,None]])
check('3', solve([('open',['a']),('result','z','success',N),('retry',),('done',)]), [['a'],[None]])
check('4', solve([('open',['a','b']),('result','a','success',N),('result','a','retry',0),('result','b','permanent',0),('result','b','retry',0),('retry',),('done',)]), [[],[N,None]])
check('5', solve([('open',['a']),('result','a','success',N),('open',['a']),('retry',),('done',)]), [['a'],[None]])
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 | [['b', 'a', 'b'], [1, None, 1], ['a']] | [['b', 'a', 'b'], [1, None, 1], ['a']] | Passed |
| 2 | [[], [None, None]] | [['a'], [None, None]] | Failed |
| 3 | [['a'], [None]] | [['a'], [None]] | Passed |
| 4 | [[], [1, None]] | [[], [1, None]] | Passed |
| 5 | [['a'], [None]] | [['a'], [None]] | Passed |
SHA-256 / 5e46fa0187e1bdb0f09517c53361c5303bfe32c6fa376e1eaa79e93e10cbf59b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
order=[]; state={}; out=[]
for e in events:
if e[0]=='open':
order=list(e[1]); state={k:['pending',None] for k in order}
elif e[0]=='result':
k,status,value=e[1:]
if k not in state: continue
if state[k][0] in ('success','permanent'): continue
if status=='success': state[k]=['success',value]
elif status=='permanent': state[k]=['permanent',None]
else: state[k]=['retry',None]
elif e[0]=='retry':
out.append([k for k in order if state[k][0] in ('pending','retry')])
elif e[0]=='done':
out.append([state[k][1] if state[k][0]=='success' else None for k in order])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('open',['b','a','b']),('retry',),('result','b','success',N),('done',),('retry',)]), [['b','a','b'],[N,None,N],['a']])
check('2', solve([('open',['a','b']),('result','a','retry',N),('result','b','permanent',N),('retry',),('done',)]), [['a'],[None,None]])
check('3', solve([('open',['a']),('result','z','success',N),('retry',),('done',)]), [['a'],[None]])
check('4', solve([('open',['a','b']),('result','a','success',N),('result','a','retry',0),('result','b','permanent',0),('result','b','retry',0),('retry',),('done',)]), [[],[N,None]])
check('5', solve([('open',['a']),('result','a','success',N),('open',['a']),('retry',),('done',)]), [['a'],[None]])
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 | [['b', 'a', 'b'], [1, None, 1], ['a']] | [['b', 'a', 'b'], [1, None, 1], ['a']] | Passed |
| 2 | [['a'], [None, None]] | [['a'], [None, None]] | Passed |
| 3 | [['a'], [None]] | [['a'], [None]] | Passed |
| 4 | [[], [1, None]] | [[], [1, None]] | Passed |
| 5 | [['a'], [None]] | [['a'], [None]] | Passed |
SHA-256 / b8a1435b2101cfd498dd8d0e1223e1a11ed44f7cc94d880177a1e3743b2ec5ea
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.540975+00:00.
Case digest / 6787d4b75ea572719ed145e94803a8d69fbd812405a1cb78a0bc1624c392acd5