FA-30301 / HTTP retries / Open access
Challenge refresh without ordinary retry amplification: Ordinary config violates retry transition semantics · case 01
Ordinary config violates retry transition semantics
ROOT CAUSE
Ordinary config violates retry transition semantics
VERIFIED REPAIR
Restore the specified transition ordinary=e[1].
Unsuccessful approach: The attempted repair changes the faulty site to ordinary=e[1]+1 but still violates a regression oracle.
Case contract
begin(ordinary retries,refresh allowance) starts a request. network_failure spends ordinary allowance, challenge spends refresh allowance only if no refresh in flight, refreshed(generation) completes only current refresh generation and records auth replay. While refreshing network failures wait. success terminates both budgets; late refresh is ignored. No credentials are represented.
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):
ordinary=0; refresh=0; generation=0; waiting=False; terminal=True; out=[]
for e in events:
if e[0]=='begin': ordinary=e[2]; refresh=e[2]; generation=0; waiting=False; terminal=False
elif e[0]=='success': terminal=True; waiting=False
elif e[0]=='network':
if terminal: out.append('terminal'); continue
if waiting: out.append('waiting'); continue
if ordinary==0: out.append('exhausted'); continue
ordinary-=1; out.append('retry')
elif e[0]=='challenge':
if terminal: out.append('terminal'); continue
if waiting: out.append('coalesced'); continue
if refresh==0: out.append('auth-exhausted'); continue
refresh-=1; generation+=1; waiting=True
out.append(['refresh',generation])
elif e[0]=='refreshed':
if terminal or not waiting or e[1]!=generation: out.append('stale'); continue
waiting=False; out.append('auth-replay')
return [out,ordinary,refresh]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0,0])
check('1', solve([('begin',2,1),('network',),('challenge',),('network',),('challenge',),('refreshed',1),('refreshed',1),('network',),('network',),('challenge',)]), [['retry',['refresh',1],'waiting','coalesced','auth-replay','stale','retry','exhausted','auth-exhausted'],0,0])
check('2', solve([('begin',0,2),('challenge',),('refreshed',1),('challenge',),('refreshed',1),('refreshed',3),('refreshed',2)]), [[['refresh',1],'auth-replay',['refresh',2],'stale','stale','auth-replay'],0,0])
check('3', solve([('begin',N,1),('challenge',),('success',),('refreshed',1),('network',),('challenge',)]), [[['refresh',1],'stale','terminal','terminal'],N,0])
check('4', solve([('begin',0,0),('network',),('challenge',)]), [['exhausted','auth-exhausted'],0,0])
check('5', solve([('begin',1,1),('challenge',),('begin',0,1),('challenge',),('refreshed',1)]), [[['refresh',1],['refresh',1],'auth-replay'],0,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] | [[], 0, 0] | Passed |
| 1 | [['retry', ['refresh', 1], 'waiting', 'coalesced', 'auth-replay', 'stale', 'exhausted', 'exhausted', 'auth-exhausted'], 0, 0] | [['retry', ['refresh', 1], 'waiting', 'coalesced', 'auth-replay', 'stale', 'retry', 'exhausted', 'auth-exhausted'], 0, 0] | Failed |
| 2 | [[['refresh', 1], 'auth-replay', ['refresh', 2], 'stale', 'stale', 'auth-replay'], 2, 0] | [[['refresh', 1], 'auth-replay', ['refresh', 2], 'stale', 'stale', 'auth-replay'], 0, 0] | Failed |
| 3 | [[['refresh', 1], 'stale', 'terminal', 'terminal'], 1, 0] | [[['refresh', 1], 'stale', 'terminal', 'terminal'], 1, 0] | Passed |
| 4 | [['exhausted', 'auth-exhausted'], 0, 0] | [['exhausted', 'auth-exhausted'], 0, 0] | Passed |
| 5 | [[['refresh', 1], ['refresh', 1], 'auth-replay'], 1, 0] | [[['refresh', 1], ['refresh', 1], 'auth-replay'], 0, 0] | Failed |
SHA-256 / 9a215c795be5479c3f7ae65f9b8d768b83f37ab2739dcc6e64a6e069975499ee
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
ordinary=0; refresh=0; generation=0; waiting=False; terminal=True; out=[]
for e in events:
if e[0]=='begin': ordinary=e[1]+1; refresh=e[2]; generation=0; waiting=False; terminal=False
elif e[0]=='success': terminal=True; waiting=False
elif e[0]=='network':
if terminal: out.append('terminal'); continue
if waiting: out.append('waiting'); continue
if ordinary==0: out.append('exhausted'); continue
ordinary-=1; out.append('retry')
elif e[0]=='challenge':
if terminal: out.append('terminal'); continue
if waiting: out.append('coalesced'); continue
if refresh==0: out.append('auth-exhausted'); continue
refresh-=1; generation+=1; waiting=True
out.append(['refresh',generation])
elif e[0]=='refreshed':
if terminal or not waiting or e[1]!=generation: out.append('stale'); continue
waiting=False; out.append('auth-replay')
return [out,ordinary,refresh]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0,0])
check('1', solve([('begin',2,1),('network',),('challenge',),('network',),('challenge',),('refreshed',1),('refreshed',1),('network',),('network',),('challenge',)]), [['retry',['refresh',1],'waiting','coalesced','auth-replay','stale','retry','exhausted','auth-exhausted'],0,0])
check('2', solve([('begin',0,2),('challenge',),('refreshed',1),('challenge',),('refreshed',1),('refreshed',3),('refreshed',2)]), [[['refresh',1],'auth-replay',['refresh',2],'stale','stale','auth-replay'],0,0])
check('3', solve([('begin',N,1),('challenge',),('success',),('refreshed',1),('network',),('challenge',)]), [[['refresh',1],'stale','terminal','terminal'],N,0])
check('4', solve([('begin',0,0),('network',),('challenge',)]), [['exhausted','auth-exhausted'],0,0])
check('5', solve([('begin',1,1),('challenge',),('begin',0,1),('challenge',),('refreshed',1)]), [[['refresh',1],['refresh',1],'auth-replay'],0,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] | [[], 0, 0] | Passed |
| 1 | [['retry', ['refresh', 1], 'waiting', 'coalesced', 'auth-replay', 'stale', 'retry', 'retry', 'auth-exhausted'], 0, 0] | [['retry', ['refresh', 1], 'waiting', 'coalesced', 'auth-replay', 'stale', 'retry', 'exhausted', 'auth-exhausted'], 0, 0] | Failed |
| 2 | [[['refresh', 1], 'auth-replay', ['refresh', 2], 'stale', 'stale', 'auth-replay'], 1, 0] | [[['refresh', 1], 'auth-replay', ['refresh', 2], 'stale', 'stale', 'auth-replay'], 0, 0] | Failed |
| 3 | [[['refresh', 1], 'stale', 'terminal', 'terminal'], 2, 0] | [[['refresh', 1], 'stale', 'terminal', 'terminal'], 1, 0] | Failed |
| 4 | [['retry', 'auth-exhausted'], 0, 0] | [['exhausted', 'auth-exhausted'], 0, 0] | Failed |
| 5 | [[['refresh', 1], ['refresh', 1], 'auth-replay'], 1, 0] | [[['refresh', 1], ['refresh', 1], 'auth-replay'], 0, 0] | Failed |
SHA-256 / 52660e19e0174a778fc109e85fff9608df6a90ab19513a3df29c7f0cf61f5a1b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
ordinary=0; refresh=0; generation=0; waiting=False; terminal=True; out=[]
for e in events:
if e[0]=='begin': ordinary=e[1]; refresh=e[2]; generation=0; waiting=False; terminal=False
elif e[0]=='success': terminal=True; waiting=False
elif e[0]=='network':
if terminal: out.append('terminal'); continue
if waiting: out.append('waiting'); continue
if ordinary==0: out.append('exhausted'); continue
ordinary-=1; out.append('retry')
elif e[0]=='challenge':
if terminal: out.append('terminal'); continue
if waiting: out.append('coalesced'); continue
if refresh==0: out.append('auth-exhausted'); continue
refresh-=1; generation+=1; waiting=True
out.append(['refresh',generation])
elif e[0]=='refreshed':
if terminal or not waiting or e[1]!=generation: out.append('stale'); continue
waiting=False; out.append('auth-replay')
return [out,ordinary,refresh]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0,0])
check('1', solve([('begin',2,1),('network',),('challenge',),('network',),('challenge',),('refreshed',1),('refreshed',1),('network',),('network',),('challenge',)]), [['retry',['refresh',1],'waiting','coalesced','auth-replay','stale','retry','exhausted','auth-exhausted'],0,0])
check('2', solve([('begin',0,2),('challenge',),('refreshed',1),('challenge',),('refreshed',1),('refreshed',3),('refreshed',2)]), [[['refresh',1],'auth-replay',['refresh',2],'stale','stale','auth-replay'],0,0])
check('3', solve([('begin',N,1),('challenge',),('success',),('refreshed',1),('network',),('challenge',)]), [[['refresh',1],'stale','terminal','terminal'],N,0])
check('4', solve([('begin',0,0),('network',),('challenge',)]), [['exhausted','auth-exhausted'],0,0])
check('5', solve([('begin',1,1),('challenge',),('begin',0,1),('challenge',),('refreshed',1)]), [[['refresh',1],['refresh',1],'auth-replay'],0,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] | [[], 0, 0] | Passed |
| 1 | [['retry', ['refresh', 1], 'waiting', 'coalesced', 'auth-replay', 'stale', 'retry', 'exhausted', 'auth-exhausted'], 0, 0] | [['retry', ['refresh', 1], 'waiting', 'coalesced', 'auth-replay', 'stale', 'retry', 'exhausted', 'auth-exhausted'], 0, 0] | Passed |
| 2 | [[['refresh', 1], 'auth-replay', ['refresh', 2], 'stale', 'stale', 'auth-replay'], 0, 0] | [[['refresh', 1], 'auth-replay', ['refresh', 2], 'stale', 'stale', 'auth-replay'], 0, 0] | Passed |
| 3 | [[['refresh', 1], 'stale', 'terminal', 'terminal'], 1, 0] | [[['refresh', 1], 'stale', 'terminal', 'terminal'], 1, 0] | Passed |
| 4 | [['exhausted', 'auth-exhausted'], 0, 0] | [['exhausted', 'auth-exhausted'], 0, 0] | Passed |
| 5 | [[['refresh', 1], ['refresh', 1], 'auth-replay'], 0, 0] | [[['refresh', 1], ['refresh', 1], 'auth-replay'], 0, 0] | Passed |
SHA-256 / b87099113fa62cf1f0df2f2eccee925c37cc270f12a1a06f4ab8cfeba69b34d9
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:51.662950+00:00.
Case digest / 2cb3a6671e1d268ddabeade5dcca02bc0580cc9e0d8a78983e63573246feb140