FA-29786 / HTTP retries / Open access
GOAWAY retry admission: Ambiguous processing violates retry transition semantics · case 01
Ambiguous processing violates retry transition semantics
ROOT CAUSE
Ambiguous processing violates retry transition semantics
VERIFIED REPAIR
Restore the specified transition else: out.append('ambiguous').
Unsuccessful approach: The attempted repair changes the faulty site to else: out.append('unreplayable') 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]=False
if boundary is not None and e[1]>boundary:
out.append('retry' if replayable else 'unreplayable')
else: out.append('retry')
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', 'retry', 'finished', 'unknown'], None] | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | Failed |
| 2 | [['retry', 'retry', 'unreplayable'], 3] | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | Failed |
| 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 / 507a79a6b79351004fc8d2a957ba6f84d9afa9c206b6f4ddbe72e381ea03acef
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]=False
if boundary is not None and e[1]>boundary:
out.append('retry' if replayable else 'unreplayable')
else: out.append('unreplayable')
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', 'unreplayable', 'finished', 'unknown'], None] | [['duplicate', 'ambiguous', 'finished', 'unknown'], None] | Failed |
| 2 | [['unreplayable', 'unreplayable', 'unreplayable'], 3] | [['ambiguous', 'ambiguous', 'unreplayable'], 3] | Failed |
| 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 / 3267a87508fd8e3acde5818485e73d4bb6f242c833639e68d6d7127667f8dac0
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.481320+00:00.
Case digest / 157026e1fe0935723505e8badb042c8af3cf332fded4353d359250674be233eb