FA-29661 / HTTP retries / Open access
Retry only unresolved batch members: Permanent failures are resent in a partial retry · case 01
Permanent failures are resent in a partial retry
ROOT CAUSE
Permanent failures are resent in a partial retry
THE FAILURE
Permanent failures are resent in a partial retry
Unsuccessful approach: The attempted repair changes the faulty site to state[k]=['pending',None] 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]=['retry',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', 'b'], [None, None]] | [['a'], [None, None]] | Failed |
| 3 | [['a'], [None]] | [['a'], [None]] | Passed |
| 4 | [['b'], [1, None]] | [[], [1, None]] | Failed |
| 5 | [['a'], [None]] | [['a'], [None]] | Passed |
SHA-256 / e3771b9178081e70b20502f56a666d1cf19a8c1ee3fe47e698f5606e7d4befe3
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]=['pending',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', 'b'], [None, None]] | [['a'], [None, None]] | Failed |
| 3 | [['a'], [None]] | [['a'], [None]] | Passed |
| 4 | [['b'], [1, None]] | [[], [1, None]] | Failed |
| 5 | [['a'], [None]] | [['a'], [None]] | Passed |
SHA-256 / 62108781de4ffa7253a16620b1aa4f27d007b10e4e4a440f7904ac27e7a788a3
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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:45.538758+00:00.
Case digest / 5c25153eb9094fdcfb44ea2529db5a640381a44d8a15051927be47fe684f4317