{"abstract":"A delta downloader reuses matching local blocks and fetches the rest with batched ranges: the final remote block length is the remaining representation bytes.","category":"HTTP ranges","checks":13,"contract":"x has remote total length, block size, one remote digest per block (the last block may be short), local digests per local block with the local file length, and a per-request range limit R>=1. Reject nonpositive block size, negative total, or a manifest whose count is not ceil(total/block). Only complete local blocks may be copied; a full remote block whose digest occurs at any local position is copied from the first such complete local block as [dest-offset,source-offset,length]. The short final remote block is always fetched. Missing bytes form maximal adjacent inclusive runs, sent in consecutive batches of at most R ranges. Return [copies,Range values].","contract_signature":"x","evaluation_group":"s3-http_ranges-delta-block-fetch","failed_approach":"The partial repair uses T=x['total']\nB=x['block']\nremote=x['remote']\nif B<=0 or T<0 or len(remote)!=-(-T//B): return None\nwhere={}\nfor j,d in enumerate(x['local']):\n    if (j+1)*B<=x['local_total']: where.setdefault(d,j)\ncopies=[]\nruns=[]\nfor i,d in enumerate(remote):\n    n=T%B if i==len(remote)-1 else B\n    if d in where and n==B:\n        copies.append([i*B,where[d]*B,n])\n        continue\n    if runs and runs[-1][1]==i*B-1: runs[-1][1]=i*B+n-1\n    else: runs.append([i*B,i*B+n-1])\nR=x['max_ranges']\nheaders=[]\nfor k in range(0,len(runs),R):\n    headers.append('bytes='+','.join('%d-%d'%(a,b) for a,b in runs[k:k+R]))\nreturn [copies,headers], which still violates the stated contract.","family":"s3-http_ranges-delta-block-fetch-final-block-length","id":"FA-27731","implementations":{"attempt":{"sha256":"3b98e20db77e08d74fff00d8e6aa999ae830dc5c7f12734b0fecf4f760c06604","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    T=x['total']\n    B=x['block']\n    remote=x['remote']\n    if B<=0 or T<0 or len(remote)!=-(-T//B): return None\n    where={}\n    for j,d in enumerate(x['local']):\n        if (j+1)*B<=x['local_total']: where.setdefault(d,j)\n    copies=[]\n    runs=[]\n    for i,d in enumerate(remote):\n        n=T%B if i==len(remote)-1 else B\n        if d in where and n==B:\n            copies.append([i*B,where[d]*B,n])\n            continue\n        if runs and runs[-1][1]==i*B-1: runs[-1][1]=i*B+n-1\n        else: runs.append([i*B,i*B+n-1])\n    R=x['max_ranges']\n    headers=[]\n    for k in range(0,len(runs),R):\n        headers.append('bytes='+','.join('%d-%d'%(a,b) for a,b in runs[k:k+R]))\n    return [copies,headers]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('final-block-length fixture 0', json.loads(json.dumps(solve({'block':4,'local':['b','x'],'local_total':8,'max_ranges':2,'remote':['a','b','c'],'total':10}))), json.loads(json.dumps([[[4,0,4]],['bytes=0-3,8-9']])))\ncheck('final-block-length fixture 1', json.loads(json.dumps(solve({'block':4,'local':['z','z','a'],'local_total':12,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps([[[0,8,4]],['bytes=4-7']])))\ncheck('final-block-length fixture 2', json.loads(json.dumps(solve({'block':4,'local':['t','a','b'],'local_total':12,'max_ranges':2,'remote':['a','b','t'],'total':10}))), json.loads(json.dumps([[[0,4,4],[4,8,4]],['bytes=8-9']])))\ncheck('final-block-length fixture 3', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps([[],['bytes=0-7']])))\ncheck('final-block-length fixture 4', json.loads(json.dumps(solve({'block':4,'local':['k'],'local_total':4,'max_ranges':2,'remote':['a','k','b','k','c','k'],'total':24}))), json.loads(json.dumps([[[4,0,4],[12,0,4],[20,0,4]],['bytes=0-3,8-11','bytes=16-19']])))\ncheck('final-block-length fixture 5', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b'],'total':10}))), json.loads(json.dumps(None)))\ncheck('final-block-length fixture 6', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b','c'],'total':8}))), json.loads(json.dumps(None)))\ncheck('final-block-length fixture 7', json.loads(json.dumps(solve({'block':4,'local':['s'],'local_total':2,'max_ranges':2,'remote':['a','s'],'total':8}))), json.loads(json.dumps([[],['bytes=0-7']])))\ncheck('final-block-length fixture 8', json.loads(json.dumps(solve({'block':4,'local':['a'],'local_total':4,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps([[[0,0,4]],['bytes=4-7']])))\ncheck('final-block-length fixture 9', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':[],'total':0}))), json.loads(json.dumps([[],[]])))\ncheck('final-block-length fixture 10', json.loads(json.dumps(solve({'block':0,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps(None)))\ncheck('final-block-length fixture 11', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':1,'remote':['a','b','c'],'total':12}))), json.loads(json.dumps([[],['bytes=0-11']])))\ncheck('final-block-length fixture 12', json.loads(json.dumps(solve({'block':4,'local':['h'],'local_total':4,'max_ranges':2,'remote':[\"h\"]*N,'total':4*N}))), json.loads(json.dumps([[[4*i,0,4] for i in range(N)],[]])))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"bdabb23c703026f18f304442efa0350762cc4f4b8bbbd989515aa37ae24a8ddd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    T=x['total']\n    B=x['block']\n    remote=x['remote']\n    if B<=0 or T<0 or len(remote)!=-(-T//B): return None\n    where={}\n    for j,d in enumerate(x['local']):\n        if (j+1)*B<=x['local_total']: where.setdefault(d,j)\n    copies=[]\n    runs=[]\n    for i,d in enumerate(remote):\n        n=B\n        if d in where and n==B:\n            copies.append([i*B,where[d]*B,n])\n            continue\n        if runs and runs[-1][1]==i*B-1: runs[-1][1]=i*B+n-1\n        else: runs.append([i*B,i*B+n-1])\n    R=x['max_ranges']\n    headers=[]\n    for k in range(0,len(runs),R):\n        headers.append('bytes='+','.join('%d-%d'%(a,b) for a,b in runs[k:k+R]))\n    return [copies,headers]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('final-block-length fixture 0', json.loads(json.dumps(solve({'block':4,'local':['b','x'],'local_total':8,'max_ranges':2,'remote':['a','b','c'],'total':10}))), json.loads(json.dumps([[[4,0,4]],['bytes=0-3,8-9']])))\ncheck('final-block-length fixture 1', json.loads(json.dumps(solve({'block':4,'local':['z','z','a'],'local_total':12,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps([[[0,8,4]],['bytes=4-7']])))\ncheck('final-block-length fixture 2', json.loads(json.dumps(solve({'block':4,'local':['t','a','b'],'local_total':12,'max_ranges':2,'remote':['a','b','t'],'total':10}))), json.loads(json.dumps([[[0,4,4],[4,8,4]],['bytes=8-9']])))\ncheck('final-block-length fixture 3', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps([[],['bytes=0-7']])))\ncheck('final-block-length fixture 4', json.loads(json.dumps(solve({'block':4,'local':['k'],'local_total':4,'max_ranges':2,'remote':['a','k','b','k','c','k'],'total':24}))), json.loads(json.dumps([[[4,0,4],[12,0,4],[20,0,4]],['bytes=0-3,8-11','bytes=16-19']])))\ncheck('final-block-length fixture 5', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b'],'total':10}))), json.loads(json.dumps(None)))\ncheck('final-block-length fixture 6', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b','c'],'total':8}))), json.loads(json.dumps(None)))\ncheck('final-block-length fixture 7', json.loads(json.dumps(solve({'block':4,'local':['s'],'local_total':2,'max_ranges':2,'remote':['a','s'],'total':8}))), json.loads(json.dumps([[],['bytes=0-7']])))\ncheck('final-block-length fixture 8', json.loads(json.dumps(solve({'block':4,'local':['a'],'local_total':4,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps([[[0,0,4]],['bytes=4-7']])))\ncheck('final-block-length fixture 9', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':2,'remote':[],'total':0}))), json.loads(json.dumps([[],[]])))\ncheck('final-block-length fixture 10', json.loads(json.dumps(solve({'block':0,'local':[],'local_total':0,'max_ranges':2,'remote':['a','b'],'total':8}))), json.loads(json.dumps(None)))\ncheck('final-block-length fixture 11', json.loads(json.dumps(solve({'block':4,'local':[],'local_total':0,'max_ranges':1,'remote':['a','b','c'],'total':12}))), json.loads(json.dumps([[],['bytes=0-11']])))\ncheck('final-block-length fixture 12', json.loads(json.dumps(solve({'block':4,'local':['h'],'local_total':4,'max_ranges':2,'remote':[\"h\"]*N,'total':4*N}))), json.loads(json.dumps([[[4*i,0,4] for i in range(N)],[]])))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-http_ranges-delta-block-fetch-final-block-length","generated_at":"2026-09-29T14:41:27.677491+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Range responses combine representation identity, conditional requests, framing, and partial-object state.","root_cause":"The delta-block-fetch-final-block-length decision uses T=x['total']\nB=x['block']\nremote=x['remote']\nif B<=0 or T<0 or len(remote)!=-(-T//B): return None\nwhere={}\nfor j,d in enumerate(x['local']):\n    if (j+1)*B<=x['local_total']: where.setdefault(d,j)\ncopies=[]\nruns=[]\nfor i,d in enumerate(remote):\n    n=B\n    if d in where and n==B:\n        copies.append([i*B,where[d]*B,n])\n        continue\n    if runs and runs[-1][1]==i*B-1: runs[-1][1]=i*B+n-1\n    else: runs.append([i*B,i*B+n-1])\nR=x['max_ranges']\nheaders=[]\nfor k in range(0,len(runs),R):\n    headers.append('bytes='+','.join('%d-%d'%(a,b) for a,b in runs[k:k+R]))\nreturn [copies,headers].","sha256":"42fc54fe17e29bffb1f079e7cde1609610eb6085801150a7036dc900d2084af3","title":"A delta downloader reuses matching local blocks and fetches the rest with batched ranges: the final remote block length is the remaining representation bytes · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.118,"exit_code":1,"observations":[{"actual":[[[4,0,4]],["bytes=0-3,8-9"]],"check":"final-block-length fixture 0","expected":[[[4,0,4]],["bytes=0-3,8-9"]],"passed":true},{"actual":[[[0,8,4]],["bytes=4-3"]],"check":"final-block-length fixture 1","expected":[[[0,8,4]],["bytes=4-7"]],"passed":false},{"actual":[[[0,4,4],[4,8,4]],["bytes=8-9"]],"check":"final-block-length fixture 2","expected":[[[0,4,4],[4,8,4]],["bytes=8-9"]],"passed":true},{"actual":[[],["bytes=0-3"]],"check":"final-block-length fixture 3","expected":[[],["bytes=0-7"]],"passed":false},{"actual":[[[4,0,4],[12,0,4]],["bytes=0-3,8-11","bytes=16-19"]],"check":"final-block-length fixture 4","expected":[[[4,0,4],[12,0,4],[20,0,4]],["bytes=0-3,8-11","bytes=16-19"]],"passed":false},{"actual":null,"check":"final-block-length fixture 5","expected":null,"passed":true},{"actual":null,"check":"final-block-length fixture 6","expected":null,"passed":true},{"actual":[[],["bytes=0-3"]],"check":"final-block-length fixture 7","expected":[[],["bytes=0-7"]],"passed":false},{"actual":[[[0,0,4]],["bytes=4-3"]],"check":"final-block-length fixture 8","expected":[[[0,0,4]],["bytes=4-7"]],"passed":false},{"actual":[[],[]],"check":"final-block-length fixture 9","expected":[[],[]],"passed":true},{"actual":null,"check":"final-block-length fixture 10","expected":null,"passed":true},{"actual":[[],["bytes=0-7"]],"check":"final-block-length fixture 11","expected":[[],["bytes=0-11"]],"passed":false},{"actual":[[],["bytes=0--1"]],"check":"final-block-length fixture 12","expected":[[[0,0,4]],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"final-block-length fixture 0\", \"actual\": [[[4, 0, 4]], [\"bytes=0-3,8-9\"]], \"expected\": [[[4, 0, 4]], [\"bytes=0-3,8-9\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 1\", \"actual\": [[[0, 8, 4]], [\"bytes=4-3\"]], \"expected\": [[[0, 8, 4]], [\"bytes=4-7\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 2\", \"actual\": [[[0, 4, 4], [4, 8, 4]], [\"bytes=8-9\"]], \"expected\": [[[0, 4, 4], [4, 8, 4]], [\"bytes=8-9\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 3\", \"actual\": [[], [\"bytes=0-3\"]], \"expected\": [[], [\"bytes=0-7\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 4\", \"actual\": [[[4, 0, 4], [12, 0, 4]], [\"bytes=0-3,8-11\", \"bytes=16-19\"]], \"expected\": [[[4, 0, 4], [12, 0, 4], [20, 0, 4]], [\"bytes=0-3,8-11\", \"bytes=16-19\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"final-block-length fixture 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"final-block-length fixture 7\", \"actual\": [[], [\"bytes=0-3\"]], \"expected\": [[], [\"bytes=0-7\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 8\", \"actual\": [[[0, 0, 4]], [\"bytes=4-3\"]], \"expected\": [[[0, 0, 4]], [\"bytes=4-7\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 9\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"final-block-length fixture 10\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"final-block-length fixture 11\", \"actual\": [[], [\"bytes=0-7\"]], \"expected\": [[], [\"bytes=0-11\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 12\", \"actual\": [[], [\"bytes=0--1\"]], \"expected\": [[[0, 0, 4]], []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.314,"exit_code":1,"observations":[{"actual":[[[4,0,4]],["bytes=0-3,8-11"]],"check":"final-block-length fixture 0","expected":[[[4,0,4]],["bytes=0-3,8-9"]],"passed":false},{"actual":[[[0,8,4]],["bytes=4-7"]],"check":"final-block-length fixture 1","expected":[[[0,8,4]],["bytes=4-7"]],"passed":true},{"actual":[[[0,4,4],[4,8,4],[8,0,4]],[]],"check":"final-block-length fixture 2","expected":[[[0,4,4],[4,8,4]],["bytes=8-9"]],"passed":false},{"actual":[[],["bytes=0-7"]],"check":"final-block-length fixture 3","expected":[[],["bytes=0-7"]],"passed":true},{"actual":[[[4,0,4],[12,0,4],[20,0,4]],["bytes=0-3,8-11","bytes=16-19"]],"check":"final-block-length fixture 4","expected":[[[4,0,4],[12,0,4],[20,0,4]],["bytes=0-3,8-11","bytes=16-19"]],"passed":true},{"actual":null,"check":"final-block-length fixture 5","expected":null,"passed":true},{"actual":null,"check":"final-block-length fixture 6","expected":null,"passed":true},{"actual":[[],["bytes=0-7"]],"check":"final-block-length fixture 7","expected":[[],["bytes=0-7"]],"passed":true},{"actual":[[[0,0,4]],["bytes=4-7"]],"check":"final-block-length fixture 8","expected":[[[0,0,4]],["bytes=4-7"]],"passed":true},{"actual":[[],[]],"check":"final-block-length fixture 9","expected":[[],[]],"passed":true},{"actual":null,"check":"final-block-length fixture 10","expected":null,"passed":true},{"actual":[[],["bytes=0-11"]],"check":"final-block-length fixture 11","expected":[[],["bytes=0-11"]],"passed":true},{"actual":[[[0,0,4]],[]],"check":"final-block-length fixture 12","expected":[[[0,0,4]],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"final-block-length fixture 0\", \"actual\": [[[4, 0, 4]], [\"bytes=0-3,8-11\"]], \"expected\": [[[4, 0, 4]], [\"bytes=0-3,8-9\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 1\", \"actual\": [[[0, 8, 4]], [\"bytes=4-7\"]], \"expected\": [[[0, 8, 4]], [\"bytes=4-7\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 2\", \"actual\": [[[0, 4, 4], [4, 8, 4], [8, 0, 4]], []], \"expected\": [[[0, 4, 4], [4, 8, 4]], [\"bytes=8-9\"]], \"passed\": false}, {\"check\": \"final-block-length fixture 3\", \"actual\": [[], [\"bytes=0-7\"]], \"expected\": [[], [\"bytes=0-7\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 4\", \"actual\": [[[4, 0, 4], [12, 0, 4], [20, 0, 4]], [\"bytes=0-3,8-11\", \"bytes=16-19\"]], \"expected\": [[[4, 0, 4], [12, 0, 4], [20, 0, 4]], [\"bytes=0-3,8-11\", \"bytes=16-19\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 5\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"final-block-length fixture 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"final-block-length fixture 7\", \"actual\": [[], [\"bytes=0-7\"]], \"expected\": [[], [\"bytes=0-7\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 8\", \"actual\": [[[0, 0, 4]], [\"bytes=4-7\"]], \"expected\": [[[0, 0, 4]], [\"bytes=4-7\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 9\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"final-block-length fixture 10\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"final-block-length fixture 11\", \"actual\": [[], [\"bytes=0-11\"]], \"expected\": [[], [\"bytes=0-11\"]], \"passed\": true}, {\"check\": \"final-block-length fixture 12\", \"actual\": [[[0, 0, 4]], []], \"expected\": [[[0, 0, 4]], []], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}