FA-29951 / HTTP retries / Open access
Cancellation of queued retries: Cancelled schedule violates retry transition semantics · case 01
Cancelled schedule violates retry transition semantics
ROOT CAUSE
Cancelled schedule violates retry transition semantics
THE FAILURE
Cancelled schedule violates retry transition semantics
Unsuccessful approach: The attempted repair changes the faulty site to if e[1] in cancelled and e[2]==0: continue 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 False: 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'], ['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 / a7c44cfebdd2803d8f18292bac38f3b641b3b88927df89173dd128d78c3be486
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 and e[2]==0: 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'], ['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 / d7ff9a6473c320609af7fd16d92f51a0154ed710c3aabb3f1d454466514e6a24
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:48.869660+00:00.
Case digest / bf9930aa2d3dc88b745c8e5402d4edd16b94cb5b803187b73ff8cfa545fc046c