FA-30421 / HTTP retries / Open access
Logical request deadline across retry phases: Wake expiry violates retry transition semantics · case 01
Wake expiry violates retry transition semantics
ROOT CAUSE
Wake expiry violates retry transition semantics
THE FAILURE
Wake expiry violates retry transition semantics
Unsuccessful approach: The attempted repair changes the faulty site to if False: state='expired'; due=None but still violates a regression oracle.
Case contract
begin(now,budget) pins a logical deadline. advance(time) uses monotonic logical time. queue(delay) schedules retry only for live request, wake starts only after due and strictly before deadline, complete succeeds only for running attempt before deadline. finish/cancel are terminal. Admission at expired time reports expired and closes request; queue never extends deadline. Return scheduling/attempt dispositions.
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):
now=0; deadline=0; due=None; state='idle'; out=[]
for e in events:
if e[0]=='begin':
now=e[1]; deadline=now+e[2]; due=None; state='ready'
elif e[0]=='advance': now=max(now,e[1])
elif e[0]=='cancel': state='cancelled'; due=None
elif e[0]=='queue':
if state not in ('ready','failed'): out.append('blocked'); continue
if now>=deadline: state='expired'; out.append('expired'); continue
due=now+e[1]; state='queued'; out.append(['queued',due])
elif e[0]=='wake':
if state!='queued': out.append('blocked'); continue
if now>deadline: state='expired'; due=None; out.append('expired'); continue
if now<due: out.append('early'); continue
state='running'; due=None; out.append('started')
elif e[0]=='fail':
if state=='running': state='failed'
elif e[0]=='complete':
if state!='running': out.append('blocked'); continue
if now>=deadline: state='expired'; out.append('expired'); continue
state='done'; out.append('success')
return [out,deadline,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0,'idle'])
check('1', solve([('begin',N,5),('queue',2),('wake',),('advance',N+2),('wake',),('complete',),('queue',0)]), [[['queued',N+2],'early','started','success','blocked'],N+5,'done'])
check('2', solve([('begin',N,2),('queue',2),('advance',N+2),('wake',)]), [[['queued',N+2],'expired'],N+2,'expired'])
check('3', solve([('begin',N,2),('advance',N+2),('queue',0)]), [['expired'],N+2,'expired'])
check('4', solve([('begin',N,2),('queue',0),('wake',),('advance',N+2),('complete',)]), [[['queued',N],'started','expired'],N+2,'expired'])
check('5', solve([('begin',N,5),('queue',0),('wake',),('fail',),('queue',1),('advance',N+1),('wake',),('cancel',),('queue',0)]), [[['queued',N],'started',['queued',N+1],'started','blocked'],N+5,'cancelled'])
check('6', solve([('begin',N,2),('advance',N+3),('advance',N),('queue',0)]), [['expired'],N+2,'expired'])
check('7', solve([('begin',N,3),('cancel',),('fail',),('queue',0)]), [['blocked'],N+3,'cancelled'])
check('8', solve([('begin',N,5),('queue',0),('wake',),('fail',)]), [[['queued',N],'started'],N+5,'failed'])
check('9', solve([('begin',N,5),('cancel',),('wake',)]), [['blocked'],N+5,'cancelled'])
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, 'idle'] | [[], 0, 'idle'] | Passed |
| 1 | [[['queued', 3], 'early', 'started', 'success', 'blocked'], 6, 'done'] | [[['queued', 3], 'early', 'started', 'success', 'blocked'], 6, 'done'] | Passed |
| 2 | [[['queued', 3], 'started'], 3, 'running'] | [[['queued', 3], 'expired'], 3, 'expired'] | Failed |
| 3 | [['expired'], 3, 'expired'] | [['expired'], 3, 'expired'] | Passed |
| 4 | [[['queued', 1], 'started', 'expired'], 3, 'expired'] | [[['queued', 1], 'started', 'expired'], 3, 'expired'] | Passed |
| 5 | [[['queued', 1], 'started', ['queued', 2], 'started', 'blocked'], 6, 'cancelled'] | [[['queued', 1], 'started', ['queued', 2], 'started', 'blocked'], 6, 'cancelled'] | Passed |
| 6 | [['expired'], 3, 'expired'] | [['expired'], 3, 'expired'] | Passed |
| 7 | [['blocked'], 4, 'cancelled'] | [['blocked'], 4, 'cancelled'] | Passed |
| 8 | [[['queued', 1], 'started'], 6, 'failed'] | [[['queued', 1], 'started'], 6, 'failed'] | Passed |
| 9 | [['blocked'], 6, 'cancelled'] | [['blocked'], 6, 'cancelled'] | Passed |
SHA-256 / 2da345b9f2ea6a2920e345f766acb4bd11307664f416ddda1982b66fc5b7ce14
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
now=0; deadline=0; due=None; state='idle'; out=[]
for e in events:
if e[0]=='begin':
now=e[1]; deadline=now+e[2]; due=None; state='ready'
elif e[0]=='advance': now=max(now,e[1])
elif e[0]=='cancel': state='cancelled'; due=None
elif e[0]=='queue':
if state not in ('ready','failed'): out.append('blocked'); continue
if now>=deadline: state='expired'; out.append('expired'); continue
due=now+e[1]; state='queued'; out.append(['queued',due])
elif e[0]=='wake':
if state!='queued': out.append('blocked'); continue
if False: state='expired'; due=None; out.append('expired'); continue
if now<due: out.append('early'); continue
state='running'; due=None; out.append('started')
elif e[0]=='fail':
if state=='running': state='failed'
elif e[0]=='complete':
if state!='running': out.append('blocked'); continue
if now>=deadline: state='expired'; out.append('expired'); continue
state='done'; out.append('success')
return [out,deadline,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [[],0,'idle'])
check('1', solve([('begin',N,5),('queue',2),('wake',),('advance',N+2),('wake',),('complete',),('queue',0)]), [[['queued',N+2],'early','started','success','blocked'],N+5,'done'])
check('2', solve([('begin',N,2),('queue',2),('advance',N+2),('wake',)]), [[['queued',N+2],'expired'],N+2,'expired'])
check('3', solve([('begin',N,2),('advance',N+2),('queue',0)]), [['expired'],N+2,'expired'])
check('4', solve([('begin',N,2),('queue',0),('wake',),('advance',N+2),('complete',)]), [[['queued',N],'started','expired'],N+2,'expired'])
check('5', solve([('begin',N,5),('queue',0),('wake',),('fail',),('queue',1),('advance',N+1),('wake',),('cancel',),('queue',0)]), [[['queued',N],'started',['queued',N+1],'started','blocked'],N+5,'cancelled'])
check('6', solve([('begin',N,2),('advance',N+3),('advance',N),('queue',0)]), [['expired'],N+2,'expired'])
check('7', solve([('begin',N,3),('cancel',),('fail',),('queue',0)]), [['blocked'],N+3,'cancelled'])
check('8', solve([('begin',N,5),('queue',0),('wake',),('fail',)]), [[['queued',N],'started'],N+5,'failed'])
check('9', solve([('begin',N,5),('cancel',),('wake',)]), [['blocked'],N+5,'cancelled'])
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, 'idle'] | [[], 0, 'idle'] | Passed |
| 1 | [[['queued', 3], 'early', 'started', 'success', 'blocked'], 6, 'done'] | [[['queued', 3], 'early', 'started', 'success', 'blocked'], 6, 'done'] | Passed |
| 2 | [[['queued', 3], 'started'], 3, 'running'] | [[['queued', 3], 'expired'], 3, 'expired'] | Failed |
| 3 | [['expired'], 3, 'expired'] | [['expired'], 3, 'expired'] | Passed |
| 4 | [[['queued', 1], 'started', 'expired'], 3, 'expired'] | [[['queued', 1], 'started', 'expired'], 3, 'expired'] | Passed |
| 5 | [[['queued', 1], 'started', ['queued', 2], 'started', 'blocked'], 6, 'cancelled'] | [[['queued', 1], 'started', ['queued', 2], 'started', 'blocked'], 6, 'cancelled'] | Passed |
| 6 | [['expired'], 3, 'expired'] | [['expired'], 3, 'expired'] | Passed |
| 7 | [['blocked'], 4, 'cancelled'] | [['blocked'], 4, 'cancelled'] | Passed |
| 8 | [[['queued', 1], 'started'], 6, 'failed'] | [[['queued', 1], 'started'], 6, 'failed'] | Passed |
| 9 | [['blocked'], 6, 'cancelled'] | [['blocked'], 6, 'cancelled'] | Passed |
SHA-256 / 218399c0b73b008d8c58b9680ce6145844b914ca8f725f713a0824dcd0321167
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 10 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:53.013934+00:00.
Case digest / 6801080bd68c215b88cf92386413b5a70f6be724cc1a101460b2b7546fe2c7dc