FA-27226 / HTTP ranges / Open access
Concurrent download clients share bounded origin range reads: scheduling consumes only the dispatched chunk from the request · case 01
Concurrent download clients share bounded origin range reads: scheduling consumes only the dispatched chunk from the request.
ROOT CAUSE
The range-fetch-round-robin-remaining-count decision uses queues={} order=[] for client,start,count,cancelled in x['jobs']: if cancelled or count==0: continue if client not in queues: queues[client]=[] order.append(client) queues[client].append([start,count]) out=[] for slot in range(x['slots']): if not order: break client=order.pop(0) start,count=queues[client][0] amount=min(count,x['chunk']) out.append([client,start,amount]) if amount==count: queues[client].pop(0) else: queues[client][0]=[start+amount,count] if queues[client]: order.append(client) pending=[[client,start,count] for client in order for start,count in queues[client]] return [out,pending].
THE FAILURE
The range-fetch-round-robin-remaining-count decision uses queues={} order=[] for client,start,count,cancelled in x['jobs']: if cancelled or count==0: continue if client not in queues: queues[client]=[] order.append(client) queues[client].append([start,count]) out=[] for slot in range(x['slots']): if not order: break client=order.pop(0) start,count=queues[client][0] amount=min(count,x['chunk']) out.append([client,start,amount]) if amount==count: queues[client].pop(0) else: queues[client][0]=[start+amount,count] if queues[client]: order.append(client) pending=[[client,start,count] for client in order for start,count in queues[client]] return [out,pending].
Unsuccessful approach: The partial repair uses queues={} order=[] for client,start,count,cancelled in x['jobs']: if cancelled or count==0: continue if client not in queues: queues[client]=[] order.append(client) queues[client].append([start,count]) out=[] for slot in range(x['slots']): if not order: break client=order.pop(0) start,count=queues[client][0] amount=min(count,x['chunk']) out.append([client,start,amount]) if amount==count: queues[client].pop(0) else: queues[client][0]=[start+amount,amount] if queues[client]: order.append(client) pending=[[client,start,count] for client in order for start,count in queues[client]] return [out,pending], which still violates the stated contract.
Case contract
x contains ordered jobs [client,absolute-start,count,cancelled], positive chunk size, and dispatch slot count. Drop canceled and zero-length jobs. Maintain first-appearance client order; each client has FIFO requests. Dispatch at most one chunk per client per round, rotate unfinished clients, split long ranges, and remove exhausted requests. Return [dispatches,pending-jobs], where dispatches are [client,start,count] and pending jobs retain scheduler order. This models range-specific origin request scheduling, without network retries.
Why this case matters
Range responses combine representation identity, conditional requests, framing, and partial-object state.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
queues={}
order=[]
for client,start,count,cancelled in x['jobs']:
if cancelled or count==0: continue
if client not in queues:
queues[client]=[]
order.append(client)
queues[client].append([start,count])
out=[]
for slot in range(x['slots']):
if not order: break
client=order.pop(0)
start,count=queues[client][0]
amount=min(count,x['chunk'])
out.append([client,start,amount])
if amount==count:
queues[client].pop(0)
else:
queues[client][0]=[start+amount,count]
if queues[client]: order.append(client)
pending=[[client,start,count] for client in order for start,count in queues[client]]
return [out,pending]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remaining-count fixture 0', json.loads(json.dumps(solve({'jobs':[['a',0,5,False],['b',10,2,False]],'chunk':2,'slots':4}))), json.loads(json.dumps([[['a',0,2],['b',10,2],['a',2,2],['a',4,1]],[]])))
check('remaining-count fixture 1', json.loads(json.dumps(solve({'jobs':[['b',10,2,False],['a',0,2,False]],'chunk':1,'slots':2}))), json.loads(json.dumps([[['b',10,1],['a',0,1]],[['b',11,1],['a',1,1]]])))
check('remaining-count fixture 2', json.loads(json.dumps(solve({'jobs':[['a',0,0,False],['b',10,2,True]],'chunk':1,'slots':2}))), json.loads(json.dumps([[],[]])))
check('remaining-count fixture 3', json.loads(json.dumps(solve({'jobs':[['a',0,2,False],['a',9,1,False],['b',4,1,False]],'chunk':2,'slots':2}))), json.loads(json.dumps([[['a',0,2],['b',4,1]],[['a',9,1]]])))
check('remaining-count fixture 4', json.loads(json.dumps(solve({'jobs':[['a',0,2,False]],'chunk':2,'slots':0}))), json.loads(json.dumps([[],[['a',0,2]]])))
check('remaining-count fixture 5', json.loads(json.dumps(solve({'jobs':[['a',0,2,False],['a',8,1,False]],'chunk':2,'slots':0}))), json.loads(json.dumps([[],[['a',0,2],['a',8,1]]])))
check('remaining-count fixture 6', json.loads(json.dumps(solve({'jobs':[['a',N,N+1,False]],'chunk':N,'slots':1}))), json.loads(json.dumps([[['a',N,N]],[['a',2*N,1]]])))
check('remaining-count fixture 7', json.loads(json.dumps(solve({'jobs':[['a',0,1,False]],'chunk':3,'slots':2}))), json.loads(json.dumps([[['a',0,1]],[]])))
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 |
|---|---|---|---|
| remaining-count fixture 0 | [[['a', 0, 2], ['b', 10, 2], ['a', 2, 2], ['a', 4, 2]], [['a', 6, 5]]] | [[['a', 0, 2], ['b', 10, 2], ['a', 2, 2], ['a', 4, 1]], []] | Failed |
| remaining-count fixture 1 | [[['b', 10, 1], ['a', 0, 1]], [['b', 11, 2], ['a', 1, 2]]] | [[['b', 10, 1], ['a', 0, 1]], [['b', 11, 1], ['a', 1, 1]]] | Failed |
| remaining-count fixture 2 | [[], []] | [[], []] | Passed |
| remaining-count fixture 3 | [[['a', 0, 2], ['b', 4, 1]], [['a', 9, 1]]] | [[['a', 0, 2], ['b', 4, 1]], [['a', 9, 1]]] | Passed |
| remaining-count fixture 4 | [[], [['a', 0, 2]]] | [[], [['a', 0, 2]]] | Passed |
| remaining-count fixture 5 | [[], [['a', 0, 2], ['a', 8, 1]]] | [[], [['a', 0, 2], ['a', 8, 1]]] | Passed |
| remaining-count fixture 6 | [[['a', 1, 1]], [['a', 2, 2]]] | [[['a', 1, 1]], [['a', 2, 1]]] | Failed |
| remaining-count fixture 7 | [[['a', 0, 1]], []] | [[['a', 0, 1]], []] | Passed |
SHA-256 / b37dd032d0f33334247de826710421c22e773f2a0f9ddd05cbf9e8726a7ee48a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
queues={}
order=[]
for client,start,count,cancelled in x['jobs']:
if cancelled or count==0: continue
if client not in queues:
queues[client]=[]
order.append(client)
queues[client].append([start,count])
out=[]
for slot in range(x['slots']):
if not order: break
client=order.pop(0)
start,count=queues[client][0]
amount=min(count,x['chunk'])
out.append([client,start,amount])
if amount==count:
queues[client].pop(0)
else:
queues[client][0]=[start+amount,amount]
if queues[client]: order.append(client)
pending=[[client,start,count] for client in order for start,count in queues[client]]
return [out,pending]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remaining-count fixture 0', json.loads(json.dumps(solve({'jobs':[['a',0,5,False],['b',10,2,False]],'chunk':2,'slots':4}))), json.loads(json.dumps([[['a',0,2],['b',10,2],['a',2,2],['a',4,1]],[]])))
check('remaining-count fixture 1', json.loads(json.dumps(solve({'jobs':[['b',10,2,False],['a',0,2,False]],'chunk':1,'slots':2}))), json.loads(json.dumps([[['b',10,1],['a',0,1]],[['b',11,1],['a',1,1]]])))
check('remaining-count fixture 2', json.loads(json.dumps(solve({'jobs':[['a',0,0,False],['b',10,2,True]],'chunk':1,'slots':2}))), json.loads(json.dumps([[],[]])))
check('remaining-count fixture 3', json.loads(json.dumps(solve({'jobs':[['a',0,2,False],['a',9,1,False],['b',4,1,False]],'chunk':2,'slots':2}))), json.loads(json.dumps([[['a',0,2],['b',4,1]],[['a',9,1]]])))
check('remaining-count fixture 4', json.loads(json.dumps(solve({'jobs':[['a',0,2,False]],'chunk':2,'slots':0}))), json.loads(json.dumps([[],[['a',0,2]]])))
check('remaining-count fixture 5', json.loads(json.dumps(solve({'jobs':[['a',0,2,False],['a',8,1,False]],'chunk':2,'slots':0}))), json.loads(json.dumps([[],[['a',0,2],['a',8,1]]])))
check('remaining-count fixture 6', json.loads(json.dumps(solve({'jobs':[['a',N,N+1,False]],'chunk':N,'slots':1}))), json.loads(json.dumps([[['a',N,N]],[['a',2*N,1]]])))
check('remaining-count fixture 7', json.loads(json.dumps(solve({'jobs':[['a',0,1,False]],'chunk':3,'slots':2}))), json.loads(json.dumps([[['a',0,1]],[]])))
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 |
|---|---|---|---|
| remaining-count fixture 0 | [[['a', 0, 2], ['b', 10, 2], ['a', 2, 2]], []] | [[['a', 0, 2], ['b', 10, 2], ['a', 2, 2], ['a', 4, 1]], []] | Failed |
| remaining-count fixture 1 | [[['b', 10, 1], ['a', 0, 1]], [['b', 11, 1], ['a', 1, 1]]] | [[['b', 10, 1], ['a', 0, 1]], [['b', 11, 1], ['a', 1, 1]]] | Passed |
| remaining-count fixture 2 | [[], []] | [[], []] | Passed |
| remaining-count fixture 3 | [[['a', 0, 2], ['b', 4, 1]], [['a', 9, 1]]] | [[['a', 0, 2], ['b', 4, 1]], [['a', 9, 1]]] | Passed |
| remaining-count fixture 4 | [[], [['a', 0, 2]]] | [[], [['a', 0, 2]]] | Passed |
| remaining-count fixture 5 | [[], [['a', 0, 2], ['a', 8, 1]]] | [[], [['a', 0, 2], ['a', 8, 1]]] | Passed |
| remaining-count fixture 6 | [[['a', 1, 1]], [['a', 2, 1]]] | [[['a', 1, 1]], [['a', 2, 1]]] | Passed |
| remaining-count fixture 7 | [[['a', 0, 1]], []] | [[['a', 0, 1]], []] | Passed |
SHA-256 / 4283d1e53185d6de13e54ae25e6ee0ec72b1b98de31dbfc5afc6cfd846fcaa8b
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
Deterministic simplified range service, with stipulated local policies and already parsed trusted inputs; not a complete HTTP implementation. 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:23.281761+00:00.
Case digest / 795175ec61609f72d02182795e53ac643bfdf56d6fb018b192514b557308edb3