FA-29806 / HTTP retries / Open access
Expect-Continue request retry phases: Start consumption violates retry transition semantics · case 01
Start consumption violates retry transition semantics
ROOT CAUSE
Start consumption violates retry transition semantics
THE FAILURE
Start consumption violates retry transition semantics
Unsuccessful approach: The attempted repair changes the faulty site to sent=1; phase='waiting' elif but still violates a regression oracle.
Case contract
start(body size) starts awaiting permission. interim100 permits sending; other interim messages do not. tick permits optimistic sending after wait expiry. send(bytes) emits at most remaining body only in permitted phase. final(status) stops body transmission and records response. fail permits retry with the same full body only if zero body bytes were sent; otherwise ambiguous. retry resets the handshaking phase after retry permission. Return transmissions and decisions.
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):
size=0; sent=0; phase='idle'; out=[]
for e in events:
if e[0]=='start':
size=e[1]; sent=sent; phase='waiting'
elif e[0]=='interim':
if e[1]==100 and phase=='waiting': phase='allowed'
elif e[0]=='tick':
if phase=='waiting': phase='allowed'
elif e[0]=='send':
if phase!='allowed': out.append('blocked'); continue
count=min(e[1],size-sent)
sent+=count
out.append(count)
elif e[0]=='final':
phase='done'; out.append(['response',e[1]])
elif e[0]=='fail':
if phase=='done': out.append('terminal'); continue
phase='retry' if sent==0 else 'ambiguous'
out.append(phase)
elif e[0]=='retry':
if phase!='retry': out.append('denied'); continue
sent=0; phase='waiting'; out.append('restarted')
return [out,sent]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0])
check('1', solve([('start',N+3),('send',1),('interim',103),('send',1),('interim',100),('send',2),('send',N+3)]), [['blocked','blocked',2,N+1],N+3])
check('2', solve([('start',N),('fail',),('retry',),('send',1),('tick',),('send',N)]), [['retry','restarted','blocked',N],N])
check('3', solve([('start',2),('tick',),('send',1),('fail',),('retry',)]), [[1,'ambiguous','denied'],1])
check('4', solve([('start',N),('final',417),('interim',100),('tick',),('send',1),('fail',),('retry',)]), [[['response',417],'blocked','terminal','denied'],0])
check('5', solve([('start',2),('tick',),('send',2),('start',N),('fail',)]), [[2,'retry'],0])
check('6', solve([('start',0),('interim',100),('send',3),('send',0)]), [[0,0],0])
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 | [[], 0] | [[], 0] | Passed |
| 1 | [['blocked', 'blocked', 2, 2], 4] | [['blocked', 'blocked', 2, 2], 4] | Passed |
| 2 | [['retry', 'restarted', 'blocked', 1], 1] | [['retry', 'restarted', 'blocked', 1], 1] | Passed |
| 3 | [[1, 'ambiguous', 'denied'], 1] | [[1, 'ambiguous', 'denied'], 1] | Passed |
| 4 | [[['response', 417], 'blocked', 'terminal', 'denied'], 0] | [[['response', 417], 'blocked', 'terminal', 'denied'], 0] | Passed |
| 5 | [[2, 'ambiguous'], 2] | [[2, 'retry'], 0] | Failed |
| 6 | [[0, 0], 0] | [[0, 0], 0] | Passed |
SHA-256 / b3eafb96231525fc0cbd2c203929ae97537b3f9f633a2919d85a3754584f0802
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
size=0; sent=0; phase='idle'; out=[]
for e in events:
if e[0]=='start':
size=e[1]; sent=1; phase='waiting'
elif e[0]=='interim':
if e[1]==100 and phase=='waiting': phase='allowed'
elif e[0]=='tick':
if phase=='waiting': phase='allowed'
elif e[0]=='send':
if phase!='allowed': out.append('blocked'); continue
count=min(e[1],size-sent)
sent+=count
out.append(count)
elif e[0]=='final':
phase='done'; out.append(['response',e[1]])
elif e[0]=='fail':
if phase=='done': out.append('terminal'); continue
phase='retry' if sent==0 else 'ambiguous'
out.append(phase)
elif e[0]=='retry':
if phase!='retry': out.append('denied'); continue
sent=0; phase='waiting'; out.append('restarted')
return [out,sent]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0])
check('1', solve([('start',N+3),('send',1),('interim',103),('send',1),('interim',100),('send',2),('send',N+3)]), [['blocked','blocked',2,N+1],N+3])
check('2', solve([('start',N),('fail',),('retry',),('send',1),('tick',),('send',N)]), [['retry','restarted','blocked',N],N])
check('3', solve([('start',2),('tick',),('send',1),('fail',),('retry',)]), [[1,'ambiguous','denied'],1])
check('4', solve([('start',N),('final',417),('interim',100),('tick',),('send',1),('fail',),('retry',)]), [[['response',417],'blocked','terminal','denied'],0])
check('5', solve([('start',2),('tick',),('send',2),('start',N),('fail',)]), [[2,'retry'],0])
check('6', solve([('start',0),('interim',100),('send',3),('send',0)]), [[0,0],0])
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 | [[], 0] | [[], 0] | Passed |
| 1 | [['blocked', 'blocked', 2, 1], 4] | [['blocked', 'blocked', 2, 2], 4] | Failed |
| 2 | [['ambiguous', 'denied', 'blocked', 'blocked'], 1] | [['retry', 'restarted', 'blocked', 1], 1] | Failed |
| 3 | [[1, 'ambiguous', 'denied'], 2] | [[1, 'ambiguous', 'denied'], 1] | Failed |
| 4 | [[['response', 417], 'blocked', 'terminal', 'denied'], 1] | [[['response', 417], 'blocked', 'terminal', 'denied'], 0] | Failed |
| 5 | [[1, 'ambiguous'], 1] | [[2, 'retry'], 0] | Failed |
| 6 | [[-1, 0], 0] | [[0, 0], 0] | Failed |
SHA-256 / aaede3370441640d200593ebaae339566c4a3e086b718dca53cce53605da3d5f
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:47.414631+00:00.
Case digest / 7abff4e34fe63b7948356766e90db61fab377f1fda47b6b04baa91f1d57ad8d2