FAILURE MAP
← Case archive

FA-30286 / HTTP retries / Open access

Conditional mutation retry reconciliation: Retry condition violates retry transition semantics · case 01

Retry condition violates retry transition semantics

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

ROOT CAUSE

Retry condition violates retry transition semantics

THE FAILURE

Retry condition violates retry transition semantics

Unsuccessful approach: The attempted repair changes the faulty site to ['send',None,desired] but still violates a regression oracle.

Case contract

begin(version,desired) creates a pending conditional write. sent records that it may have reached the server; lost means response absent. inspect(version,value) after loss reconciles: desired value at version+1 is committed, unchanged original version permits retry, any other state conflicts. retry only from retry state retains original precondition and desired body. ack(value) succeeds only for an active sent request. Return decisions and outgoing retry preconditions.

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):
    version=0; desired=None; state='idle'; out=[]
    for e in events:
        if e[0]=='begin':
            version=e[1]; desired=e[2]; state='ready'
        elif e[0]=='sent':
            if state=='ready': state='sent'
        elif e[0]=='lost':
            if state=='sent': state='uncertain'
        elif e[0]=='inspect':
            if state!='uncertain': out.append('ignored'); continue
            if e[1]==version+1 and e[2]==desired:
                state='done'; out.append('committed')
            elif e[1]==version:
                state='retry'; out.append('retryable')
            else: state='conflict'; out.append('conflict')
        elif e[0]=='retry':
            if state!='retry': out.append('denied'); continue
            out.append(['send',version+1,desired]); state='ready'
        elif e[0]=='ack':
            if state=='sent': state='done'; out.append(['success',e[1]])
            else: out.append('ignored')
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N,N+1),('retry',),('retry',),('sent',),('ack',N+9)]), ['retryable',['send',N,N+9],'denied',['success',N+9]])
check('2', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N+1,N+9),('retry',),('inspect',N,N)]), ['committed','denied','ignored'])
check('3', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N+1,N+8),('retry',),('inspect',N,N)]), ['conflict','denied','ignored'])
check('4', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N+2,N+9),('retry',)]), ['conflict','denied'])
check('5', solve([('begin',N,N+9),('lost',),('inspect',N,N),('ack',N)]), ['ignored','ignored'])
check('6', solve([('begin',N,N+9),('sent',),('lost',),('ack',N),('inspect',N-1,N),('retry',)]), ['ignored','conflict','denied'])
check('7', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N,N),('retry',),('ack',N)]), ['retryable',['send',N,N+9],'ignored'])
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[][]Passed
1['retryable', ['send', 2, 10], 'denied', ['success', 10]]['retryable', ['send', 1, 10], 'denied', ['success', 10]]Failed
2['committed', 'denied', 'ignored']['committed', 'denied', 'ignored']Passed
3['conflict', 'denied', 'ignored']['conflict', 'denied', 'ignored']Passed
4['conflict', 'denied']['conflict', 'denied']Passed
5['ignored', 'ignored']['ignored', 'ignored']Passed
6['ignored', 'conflict', 'denied']['ignored', 'conflict', 'denied']Passed
7['retryable', ['send', 2, 10], 'ignored']['retryable', ['send', 1, 10], 'ignored']Failed

SHA-256 / 7888d1907b91cfe692ab3d96a5ebc57e1d233726b553a01530aec4ef3615cd56

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    version=0; desired=None; state='idle'; out=[]
    for e in events:
        if e[0]=='begin':
            version=e[1]; desired=e[2]; state='ready'
        elif e[0]=='sent':
            if state=='ready': state='sent'
        elif e[0]=='lost':
            if state=='sent': state='uncertain'
        elif e[0]=='inspect':
            if state!='uncertain': out.append('ignored'); continue
            if e[1]==version+1 and e[2]==desired:
                state='done'; out.append('committed')
            elif e[1]==version:
                state='retry'; out.append('retryable')
            else: state='conflict'; out.append('conflict')
        elif e[0]=='retry':
            if state!='retry': out.append('denied'); continue
            out.append(['send',None,desired]); state='ready'
        elif e[0]=='ack':
            if state=='sent': state='done'; out.append(['success',e[1]])
            else: out.append('ignored')
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N,N+1),('retry',),('retry',),('sent',),('ack',N+9)]), ['retryable',['send',N,N+9],'denied',['success',N+9]])
check('2', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N+1,N+9),('retry',),('inspect',N,N)]), ['committed','denied','ignored'])
check('3', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N+1,N+8),('retry',),('inspect',N,N)]), ['conflict','denied','ignored'])
check('4', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N+2,N+9),('retry',)]), ['conflict','denied'])
check('5', solve([('begin',N,N+9),('lost',),('inspect',N,N),('ack',N)]), ['ignored','ignored'])
check('6', solve([('begin',N,N+9),('sent',),('lost',),('ack',N),('inspect',N-1,N),('retry',)]), ['ignored','conflict','denied'])
check('7', solve([('begin',N,N+9),('sent',),('lost',),('inspect',N,N),('retry',),('ack',N)]), ['retryable',['send',N,N+9],'ignored'])
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[][]Passed
1['retryable', ['send', None, 10], 'denied', ['success', 10]]['retryable', ['send', 1, 10], 'denied', ['success', 10]]Failed
2['committed', 'denied', 'ignored']['committed', 'denied', 'ignored']Passed
3['conflict', 'denied', 'ignored']['conflict', 'denied', 'ignored']Passed
4['conflict', 'denied']['conflict', 'denied']Passed
5['ignored', 'ignored']['ignored', 'ignored']Passed
6['ignored', 'conflict', 'denied']['ignored', 'conflict', 'denied']Passed
7['retryable', ['send', None, 10], 'ignored']['retryable', ['send', 1, 10], 'ignored']Failed

SHA-256 / 92f881bbbab60aac370894064c618962d4726a6343529d0351b73c9a6da55604

HELD IN THE MEMBER ARCHIVE

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

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

Case digest / 5eb7826444574b881b2329db09f192eb17ee55bafa3a8f695cf93fba87b79a52