FAILURE MAP
← Case archive

FA-29781 / HTTP retries / Open access

GOAWAY retry admission: Body replay violates retry transition semantics · case 01

Body replay violates retry transition semantics

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Body replay violates retry transition semantics

VERIFIED REPAIR

Restore the specified transition 'retry' if replayable else 'unreplayable'.

Unsuccessful approach: The attempted repair changes the faulty site to 'retry' if not replayable else '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')
            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 fixtureActualExpectedOutcome
0[[], None][[], None]Passed
1[['duplicate', 'ambiguous', 'finished', 'unknown'], None][['duplicate', 'ambiguous', 'finished', 'unknown'], None]Passed
2[['ambiguous', 'ambiguous', 'retry'], 3][['ambiguous', 'ambiguous', 'unreplayable'], 3]Failed
3[['retry', 'draining'], 1][['retry', 'draining'], 1]Passed
4[['draining', 'finished'], 0][['draining', 'finished'], 0]Passed
5[['retry'], 0][['unreplayable'], 0]Failed
6[['retry', 'finished'], 10][['retry', 'finished'], 10]Passed

SHA-256 / a8784ffe4f33fa1217cb81fe4229e6ee92a09d7d2eca8b01cb7c2d13fd582f62

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 not 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 fixtureActualExpectedOutcome
0[[], None][[], None]Passed
1[['duplicate', 'ambiguous', 'finished', 'unknown'], None][['duplicate', 'ambiguous', 'finished', 'unknown'], None]Passed
2[['ambiguous', 'ambiguous', 'retry'], 3][['ambiguous', 'ambiguous', 'unreplayable'], 3]Failed
3[['unreplayable', 'draining'], 1][['retry', 'draining'], 1]Failed
4[['draining', 'finished'], 0][['draining', 'finished'], 0]Passed
5[['retry'], 0][['unreplayable'], 0]Failed
6[['unreplayable', 'finished'], 10][['retry', 'finished'], 10]Failed

SHA-256 / dcdb3285c258bfee5704398fa1364fd814f51bb0f983699ecf4d60e0fc1ecc92

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 fixtureActualExpectedOutcome
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.478943+00:00.

Case digest / d5a86308e353ea9a63aa68ffa4b9052cd871cb493dc8b76f07e3f0229cf3d608