FA-27806 / HTTP ranges / Open access
An object store maps upload part numbers and byte ranges onto stored parts: part numbers are one-based and positive · case 01
An object store maps upload part numbers and byte ranges onto stored parts: part numbers are one-based and positive.
ROOT CAUSE
The part-number-range-map-part-number-domain decision uses sizes=x['parts'] total=sum(sizes) starts=[] acc=0 for s in sizes: starts.append(acc) acc+=s q=x['query'] if q[0]=='part': n=q[1] if not 0<=n<=len(sizes) or sizes[n-1]==0: return [416,'bytes */%d'%total] a=starts[n-1] return [206,'bytes %d-%d/%d'%(a,a+sizes[n-1]-1,total)] a,b=q[1],q[2] if not 0<=a<=b<total: return [416,'bytes */%d'%total] out=[] for i,s in enumerate(sizes): lo=max(a,starts[i]) hi=min(b,starts[i]+s-1) if lo<=hi: out.append([i+1,lo-starts[i],hi-lo+1]) return [206,out].
THE FAILURE
The part-number-range-map-part-number-domain decision uses sizes=x['parts'] total=sum(sizes) starts=[] acc=0 for s in sizes: starts.append(acc) acc+=s q=x['query'] if q[0]=='part': n=q[1] if not 0<=n<=len(sizes) or sizes[n-1]==0: return [416,'bytes */%d'%total] a=starts[n-1] return [206,'bytes %d-%d/%d'%(a,a+sizes[n-1]-1,total)] a,b=q[1],q[2] if not 0<=a<=b<total: return [416,'bytes */%d'%total] out=[] for i,s in enumerate(sizes): lo=max(a,starts[i]) hi=min(b,starts[i]+s-1) if lo<=hi: out.append([i+1,lo-starts[i],hi-lo+1]) return [206,out].
Unsuccessful approach: The partial repair uses sizes=x['parts'] total=sum(sizes) starts=[] acc=0 for s in sizes: starts.append(acc) acc+=s q=x['query'] if q[0]=='part': n=q[1] if not n<=len(sizes) or sizes[n-1]==0: return [416,'bytes */%d'%total] a=starts[n-1] return [206,'bytes %d-%d/%d'%(a,a+sizes[n-1]-1,total)] a,b=q[1],q[2] if not 0<=a<=b<total: return [416,'bytes */%d'%total] out=[] for i,s in enumerate(sizes): lo=max(a,starts[i]) hi=min(b,starts[i]+s-1) if lo<=hi: out.append([i+1,lo-starts[i],hi-lo+1]) return [206,out], which still violates the stated contract.
Case contract
x has stored part sizes in order and a query. ["part",n] (1-based) returns [206,bytes a-b/total] for that part, or [416,bytes */total] when n is outside 1..count or the part is empty. ["range",a,b] with inclusive bounds returns [416,bytes */total] unless 0<=a<=b<total; otherwise [206,rows] where each intersecting nonempty part yields [part-number,offset-within-part,count] in part order.
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):
sizes=x['parts']
total=sum(sizes)
starts=[]
acc=0
for s in sizes:
starts.append(acc)
acc+=s
q=x['query']
if q[0]=='part':
n=q[1]
if not 0<=n<=len(sizes) or sizes[n-1]==0: return [416,'bytes */%d'%total]
a=starts[n-1]
return [206,'bytes %d-%d/%d'%(a,a+sizes[n-1]-1,total)]
a,b=q[1],q[2]
if not 0<=a<=b<total: return [416,'bytes */%d'%total]
out=[]
for i,s in enumerate(sizes):
lo=max(a,starts[i])
hi=min(b,starts[i]+s-1)
if lo<=hi: out.append([i+1,lo-starts[i],hi-lo+1])
return [206,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('part-number-domain fixture 0', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',2]}))), json.loads(json.dumps([206,'bytes 5-7/12'])))
check('part-number-domain fixture 1', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',3]}))), json.loads(json.dumps([206,'bytes 8-11/12'])))
check('part-number-domain fixture 2', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',0]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 3', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',-1]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 4', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',4]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 5', json.loads(json.dumps(solve({'parts':[5,0,4],'query':['part',2]}))), json.loads(json.dumps([416,'bytes */9'])))
check('part-number-domain fixture 6', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',3,9]}))), json.loads(json.dumps([206,[[1,3,2],[2,0,3],[3,0,2]]])))
check('part-number-domain fixture 7', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',4,5]}))), json.loads(json.dumps([206,[[1,4,1],[2,0,1]]])))
check('part-number-domain fixture 8', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',5,7]}))), json.loads(json.dumps([206,[[2,0,3]]])))
check('part-number-domain fixture 9', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',0,12]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 10', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',0,11]}))), json.loads(json.dumps([206,[[1,0,5],[2,0,3],[3,0,4]]])))
check('part-number-domain fixture 11', json.loads(json.dumps(solve({'parts':[5,0,4],'query':['range',4,5]}))), json.loads(json.dumps([206,[[1,4,1],[3,0,1]]])))
check('part-number-domain fixture 12', json.loads(json.dumps(solve({'parts':[],'query':['part',1]}))), json.loads(json.dumps([416,'bytes */0'])))
check('part-number-domain fixture 13', json.loads(json.dumps(solve({'parts':[N,N],'query':['part',2]}))), json.loads(json.dumps([206,"bytes %d-%d/%d"%(N,2*N-1,2*N)])))
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 |
|---|---|---|---|
| part-number-domain fixture 0 | [206, 'bytes 5-7/12'] | [206, 'bytes 5-7/12'] | Passed |
| part-number-domain fixture 1 | [206, 'bytes 8-11/12'] | [206, 'bytes 8-11/12'] | Passed |
| part-number-domain fixture 2 | [206, 'bytes 8-11/12'] | [416, 'bytes */12'] | Failed |
| part-number-domain fixture 3 | [416, 'bytes */12'] | [416, 'bytes */12'] | Passed |
| part-number-domain fixture 4 | [416, 'bytes */12'] | [416, 'bytes */12'] | Passed |
| part-number-domain fixture 5 | [416, 'bytes */9'] | [416, 'bytes */9'] | Passed |
| part-number-domain fixture 6 | [206, [[1, 3, 2], [2, 0, 3], [3, 0, 2]]] | [206, [[1, 3, 2], [2, 0, 3], [3, 0, 2]]] | Passed |
| part-number-domain fixture 7 | [206, [[1, 4, 1], [2, 0, 1]]] | [206, [[1, 4, 1], [2, 0, 1]]] | Passed |
| part-number-domain fixture 8 | [206, [[2, 0, 3]]] | [206, [[2, 0, 3]]] | Passed |
| part-number-domain fixture 9 | [416, 'bytes */12'] | [416, 'bytes */12'] | Passed |
| part-number-domain fixture 10 | [206, [[1, 0, 5], [2, 0, 3], [3, 0, 4]]] | [206, [[1, 0, 5], [2, 0, 3], [3, 0, 4]]] | Passed |
| part-number-domain fixture 11 | [206, [[1, 4, 1], [3, 0, 1]]] | [206, [[1, 4, 1], [3, 0, 1]]] | Passed |
| part-number-domain fixture 12 | [416, 'bytes */0'] | [416, 'bytes */0'] | Passed |
| part-number-domain fixture 13 | [206, 'bytes 1-1/2'] | [206, 'bytes 1-1/2'] | Passed |
SHA-256 / 5af7859aaed053ebeb3acb67e1fea821f9e2949e0c2b1877e7d5eeb0e46d980c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
sizes=x['parts']
total=sum(sizes)
starts=[]
acc=0
for s in sizes:
starts.append(acc)
acc+=s
q=x['query']
if q[0]=='part':
n=q[1]
if not n<=len(sizes) or sizes[n-1]==0: return [416,'bytes */%d'%total]
a=starts[n-1]
return [206,'bytes %d-%d/%d'%(a,a+sizes[n-1]-1,total)]
a,b=q[1],q[2]
if not 0<=a<=b<total: return [416,'bytes */%d'%total]
out=[]
for i,s in enumerate(sizes):
lo=max(a,starts[i])
hi=min(b,starts[i]+s-1)
if lo<=hi: out.append([i+1,lo-starts[i],hi-lo+1])
return [206,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('part-number-domain fixture 0', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',2]}))), json.loads(json.dumps([206,'bytes 5-7/12'])))
check('part-number-domain fixture 1', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',3]}))), json.loads(json.dumps([206,'bytes 8-11/12'])))
check('part-number-domain fixture 2', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',0]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 3', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',-1]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 4', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['part',4]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 5', json.loads(json.dumps(solve({'parts':[5,0,4],'query':['part',2]}))), json.loads(json.dumps([416,'bytes */9'])))
check('part-number-domain fixture 6', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',3,9]}))), json.loads(json.dumps([206,[[1,3,2],[2,0,3],[3,0,2]]])))
check('part-number-domain fixture 7', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',4,5]}))), json.loads(json.dumps([206,[[1,4,1],[2,0,1]]])))
check('part-number-domain fixture 8', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',5,7]}))), json.loads(json.dumps([206,[[2,0,3]]])))
check('part-number-domain fixture 9', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',0,12]}))), json.loads(json.dumps([416,'bytes */12'])))
check('part-number-domain fixture 10', json.loads(json.dumps(solve({'parts':[5,3,4],'query':['range',0,11]}))), json.loads(json.dumps([206,[[1,0,5],[2,0,3],[3,0,4]]])))
check('part-number-domain fixture 11', json.loads(json.dumps(solve({'parts':[5,0,4],'query':['range',4,5]}))), json.loads(json.dumps([206,[[1,4,1],[3,0,1]]])))
check('part-number-domain fixture 12', json.loads(json.dumps(solve({'parts':[],'query':['part',1]}))), json.loads(json.dumps([416,'bytes */0'])))
check('part-number-domain fixture 13', json.loads(json.dumps(solve({'parts':[N,N],'query':['part',2]}))), json.loads(json.dumps([206,"bytes %d-%d/%d"%(N,2*N-1,2*N)])))
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 |
|---|---|---|---|
| part-number-domain fixture 0 | [206, 'bytes 5-7/12'] | [206, 'bytes 5-7/12'] | Passed |
| part-number-domain fixture 1 | [206, 'bytes 8-11/12'] | [206, 'bytes 8-11/12'] | Passed |
| part-number-domain fixture 2 | [206, 'bytes 8-11/12'] | [416, 'bytes */12'] | Failed |
| part-number-domain fixture 3 | [206, 'bytes 5-7/12'] | [416, 'bytes */12'] | Failed |
| part-number-domain fixture 4 | [416, 'bytes */12'] | [416, 'bytes */12'] | Passed |
| part-number-domain fixture 5 | [416, 'bytes */9'] | [416, 'bytes */9'] | Passed |
| part-number-domain fixture 6 | [206, [[1, 3, 2], [2, 0, 3], [3, 0, 2]]] | [206, [[1, 3, 2], [2, 0, 3], [3, 0, 2]]] | Passed |
| part-number-domain fixture 7 | [206, [[1, 4, 1], [2, 0, 1]]] | [206, [[1, 4, 1], [2, 0, 1]]] | Passed |
| part-number-domain fixture 8 | [206, [[2, 0, 3]]] | [206, [[2, 0, 3]]] | Passed |
| part-number-domain fixture 9 | [416, 'bytes */12'] | [416, 'bytes */12'] | Passed |
| part-number-domain fixture 10 | [206, [[1, 0, 5], [2, 0, 3], [3, 0, 4]]] | [206, [[1, 0, 5], [2, 0, 3], [3, 0, 4]]] | Passed |
| part-number-domain fixture 11 | [206, [[1, 4, 1], [3, 0, 1]]] | [206, [[1, 4, 1], [3, 0, 1]]] | Passed |
| part-number-domain fixture 12 | [416, 'bytes */0'] | [416, 'bytes */0'] | Passed |
| part-number-domain fixture 13 | [206, 'bytes 1-1/2'] | [206, 'bytes 1-1/2'] | Passed |
SHA-256 / 23f8cb1620030d0d3d1d0f040c0cb3904b7ef9ca81738a0cacd413660446518f
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 14 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:28.344007+00:00.
Case digest / c9d68d5212ab7e00a0cfbbdf9e30e1cabdc74ae2d62b88671b29d3c10b9235ab