FA-27281 / HTTP ranges / Open access
An origin adapter turns byte requests into bounded aligned storage reads: physical reads begin at the block base in the object · case 01
An origin adapter turns byte requests into bounded aligned storage reads: physical reads begin at the block base in the object.
ROOT CAUSE
The aligned-origin-read-plan-aligned-absolute decision uses block=x['block'] needed=set() maps=[] for start,stop in x['requests']: parts=[] cursor=start while cursor<stop: page=cursor//block local=cursor-page*block count=min(stop-cursor,block-local) parts.append([page,local,count]) needed.add(page) cursor+=count maps.append(parts) reads=[] for page in sorted(needed): if page in x['cached']: continue absolute=page count=min(block,x['length']-absolute) reads.append([page,absolute,count]) return [reads,maps].
VERIFIED REPAIR
Apply the bounded decision exactly: block=x['block'] needed=set() maps=[] for start,stop in x['requests']: parts=[] cursor=start while cursor<stop: page=cursor//block local=cursor-page*block count=min(stop-cursor,block-local) parts.append([page,local,count]) needed.add(page) cursor+=count maps.append(parts) reads=[] for page in sorted(needed): if page in x['cached']: continue absolute=page*block count=min(block,x['length']-absolute) reads.append([page,absolute,count]) return [reads,maps]
Unsuccessful approach: The partial repair uses block=x['block'] needed=set() maps=[] for start,stop in x['requests']: parts=[] cursor=start while cursor<stop: page=cursor//block local=cursor-page*block count=min(stop-cursor,block-local) parts.append([page,local,count]) needed.add(page) cursor+=count maps.append(parts) reads=[] for page in sorted(needed): if page in x['cached']: continue absolute=(page+1)*block count=min(block,x['length']-absolute) reads.append([page,absolute,count]) return [reads,maps], which still violates the stated contract.
Case contract
x contains complete object length, positive storage block size, ordered [start,stop) requested spans already within object, and cached block numbers. Return [uncached-block-reads,request-to-block-slices]. Each storage read is [block,absolute-start,count], clipped at EOF. Request maps contain [block,offset,count] for every crossed block, including cached ones; empty spans map to an empty list. Storage reads are deduplicated and sorted by block.
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):
block=x['block']
needed=set()
maps=[]
for start,stop in x['requests']:
parts=[]
cursor=start
while cursor<stop:
page=cursor//block
local=cursor-page*block
count=min(stop-cursor,block-local)
parts.append([page,local,count])
needed.add(page)
cursor+=count
maps.append(parts)
reads=[]
for page in sorted(needed):
if page in x['cached']: continue
absolute=page
count=min(block,x['length']-absolute)
reads.append([page,absolute,count])
return [reads,maps]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('aligned-absolute fixture 0', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[3,9]],'cached':[]}))), json.loads(json.dumps([[[0,0,4],[1,4,4],[2,8,2]],[[[0,3,1],[1,0,4],[2,0,1]]]])))
check('aligned-absolute fixture 1', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[8,10],[0,2],[1,3]],'cached':[0]}))), json.loads(json.dumps([[[2,8,2]],[[[2,0,2]],[[0,0,2]],[[0,1,2]]]])))
check('aligned-absolute fixture 2', json.loads(json.dumps(solve({'length':8,'block':4,'requests':[[0,4],[4,8]],'cached':[]}))), json.loads(json.dumps([[[0,0,4],[1,4,4]],[[[0,0,4]],[[1,0,4]]]])))
check('aligned-absolute fixture 3', json.loads(json.dumps(solve({'length':0,'block':4,'requests':[[0,0]],'cached':[]}))), json.loads(json.dumps([[],[[]]])))
check('aligned-absolute fixture 4', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[2,2]],'cached':[]}))), json.loads(json.dumps([[],[[]]])))
check('aligned-absolute fixture 5', json.loads(json.dumps(solve({'length':3*N,'block':N,'requests':[[0,N],[N,2*N]],'cached':[0]}))), json.loads(json.dumps([[[1,N,N]],[[[0,0,N]],[[1,0,N]]]])))
check('aligned-absolute fixture 6', json.loads(json.dumps(solve({'length':5,'block':4,'requests':[],'cached':[0]}))), json.loads(json.dumps([[],[]])))
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 |
|---|---|---|---|
| aligned-absolute fixture 0 | [[[0, 0, 4], [1, 1, 4], [2, 2, 4]], [[[0, 3, 1], [1, 0, 4], [2, 0, 1]]]] | [[[0, 0, 4], [1, 4, 4], [2, 8, 2]], [[[0, 3, 1], [1, 0, 4], [2, 0, 1]]]] | Failed |
| aligned-absolute fixture 1 | [[[2, 2, 4]], [[[2, 0, 2]], [[0, 0, 2]], [[0, 1, 2]]]] | [[[2, 8, 2]], [[[2, 0, 2]], [[0, 0, 2]], [[0, 1, 2]]]] | Failed |
| aligned-absolute fixture 2 | [[[0, 0, 4], [1, 1, 4]], [[[0, 0, 4]], [[1, 0, 4]]]] | [[[0, 0, 4], [1, 4, 4]], [[[0, 0, 4]], [[1, 0, 4]]]] | Failed |
| aligned-absolute fixture 3 | [[], [[]]] | [[], [[]]] | Passed |
| aligned-absolute fixture 4 | [[], [[]]] | [[], [[]]] | Passed |
| aligned-absolute fixture 5 | [[[1, 1, 1]], [[[0, 0, 1]], [[1, 0, 1]]]] | [[[1, 1, 1]], [[[0, 0, 1]], [[1, 0, 1]]]] | Passed |
| aligned-absolute fixture 6 | [[], []] | [[], []] | Passed |
SHA-256 / ea2a2c56a9239ded22bd8f25ecf4535e3904cfaca5e121a694eac74f6cfc60ba
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
block=x['block']
needed=set()
maps=[]
for start,stop in x['requests']:
parts=[]
cursor=start
while cursor<stop:
page=cursor//block
local=cursor-page*block
count=min(stop-cursor,block-local)
parts.append([page,local,count])
needed.add(page)
cursor+=count
maps.append(parts)
reads=[]
for page in sorted(needed):
if page in x['cached']: continue
absolute=(page+1)*block
count=min(block,x['length']-absolute)
reads.append([page,absolute,count])
return [reads,maps]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('aligned-absolute fixture 0', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[3,9]],'cached':[]}))), json.loads(json.dumps([[[0,0,4],[1,4,4],[2,8,2]],[[[0,3,1],[1,0,4],[2,0,1]]]])))
check('aligned-absolute fixture 1', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[8,10],[0,2],[1,3]],'cached':[0]}))), json.loads(json.dumps([[[2,8,2]],[[[2,0,2]],[[0,0,2]],[[0,1,2]]]])))
check('aligned-absolute fixture 2', json.loads(json.dumps(solve({'length':8,'block':4,'requests':[[0,4],[4,8]],'cached':[]}))), json.loads(json.dumps([[[0,0,4],[1,4,4]],[[[0,0,4]],[[1,0,4]]]])))
check('aligned-absolute fixture 3', json.loads(json.dumps(solve({'length':0,'block':4,'requests':[[0,0]],'cached':[]}))), json.loads(json.dumps([[],[[]]])))
check('aligned-absolute fixture 4', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[2,2]],'cached':[]}))), json.loads(json.dumps([[],[[]]])))
check('aligned-absolute fixture 5', json.loads(json.dumps(solve({'length':3*N,'block':N,'requests':[[0,N],[N,2*N]],'cached':[0]}))), json.loads(json.dumps([[[1,N,N]],[[[0,0,N]],[[1,0,N]]]])))
check('aligned-absolute fixture 6', json.loads(json.dumps(solve({'length':5,'block':4,'requests':[],'cached':[0]}))), json.loads(json.dumps([[],[]])))
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 |
|---|---|---|---|
| aligned-absolute fixture 0 | [[[0, 4, 4], [1, 8, 2], [2, 12, -2]], [[[0, 3, 1], [1, 0, 4], [2, 0, 1]]]] | [[[0, 0, 4], [1, 4, 4], [2, 8, 2]], [[[0, 3, 1], [1, 0, 4], [2, 0, 1]]]] | Failed |
| aligned-absolute fixture 1 | [[[2, 12, -2]], [[[2, 0, 2]], [[0, 0, 2]], [[0, 1, 2]]]] | [[[2, 8, 2]], [[[2, 0, 2]], [[0, 0, 2]], [[0, 1, 2]]]] | Failed |
| aligned-absolute fixture 2 | [[[0, 4, 4], [1, 8, 0]], [[[0, 0, 4]], [[1, 0, 4]]]] | [[[0, 0, 4], [1, 4, 4]], [[[0, 0, 4]], [[1, 0, 4]]]] | Failed |
| aligned-absolute fixture 3 | [[], [[]]] | [[], [[]]] | Passed |
| aligned-absolute fixture 4 | [[], [[]]] | [[], [[]]] | Passed |
| aligned-absolute fixture 5 | [[[1, 2, 1]], [[[0, 0, 1]], [[1, 0, 1]]]] | [[[1, 1, 1]], [[[0, 0, 1]], [[1, 0, 1]]]] | Failed |
| aligned-absolute fixture 6 | [[], []] | [[], []] | Passed |
SHA-256 / 2ae8fe15d9210e9bf525f8cb73ca2fe1d0c7573e8de2d145f4011e56521621eb
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
block=x['block']
needed=set()
maps=[]
for start,stop in x['requests']:
parts=[]
cursor=start
while cursor<stop:
page=cursor//block
local=cursor-page*block
count=min(stop-cursor,block-local)
parts.append([page,local,count])
needed.add(page)
cursor+=count
maps.append(parts)
reads=[]
for page in sorted(needed):
if page in x['cached']: continue
absolute=page*block
count=min(block,x['length']-absolute)
reads.append([page,absolute,count])
return [reads,maps]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('aligned-absolute fixture 0', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[3,9]],'cached':[]}))), json.loads(json.dumps([[[0,0,4],[1,4,4],[2,8,2]],[[[0,3,1],[1,0,4],[2,0,1]]]])))
check('aligned-absolute fixture 1', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[8,10],[0,2],[1,3]],'cached':[0]}))), json.loads(json.dumps([[[2,8,2]],[[[2,0,2]],[[0,0,2]],[[0,1,2]]]])))
check('aligned-absolute fixture 2', json.loads(json.dumps(solve({'length':8,'block':4,'requests':[[0,4],[4,8]],'cached':[]}))), json.loads(json.dumps([[[0,0,4],[1,4,4]],[[[0,0,4]],[[1,0,4]]]])))
check('aligned-absolute fixture 3', json.loads(json.dumps(solve({'length':0,'block':4,'requests':[[0,0]],'cached':[]}))), json.loads(json.dumps([[],[[]]])))
check('aligned-absolute fixture 4', json.loads(json.dumps(solve({'length':10,'block':4,'requests':[[2,2]],'cached':[]}))), json.loads(json.dumps([[],[[]]])))
check('aligned-absolute fixture 5', json.loads(json.dumps(solve({'length':3*N,'block':N,'requests':[[0,N],[N,2*N]],'cached':[0]}))), json.loads(json.dumps([[[1,N,N]],[[[0,0,N]],[[1,0,N]]]])))
check('aligned-absolute fixture 6', json.loads(json.dumps(solve({'length':5,'block':4,'requests':[],'cached':[0]}))), json.loads(json.dumps([[],[]])))
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 |
|---|---|---|---|
| aligned-absolute fixture 0 | [[[0, 0, 4], [1, 4, 4], [2, 8, 2]], [[[0, 3, 1], [1, 0, 4], [2, 0, 1]]]] | [[[0, 0, 4], [1, 4, 4], [2, 8, 2]], [[[0, 3, 1], [1, 0, 4], [2, 0, 1]]]] | Passed |
| aligned-absolute fixture 1 | [[[2, 8, 2]], [[[2, 0, 2]], [[0, 0, 2]], [[0, 1, 2]]]] | [[[2, 8, 2]], [[[2, 0, 2]], [[0, 0, 2]], [[0, 1, 2]]]] | Passed |
| aligned-absolute fixture 2 | [[[0, 0, 4], [1, 4, 4]], [[[0, 0, 4]], [[1, 0, 4]]]] | [[[0, 0, 4], [1, 4, 4]], [[[0, 0, 4]], [[1, 0, 4]]]] | Passed |
| aligned-absolute fixture 3 | [[], [[]]] | [[], [[]]] | Passed |
| aligned-absolute fixture 4 | [[], [[]]] | [[], [[]]] | Passed |
| aligned-absolute fixture 5 | [[[1, 1, 1]], [[[0, 0, 1]], [[1, 0, 1]]]] | [[[1, 1, 1]], [[[0, 0, 1]], [[1, 0, 1]]]] | Passed |
| aligned-absolute fixture 6 | [[], []] | [[], []] | Passed |
SHA-256 / 9226078e7ec3e818b791404fbd77ea878e848650136ba359bffb446a66f413cb
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.693411+00:00.
Case digest / d3b682dc2d2eb026e78e2147eeb4b1f4f4f4c60fd05fa828c5b5f9809f75926d