FA-30721 / HTTP retries / Open access
Retry advice across wall and monotonic clocks: Absolute projection violates retry transition semantics · case 01
Absolute projection violates retry transition semantics
ROOT CAUSE
Absolute projection violates retry transition semantics
VERIFIED REPAIR
Restore the specified transition due=received+max(0,value-reference).
Unsuccessful approach: The attempted repair changes the faulty site to due=received+max(0,reference-value) 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[3]; 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=value
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 | [109, 107] | [5, 3] | Failed |
| 3 | [206] | [7] | Failed |
| 4 | [3, 3] | [3, 3] | Passed |
| 5 | ['ambiguous', 'missing'] | ['ambiguous', 'missing'] | Passed |
| 6 | [89, 79] | [0, 0] | Failed |
| 7 | [119] | [7] | Failed |
SHA-256 / 80bf809978cdf329bfb0401f2484e1686816c464f689ddc635c2289804a1f0de
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=e[3]; 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,reference-value)
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 | [0, 0] | [5, 3] | Failed |
| 3 | [0] | [7] | Failed |
| 4 | [3, 3] | [3, 3] | Passed |
| 5 | ['ambiguous', 'missing'] | ['ambiguous', 'missing'] | Passed |
| 6 | [10, 0] | [0, 0] | Failed |
| 7 | [0] | [7] | Failed |
SHA-256 / 072dc0ffed6c0a9919ee49f73456db406591280e4b44ca98d8c8bb1f6fe8a6d7
3 / The verified repair
Exit 0"""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[3]; 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, 3] | [5, 3] | Passed |
| 3 | [7] | [7] | Passed |
| 4 | [3, 3] | [3, 3] | Passed |
| 5 | ['ambiguous', 'missing'] | ['ambiguous', 'missing'] | Passed |
| 6 | [0, 0] | [0, 0] | Passed |
| 7 | [7] | [7] | Passed |
SHA-256 / c5d80a71e09011e5b2da8d8167a3d9840c344a144bf963595ab2a32e4ff54905
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.465385+00:00.
Case digest / b47720dd8431fb09babc587336ecc01b7a1d3a86ffbce76059133889df413238