FA-29966 / HTTP retries / Open access
Cancellation of queued retries: Cancel sticky violates retry transition semantics · case 01
Cancel sticky violates retry transition semantics
ROOT CAUSE
Cancel sticky violates retry transition semantics
VERIFIED REPAIR
Restore the specified transition cancelled.add(e[1]).
Unsuccessful approach: The attempted repair changes the faulty site to cancelled.add("all") but still violates a regression oracle.
Case contract
schedule(id,due) replaces an existing queued retry for that ID. cancel(id) removes it and permanently cancels that logical request. poll(now) starts every due noncancelled retry ordered by due then ID and removes it before execution. finish records completion only for running retries. Cancelling running work removes running status; its late completion is ignored. Return start/finish events and pending/running IDs.
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):
queued={}; running=set(); cancelled=set(); out=[]
for e in events:
if e[0]=='schedule':
if e[1] in cancelled: continue
if e[1] in running: continue
queued[e[1]]=e[2]
elif e[0]=='cancel':
cancelled.discard(e[1])
queued.pop(e[1],None)
running.discard(e[1])
elif e[0]=='poll':
ready=sorted((due,k) for k,due in queued.items() if due<=e[1])
for due,k in ready:
queued.pop(k)
running.add(k)
out.append(['start',k])
elif e[0]=='finish':
if e[1] not in running: continue
running.remove(e[1])
out.append(['finish',e[1]])
return [out,sorted(queued),sorted(running)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([('schedule','a',1),('schedule','a',N+5),('poll',1),('cancel','a'),('poll',N+5)]), [[],[],[]])
check('1', solve([]), [[],[],[]])
check('2', solve([('schedule','b',N),('schedule','a',N),('poll',N),('poll',N),('finish','a'),('finish','a')]), [[['start','a'],['start','b'],['finish','a']],[],['b']])
check('3', solve([('schedule','a',1),('schedule','a',N+5),('poll',1),('poll',N+5)]), [[['start','a']],[],['a']])
check('4', solve([('schedule','a',1),('schedule','b',2),('cancel','a'),('schedule','a',3),('poll',5)]), [[['start','b']],[],['b']])
check('5', solve([('schedule','a',1),('schedule','b',1),('poll',1),('cancel','a'),('finish','a')]), [[['start','a'],['start','b']],[],['b']])
check('6', solve([('schedule','a',1),('poll',1),('schedule','a',3),('poll',3),('finish','z')]), [[['start','a']],[],['a']])
check('7', solve([('schedule','z',1),('schedule','a',2),('poll',3)]), [[['start','z'],['start','a']],[],['a','z']])
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 | [[], [], []] | [[], [], []] | Passed |
| 2 | [[['start', 'a'], ['start', 'b'], ['finish', 'a']], [], ['b']] | [[['start', 'a'], ['start', 'b'], ['finish', 'a']], [], ['b']] | Passed |
| 3 | [[['start', 'a']], [], ['a']] | [[['start', 'a']], [], ['a']] | Passed |
| 4 | [[['start', 'b'], ['start', 'a']], [], ['a', 'b']] | [[['start', 'b']], [], ['b']] | Failed |
| 5 | [[['start', 'a'], ['start', 'b']], [], ['b']] | [[['start', 'a'], ['start', 'b']], [], ['b']] | Passed |
| 6 | [[['start', 'a']], [], ['a']] | [[['start', 'a']], [], ['a']] | Passed |
| 7 | [[['start', 'z'], ['start', 'a']], [], ['a', 'z']] | [[['start', 'z'], ['start', 'a']], [], ['a', 'z']] | Passed |
SHA-256 / 8f318cfc046197bf8318fc12f79f40550807b6fe6c39a131f2676212b5b17098
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
queued={}; running=set(); cancelled=set(); out=[]
for e in events:
if e[0]=='schedule':
if e[1] in cancelled: continue
if e[1] in running: continue
queued[e[1]]=e[2]
elif e[0]=='cancel':
cancelled.add("all")
queued.pop(e[1],None)
running.discard(e[1])
elif e[0]=='poll':
ready=sorted((due,k) for k,due in queued.items() if due<=e[1])
for due,k in ready:
queued.pop(k)
running.add(k)
out.append(['start',k])
elif e[0]=='finish':
if e[1] not in running: continue
running.remove(e[1])
out.append(['finish',e[1]])
return [out,sorted(queued),sorted(running)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([('schedule','a',1),('schedule','a',N+5),('poll',1),('cancel','a'),('poll',N+5)]), [[],[],[]])
check('1', solve([]), [[],[],[]])
check('2', solve([('schedule','b',N),('schedule','a',N),('poll',N),('poll',N),('finish','a'),('finish','a')]), [[['start','a'],['start','b'],['finish','a']],[],['b']])
check('3', solve([('schedule','a',1),('schedule','a',N+5),('poll',1),('poll',N+5)]), [[['start','a']],[],['a']])
check('4', solve([('schedule','a',1),('schedule','b',2),('cancel','a'),('schedule','a',3),('poll',5)]), [[['start','b']],[],['b']])
check('5', solve([('schedule','a',1),('schedule','b',1),('poll',1),('cancel','a'),('finish','a')]), [[['start','a'],['start','b']],[],['b']])
check('6', solve([('schedule','a',1),('poll',1),('schedule','a',3),('poll',3),('finish','z')]), [[['start','a']],[],['a']])
check('7', solve([('schedule','z',1),('schedule','a',2),('poll',3)]), [[['start','z'],['start','a']],[],['a','z']])
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 | [[], [], []] | [[], [], []] | Passed |
| 2 | [[['start', 'a'], ['start', 'b'], ['finish', 'a']], [], ['b']] | [[['start', 'a'], ['start', 'b'], ['finish', 'a']], [], ['b']] | Passed |
| 3 | [[['start', 'a']], [], ['a']] | [[['start', 'a']], [], ['a']] | Passed |
| 4 | [[['start', 'b'], ['start', 'a']], [], ['a', 'b']] | [[['start', 'b']], [], ['b']] | Failed |
| 5 | [[['start', 'a'], ['start', 'b']], [], ['b']] | [[['start', 'a'], ['start', 'b']], [], ['b']] | Passed |
| 6 | [[['start', 'a']], [], ['a']] | [[['start', 'a']], [], ['a']] | Passed |
| 7 | [[['start', 'z'], ['start', 'a']], [], ['a', 'z']] | [[['start', 'z'], ['start', 'a']], [], ['a', 'z']] | Passed |
SHA-256 / 13a19cd9e58d65561aa033c9faf41edfcdc420339ba063c78049f1daeda88db0
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events):
queued={}; running=set(); cancelled=set(); out=[]
for e in events:
if e[0]=='schedule':
if e[1] in cancelled: continue
if e[1] in running: continue
queued[e[1]]=e[2]
elif e[0]=='cancel':
cancelled.add(e[1])
queued.pop(e[1],None)
running.discard(e[1])
elif e[0]=='poll':
ready=sorted((due,k) for k,due in queued.items() if due<=e[1])
for due,k in ready:
queued.pop(k)
running.add(k)
out.append(['start',k])
elif e[0]=='finish':
if e[1] not in running: continue
running.remove(e[1])
out.append(['finish',e[1]])
return [out,sorted(queued),sorted(running)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('0', solve([('schedule','a',1),('schedule','a',N+5),('poll',1),('cancel','a'),('poll',N+5)]), [[],[],[]])
check('1', solve([]), [[],[],[]])
check('2', solve([('schedule','b',N),('schedule','a',N),('poll',N),('poll',N),('finish','a'),('finish','a')]), [[['start','a'],['start','b'],['finish','a']],[],['b']])
check('3', solve([('schedule','a',1),('schedule','a',N+5),('poll',1),('poll',N+5)]), [[['start','a']],[],['a']])
check('4', solve([('schedule','a',1),('schedule','b',2),('cancel','a'),('schedule','a',3),('poll',5)]), [[['start','b']],[],['b']])
check('5', solve([('schedule','a',1),('schedule','b',1),('poll',1),('cancel','a'),('finish','a')]), [[['start','a'],['start','b']],[],['b']])
check('6', solve([('schedule','a',1),('poll',1),('schedule','a',3),('poll',3),('finish','z')]), [[['start','a']],[],['a']])
check('7', solve([('schedule','z',1),('schedule','a',2),('poll',3)]), [[['start','z'],['start','a']],[],['a','z']])
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 | [[], [], []] | [[], [], []] | Passed |
| 2 | [[['start', 'a'], ['start', 'b'], ['finish', 'a']], [], ['b']] | [[['start', 'a'], ['start', 'b'], ['finish', 'a']], [], ['b']] | Passed |
| 3 | [[['start', 'a']], [], ['a']] | [[['start', 'a']], [], ['a']] | Passed |
| 4 | [[['start', 'b']], [], ['b']] | [[['start', 'b']], [], ['b']] | Passed |
| 5 | [[['start', 'a'], ['start', 'b']], [], ['b']] | [[['start', 'a'], ['start', 'b']], [], ['b']] | Passed |
| 6 | [[['start', 'a']], [], ['a']] | [[['start', 'a']], [], ['a']] | Passed |
| 7 | [[['start', 'z'], ['start', 'a']], [], ['a', 'z']] | [[['start', 'z'], ['start', 'a']], [], ['a', 'z']] | Passed |
SHA-256 / 3a7527174aaf8aa72ac918b252ef08a54dbbcd638d1685afc44c535cb9e9739f
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:48.270305+00:00.
Case digest / e4876d91ec50ab2b2a513262ccd49eb10db772bfb4d44a4d65e011a49b941ceb