FAILURE MAP
← Case archive

FA-29766 / HTTP retries / Open access

GOAWAY retry admission: Finished result violates retry transition semantics · case 01

Finished result violates retry transition semantics

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

ROOT CAUSE

Finished result violates retry transition semantics

THE FAILURE

Finished result violates retry transition semantics

Unsuccessful approach: The attempted repair changes the faulty site to out.append('ambiguous') 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('retry'); 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', 'retry', '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', 'retry'], 0][['draining', 'finished'], 0]Failed
5[['unreplayable'], 0][['unreplayable'], 0]Passed
6[['retry', 'retry'], 10][['retry', 'finished'], 10]Failed

SHA-256 / ba18827c998a40c8f87fc4256dd79b8633d7de422b284ae35248b86adf9b9be9

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('ambiguous'); 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', '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', 'ambiguous'], 0][['draining', 'finished'], 0]Failed
5[['unreplayable'], 0][['unreplayable'], 0]Passed
6[['retry', 'ambiguous'], 10][['retry', 'finished'], 10]Failed

SHA-256 / 871b90fddc21d504e756304d689a22b2f8f2d37ce34c160892a127707b5db3db

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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:46.679525+00:00.

Case digest / 9079b291ca59b971bcf6442d4e41b0da5ab64bcf4068db84bbea0b8ce1034c6c