FA-30686 / HTTP retries / Open access
Retry advice across wall and monotonic clocks: Receive monotonic violates retry transition semantics · case 01
Receive monotonic violates retry transition semantics
ROOT CAUSE
Receive monotonic violates retry transition semantics
THE FAILURE
Receive monotonic violates retry transition semantics
Unsuccessful approach: The attempted repair changes the faulty site to received=0 but still violates a regression oracle.
Case contract
Controlled decoded Retry-After model. response(server Date or None,Age,received monotonic,local wall at receive) resets advice. delta(nonnegative seconds) or date(absolute seconds) records one advice; multiple advice values are rejected. For date, estimate server time as Date+Age, or local wall if Date absent. Project remaining server delay onto receive monotonic clock. advance moves monotonic time forward. schedule returns remaining wait or missing/ambiguous; no network requests or full header parsing.
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):
server=None; age=0; received=0; wall=0; now=0; advice=[]; out=[]
for e in events:
if e[0]=='response':
server=e[1]; age=e[2]; received=e[4]; wall=e[4]; now=received; advice=[]
elif e[0] in ('delta','date'): advice.append((e[0],e[1]))
elif e[0]=='advance': now=max(now,e[1])
elif e[0]=='schedule':
if not advice: out.append('missing'); continue
if len(advice)!=1: out.append('ambiguous'); continue
kind,value=advice[0]
if kind=='delta': due=received+value
else:
reference=server+age if server is not None else wall
due=received+max(0,value-reference)
out.append(max(0,due-now))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('response',100,0,N,200),('schedule',)]), ['missing'])
check('2', solve([('response',100,5,N,200),('date',110),('schedule',),('advance',N+2),('schedule',)]), [5,3])
check('3', solve([('response',None,99,N,200),('date',207),('schedule',)]), [7])
check('4', solve([('response',100,0,N,200),('delta',5),('advance',N+2),('schedule',),('advance',N),('schedule',)]), [3,3])
check('5', solve([('response',100,0,N,200),('delta',5),('delta',5),('schedule',),('response',100,0,N+1,200),('schedule',)]), ['ambiguous','missing'])
check('6', solve([('response',100,0,N,200),('date',90),('schedule',),('advance',N+10),('schedule',)]), [0,0])
check('7', solve([('response',100,13,N,200),('date',120),('schedule',)]), [7])
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 | [] | [] | Passed |
| 1 | ['missing'] | ['missing'] | Passed |
| 2 | [5, 5] | [5, 3] | Failed |
| 3 | [7] | [7] | Passed |
| 4 | [5, 5] | [3, 3] | Failed |
| 5 | ['ambiguous', 'missing'] | ['ambiguous', 'missing'] | Passed |
| 6 | [0, 0] | [0, 0] | Passed |
| 7 | [7] | [7] | Passed |
SHA-256 / 1a6d269d055b205fb932cce703ce5f369d3cfde976a6eaed47ba11f830dca69c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
server=None; age=0; received=0; wall=0; now=0; advice=[]; out=[]
for e in events:
if e[0]=='response':
server=e[1]; age=e[2]; received=0; wall=e[4]; now=received; advice=[]
elif e[0] in ('delta','date'): advice.append((e[0],e[1]))
elif e[0]=='advance': now=max(now,e[1])
elif e[0]=='schedule':
if not advice: out.append('missing'); continue
if len(advice)!=1: out.append('ambiguous'); continue
kind,value=advice[0]
if kind=='delta': due=received+value
else:
reference=server+age if server is not None else wall
due=received+max(0,value-reference)
out.append(max(0,due-now))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([]), [])
check('1', solve([('response',100,0,N,200),('schedule',)]), ['missing'])
check('2', solve([('response',100,5,N,200),('date',110),('schedule',),('advance',N+2),('schedule',)]), [5,3])
check('3', solve([('response',None,99,N,200),('date',207),('schedule',)]), [7])
check('4', solve([('response',100,0,N,200),('delta',5),('advance',N+2),('schedule',),('advance',N),('schedule',)]), [3,3])
check('5', solve([('response',100,0,N,200),('delta',5),('delta',5),('schedule',),('response',100,0,N+1,200),('schedule',)]), ['ambiguous','missing'])
check('6', solve([('response',100,0,N,200),('date',90),('schedule',),('advance',N+10),('schedule',)]), [0,0])
check('7', solve([('response',100,13,N,200),('date',120),('schedule',)]), [7])
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 | [] | [] | Passed |
| 1 | ['missing'] | ['missing'] | Passed |
| 2 | [5, 2] | [5, 3] | Failed |
| 3 | [7] | [7] | Passed |
| 4 | [2, 2] | [3, 3] | Failed |
| 5 | ['ambiguous', 'missing'] | ['ambiguous', 'missing'] | Passed |
| 6 | [0, 0] | [0, 0] | Passed |
| 7 | [7] | [7] | Passed |
SHA-256 / 23306cefd896eaf11e2205903a5e46ba71d29e4d6c5fb52cc565436d4c388da2
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:55.470382+00:00.
Case digest / f497ee739d936f7cfa945a93f9668c71078a6c9f7e3bb8db48e50a62fdef12db