FA-29771 / HTTP retries / Open access
GOAWAY retry admission: Consume failure violates retry transition semantics · case 01
Consume failure violates retry transition semantics
ROOT CAUSE
Consume failure violates retry transition semantics
VERIFIED REPAIR
Restore the specified transition streams[e[1]][1]=False if.
Unsuccessful approach: The attempted repair changes the faulty site to streams[e[1]][1]=boundary is not None if but still violates a regression oracle.
Case contract
open(stream ID,replayable) records a live stream. goaway(last ID) monotonically lowers the accepted stream boundary. fail(id) retries only replayable streams above the known boundary (known unprocessed), otherwise reports ambiguous; unknown/already-finished streams are ignored. succeed closes a stream. New streams after GOAWAY are blocked. reconnect resets connection boundary and stream IDs while retaining decision history.
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):
streams={}; boundary=None; out=[]
for e in events:
if e[0]=='open':
if boundary is not None: out.append('draining'); continue
if e[1] in streams: out.append('duplicate'); continue
streams[e[1]]=[e[2],True]
elif e[0]=='goaway':
boundary=e[1] if boundary is None else min(boundary,e[1])
elif e[0]=='succeed':
if e[1] in streams: streams[e[1]][1]=False
elif e[0]=='fail':
if e[1] not in streams: out.append('unknown'); continue
replayable,active=streams[e[1]]
if not active: out.append('finished'); continue
streams[e[1]][1]=True
if boundary is not None and e[1]>boundary:
out.append('retry' if replayable else 'unreplayable')
else: out.append('ambiguous')
elif e[0]=='reconnect':
boundary=None
streams={}
return [out,boundary]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],None])
check('1', solve([('open',1,True),('open',1,False),('fail',1),('fail',1),('fail',9)]), [['duplicate','ambiguous','finished','unknown'],None])
check('2', solve([('open',1,True),('open',3,True),('open',5,False),('goaway',3),('fail',1),('fail',3),('fail',5)]), [['ambiguous','ambiguous','unreplayable'],3])
check('3', solve([('open',3,True),('goaway',1),('goaway',5),('fail',3),('open',7,True)]), [['retry','draining'],1])
check('4', solve([('open',1,True),('goaway',0),('open',3,True),('succeed',1),('fail',1)]), [['draining','finished'],0])
check('5', solve([('open',1,True),('goaway',0),('reconnect',),('open',1,False),('goaway',0),('fail',1)]), [['unreplayable'],0])
check('6', solve([('open',N+10,True),('goaway',N+9),('fail',N+10),('fail',N+10)]), [['retry','finished'],N+9])
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 | [[], None] | [[], None] | Passed |
| 1 | [['duplicate', 'ambiguous', 'ambiguous', 'unknown'], None] | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | Failed |
| 2 | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | Passed |
| 3 | [['retry', 'draining'], 1] | [['retry', 'draining'], 1] | Passed |
| 4 | [['draining', 'finished'], 0] | [['draining', 'finished'], 0] | Passed |
| 5 | [['unreplayable'], 0] | [['unreplayable'], 0] | Passed |
| 6 | [['retry', 'retry'], 10] | [['retry', 'finished'], 10] | Failed |
SHA-256 / 51c6635e0afb7215de401ee4da30a3300152af925ef81d6354555dcafeff370b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
streams={}; boundary=None; out=[]
for e in events:
if e[0]=='open':
if boundary is not None: out.append('draining'); continue
if e[1] in streams: out.append('duplicate'); continue
streams[e[1]]=[e[2],True]
elif e[0]=='goaway':
boundary=e[1] if boundary is None else min(boundary,e[1])
elif e[0]=='succeed':
if e[1] in streams: streams[e[1]][1]=False
elif e[0]=='fail':
if e[1] not in streams: out.append('unknown'); continue
replayable,active=streams[e[1]]
if not active: out.append('finished'); continue
streams[e[1]][1]=boundary is not None
if boundary is not None and e[1]>boundary:
out.append('retry' if replayable else 'unreplayable')
else: out.append('ambiguous')
elif e[0]=='reconnect':
boundary=None
streams={}
return [out,boundary]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],None])
check('1', solve([('open',1,True),('open',1,False),('fail',1),('fail',1),('fail',9)]), [['duplicate','ambiguous','finished','unknown'],None])
check('2', solve([('open',1,True),('open',3,True),('open',5,False),('goaway',3),('fail',1),('fail',3),('fail',5)]), [['ambiguous','ambiguous','unreplayable'],3])
check('3', solve([('open',3,True),('goaway',1),('goaway',5),('fail',3),('open',7,True)]), [['retry','draining'],1])
check('4', solve([('open',1,True),('goaway',0),('open',3,True),('succeed',1),('fail',1)]), [['draining','finished'],0])
check('5', solve([('open',1,True),('goaway',0),('reconnect',),('open',1,False),('goaway',0),('fail',1)]), [['unreplayable'],0])
check('6', solve([('open',N+10,True),('goaway',N+9),('fail',N+10),('fail',N+10)]), [['retry','finished'],N+9])
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 | [[], None] | [[], None] | Passed |
| 1 | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | Passed |
| 2 | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | Passed |
| 3 | [['retry', 'draining'], 1] | [['retry', 'draining'], 1] | Passed |
| 4 | [['draining', 'finished'], 0] | [['draining', 'finished'], 0] | Passed |
| 5 | [['unreplayable'], 0] | [['unreplayable'], 0] | Passed |
| 6 | [['retry', 'retry'], 10] | [['retry', 'finished'], 10] | Failed |
SHA-256 / daf3aece013dd0e105428b4c3cb476cfd5f8db33331535a669cdf66fbc0fe657
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
streams={}; boundary=None; out=[]
for e in events:
if e[0]=='open':
if boundary is not None: out.append('draining'); continue
if e[1] in streams: out.append('duplicate'); continue
streams[e[1]]=[e[2],True]
elif e[0]=='goaway':
boundary=e[1] if boundary is None else min(boundary,e[1])
elif e[0]=='succeed':
if e[1] in streams: streams[e[1]][1]=False
elif e[0]=='fail':
if e[1] not in streams: out.append('unknown'); continue
replayable,active=streams[e[1]]
if not active: out.append('finished'); continue
streams[e[1]][1]=False
if boundary is not None and e[1]>boundary:
out.append('retry' if replayable else 'unreplayable')
else: out.append('ambiguous')
elif e[0]=='reconnect':
boundary=None
streams={}
return [out,boundary]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],None])
check('1', solve([('open',1,True),('open',1,False),('fail',1),('fail',1),('fail',9)]), [['duplicate','ambiguous','finished','unknown'],None])
check('2', solve([('open',1,True),('open',3,True),('open',5,False),('goaway',3),('fail',1),('fail',3),('fail',5)]), [['ambiguous','ambiguous','unreplayable'],3])
check('3', solve([('open',3,True),('goaway',1),('goaway',5),('fail',3),('open',7,True)]), [['retry','draining'],1])
check('4', solve([('open',1,True),('goaway',0),('open',3,True),('succeed',1),('fail',1)]), [['draining','finished'],0])
check('5', solve([('open',1,True),('goaway',0),('reconnect',),('open',1,False),('goaway',0),('fail',1)]), [['unreplayable'],0])
check('6', solve([('open',N+10,True),('goaway',N+9),('fail',N+10),('fail',N+10)]), [['retry','finished'],N+9])
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 | [[], None] | [[], None] | Passed |
| 1 | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | Passed |
| 2 | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | Passed |
| 3 | [['retry', 'draining'], 1] | [['retry', 'draining'], 1] | Passed |
| 4 | [['draining', 'finished'], 0] | [['draining', 'finished'], 0] | Passed |
| 5 | [['unreplayable'], 0] | [['unreplayable'], 0] | Passed |
| 6 | [['retry', 'finished'], 10] | [['retry', 'finished'], 10] | Passed |
SHA-256 / 4723427a8c3ffc10cd4309fc9f24d192d5a22e70093f0ca2e3ea467295f396d0
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:46.448452+00:00.
Case digest / aca01e083feeccf5c5293b941725dca2afdef6cf55e5faca1dff7f233f14c75d