{"abstract":"A row-range endpoint builds byte-addressable line record metadata: CR in a CRLF terminator is not part of the row payload.","category":"HTTP ranges","checks":9,"contract":"Build a bounded row index over UTF-8 text. A leading UTF-8 BOM is excluded from records but occupies3 representation bytes. LF or CRLF terminates a row; blank rows are ignored. A final unterminated nonempty row is included. Return [entries,selected-hex-bodies], with each entry [absolute-byte-start,content-byte-count,terminator-byte-count]. Enforce a per-record byte cap and nonnegative selected row indices. Selection order and multiplicity are meaningful.","evaluation_group":"s3-http_ranges-record-range-byte-index","failed_approach":"The partial repair uses data=x['text'].encode('utf-8')\npos=3 if data.startswith(b'\\xef\\xbb\\xbf') else 0\nentries=[]\nbodies=[]\nwhile pos<len(data):\n    end=data.find(b'\\n',pos)\n    final=end<0\n    end=len(data) if final else end\n    content_end=end-1 if not final and end>pos else end\n    terminator=0 if final else end-content_end+1\n    body=data[pos:content_end]\n    if body:\n        if len(body)>x['cap']: return None\n        entries.append([pos,len(body),terminator])\n        bodies.append(body.hex())\n    pos=len(data) if final else end+1\nif any(i<0 or i>=len(bodies) for i in x['select']): return None\nreturn [entries,[bodies[i] for i in x['select']]], which still violates the stated contract.","family":"s3-http_ranges-record-range-byte-index-crlf-content","id":"FA-27451","implementations":{"attempt":{"sha256":"dc5fcb4c7ac16a1e4325370cbaf2f97e843142003e1dda28368c8c7d6e9cc436","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    data=x['text'].encode('utf-8')\n    pos=3 if data.startswith(b'\\xef\\xbb\\xbf') else 0\n    entries=[]\n    bodies=[]\n    while pos<len(data):\n        end=data.find(b'\\n',pos)\n        final=end<0\n        end=len(data) if final else end\n        content_end=end-1 if not final and end>pos else end\n        terminator=0 if final else end-content_end+1\n        body=data[pos:content_end]\n        if body:\n            if len(body)>x['cap']: return None\n            entries.append([pos,len(body),terminator])\n            bodies.append(body.hex())\n        pos=len(data) if final else end+1\n    if any(i<0 or i>=len(bodies) for i in x['select']): return None\n    return [entries,[bodies[i] for i in x['select']]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('crlf-content fixture 0', json.loads(json.dumps(solve({'text':'a\\r\\nb\\n\\ncd','cap':5,'select':[2,0,2]}))), json.loads(json.dumps([[[0,1,2],[3,1,1],[6,2,0]],['6364','61','6364']])))\ncheck('crlf-content fixture 1', json.loads(json.dumps(solve({'text':'\\ufeffa\\n','cap':1,'select':[0]}))), json.loads(json.dumps([[[3,1,1]],['61']])))\ncheck('crlf-content fixture 2', json.loads(json.dumps(solve({'text':'\\n\\r\\n','cap':0,'select':[]}))), json.loads(json.dumps([[],[]])))\ncheck('crlf-content fixture 3', json.loads(json.dumps(solve({'text':'abc','cap':2,'select':[]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 4', json.loads(json.dumps(solve({'text':'é','cap':1,'select':[]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 5', json.loads(json.dumps(solve({'text':\"é\"*N+\"\\n\",'cap':2*N,'select':[0]}))), json.loads(json.dumps([[[0,2*N,1]],[\"c3a9\"*N]])))\ncheck('crlf-content fixture 6', json.loads(json.dumps(solve({'text':'a\\n','cap':1,'select':[-1]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 7', json.loads(json.dumps(solve({'text':'','cap':0,'select':[]}))), json.loads(json.dumps([[],[]])))\ncheck('crlf-content fixture 8', json.loads(json.dumps(solve({'text':'a\\n','cap':1,'select':[1]}))), json.loads(json.dumps(None)))\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":"f1e8a6f6595f04106877ed4ff3f4b4ad87e2f18de861278caff4f5a152bd7c22","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    data=x['text'].encode('utf-8')\n    pos=3 if data.startswith(b'\\xef\\xbb\\xbf') else 0\n    entries=[]\n    bodies=[]\n    while pos<len(data):\n        end=data.find(b'\\n',pos)\n        final=end<0\n        end=len(data) if final else end\n        content_end=end\n        terminator=0 if final else end-content_end+1\n        body=data[pos:content_end]\n        if body:\n            if len(body)>x['cap']: return None\n            entries.append([pos,len(body),terminator])\n            bodies.append(body.hex())\n        pos=len(data) if final else end+1\n    if any(i<0 or i>=len(bodies) for i in x['select']): return None\n    return [entries,[bodies[i] for i in x['select']]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('crlf-content fixture 0', json.loads(json.dumps(solve({'text':'a\\r\\nb\\n\\ncd','cap':5,'select':[2,0,2]}))), json.loads(json.dumps([[[0,1,2],[3,1,1],[6,2,0]],['6364','61','6364']])))\ncheck('crlf-content fixture 1', json.loads(json.dumps(solve({'text':'\\ufeffa\\n','cap':1,'select':[0]}))), json.loads(json.dumps([[[3,1,1]],['61']])))\ncheck('crlf-content fixture 2', json.loads(json.dumps(solve({'text':'\\n\\r\\n','cap':0,'select':[]}))), json.loads(json.dumps([[],[]])))\ncheck('crlf-content fixture 3', json.loads(json.dumps(solve({'text':'abc','cap':2,'select':[]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 4', json.loads(json.dumps(solve({'text':'é','cap':1,'select':[]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 5', json.loads(json.dumps(solve({'text':\"é\"*N+\"\\n\",'cap':2*N,'select':[0]}))), json.loads(json.dumps([[[0,2*N,1]],[\"c3a9\"*N]])))\ncheck('crlf-content fixture 6', json.loads(json.dumps(solve({'text':'a\\n','cap':1,'select':[-1]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 7', json.loads(json.dumps(solve({'text':'','cap':0,'select':[]}))), json.loads(json.dumps([[],[]])))\ncheck('crlf-content fixture 8', json.loads(json.dumps(solve({'text':'a\\n','cap':1,'select':[1]}))), json.loads(json.dumps(None)))\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"},"fixed":{"sha256":"905bb9cef317c3f92411c1b01d1647d6832bb29871dc5a135d0bd1718b5606e4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    data=x['text'].encode('utf-8')\n    pos=3 if data.startswith(b'\\xef\\xbb\\xbf') else 0\n    entries=[]\n    bodies=[]\n    while pos<len(data):\n        end=data.find(b'\\n',pos)\n        final=end<0\n        end=len(data) if final else end\n        content_end=end-1 if not final and end>pos and data[end-1]==13 else end\n        terminator=0 if final else end-content_end+1\n        body=data[pos:content_end]\n        if body:\n            if len(body)>x['cap']: return None\n            entries.append([pos,len(body),terminator])\n            bodies.append(body.hex())\n        pos=len(data) if final else end+1\n    if any(i<0 or i>=len(bodies) for i in x['select']): return None\n    return [entries,[bodies[i] for i in x['select']]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('crlf-content fixture 0', json.loads(json.dumps(solve({'text':'a\\r\\nb\\n\\ncd','cap':5,'select':[2,0,2]}))), json.loads(json.dumps([[[0,1,2],[3,1,1],[6,2,0]],['6364','61','6364']])))\ncheck('crlf-content fixture 1', json.loads(json.dumps(solve({'text':'\\ufeffa\\n','cap':1,'select':[0]}))), json.loads(json.dumps([[[3,1,1]],['61']])))\ncheck('crlf-content fixture 2', json.loads(json.dumps(solve({'text':'\\n\\r\\n','cap':0,'select':[]}))), json.loads(json.dumps([[],[]])))\ncheck('crlf-content fixture 3', json.loads(json.dumps(solve({'text':'abc','cap':2,'select':[]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 4', json.loads(json.dumps(solve({'text':'é','cap':1,'select':[]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 5', json.loads(json.dumps(solve({'text':\"é\"*N+\"\\n\",'cap':2*N,'select':[0]}))), json.loads(json.dumps([[[0,2*N,1]],[\"c3a9\"*N]])))\ncheck('crlf-content fixture 6', json.loads(json.dumps(solve({'text':'a\\n','cap':1,'select':[-1]}))), json.loads(json.dumps(None)))\ncheck('crlf-content fixture 7', json.loads(json.dumps(solve({'text':'','cap':0,'select':[]}))), json.loads(json.dumps([[],[]])))\ncheck('crlf-content fixture 8', json.loads(json.dumps(solve({'text':'a\\n','cap':1,'select':[1]}))), json.loads(json.dumps(None)))\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-record-range-byte-index-crlf-content","generated_at":"2026-09-29T14:41:25.182753+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.","repair":"Apply the bounded decision exactly: data=x['text'].encode('utf-8')\npos=3 if data.startswith(b'\\xef\\xbb\\xbf') else 0\nentries=[]\nbodies=[]\nwhile pos<len(data):\n    end=data.find(b'\\n',pos)\n    final=end<0\n    end=len(data) if final else end\n    content_end=end-1 if not final and end>pos and data[end-1]==13 else end\n    terminator=0 if final else end-content_end+1\n    body=data[pos:content_end]\n    if body:\n        if len(body)>x['cap']: return None\n        entries.append([pos,len(body),terminator])\n        bodies.append(body.hex())\n    pos=len(data) if final else end+1\nif any(i<0 or i>=len(bodies) for i in x['select']): return None\nreturn [entries,[bodies[i] for i in x['select']]]","root_cause":"The record-range-byte-index-crlf-content decision uses data=x['text'].encode('utf-8')\npos=3 if data.startswith(b'\\xef\\xbb\\xbf') else 0\nentries=[]\nbodies=[]\nwhile pos<len(data):\n    end=data.find(b'\\n',pos)\n    final=end<0\n    end=len(data) if final else end\n    content_end=end\n    terminator=0 if final else end-content_end+1\n    body=data[pos:content_end]\n    if body:\n        if len(body)>x['cap']: return None\n        entries.append([pos,len(body),terminator])\n        bodies.append(body.hex())\n    pos=len(data) if final else end+1\nif any(i<0 or i>=len(bodies) for i in x['select']): return None\nreturn [entries,[bodies[i] for i in x['select']]].","sha256":"ff25a58ce7d556da6f60b45381500682387118410d8ce551306c5dc73caf3293","title":"A row-range endpoint builds byte-addressable line record metadata: CR in a CRLF terminator is not part of the row payload · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.076,"exit_code":1,"observations":[{"actual":null,"check":"crlf-content fixture 0","expected":[[[0,1,2],[3,1,1],[6,2,0]],["6364","61","6364"]],"passed":false},{"actual":null,"check":"crlf-content fixture 1","expected":[[[3,1,1]],["61"]],"passed":false},{"actual":[[],[]],"check":"crlf-content fixture 2","expected":[[],[]],"passed":true},{"actual":null,"check":"crlf-content fixture 3","expected":null,"passed":true},{"actual":null,"check":"crlf-content fixture 4","expected":null,"passed":true},{"actual":[[[0,1,2]],["c3"]],"check":"crlf-content fixture 5","expected":[[[0,2,1]],["c3a9"]],"passed":false},{"actual":null,"check":"crlf-content fixture 6","expected":null,"passed":true},{"actual":[[],[]],"check":"crlf-content fixture 7","expected":[[],[]],"passed":true},{"actual":null,"check":"crlf-content fixture 8","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"crlf-content fixture 0\", \"actual\": null, \"expected\": [[[0, 1, 2], [3, 1, 1], [6, 2, 0]], [\"6364\", \"61\", \"6364\"]], \"passed\": false}, {\"check\": \"crlf-content fixture 1\", \"actual\": null, \"expected\": [[[3, 1, 1]], [\"61\"]], \"passed\": false}, {\"check\": \"crlf-content fixture 2\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"crlf-content fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 5\", \"actual\": [[[0, 1, 2]], [\"c3\"]], \"expected\": [[[0, 2, 1]], [\"c3a9\"]], \"passed\": false}, {\"check\": \"crlf-content fixture 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 7\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"crlf-content fixture 8\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.656,"exit_code":1,"observations":[{"actual":[[[0,2,1],[3,1,1],[6,2,0]],["6364","610d","6364"]],"check":"crlf-content fixture 0","expected":[[[0,1,2],[3,1,1],[6,2,0]],["6364","61","6364"]],"passed":false},{"actual":[[[3,1,1]],["61"]],"check":"crlf-content fixture 1","expected":[[[3,1,1]],["61"]],"passed":true},{"actual":null,"check":"crlf-content fixture 2","expected":[[],[]],"passed":false},{"actual":null,"check":"crlf-content fixture 3","expected":null,"passed":true},{"actual":null,"check":"crlf-content fixture 4","expected":null,"passed":true},{"actual":[[[0,2,1]],["c3a9"]],"check":"crlf-content fixture 5","expected":[[[0,2,1]],["c3a9"]],"passed":true},{"actual":null,"check":"crlf-content fixture 6","expected":null,"passed":true},{"actual":[[],[]],"check":"crlf-content fixture 7","expected":[[],[]],"passed":true},{"actual":null,"check":"crlf-content fixture 8","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"crlf-content fixture 0\", \"actual\": [[[0, 2, 1], [3, 1, 1], [6, 2, 0]], [\"6364\", \"610d\", \"6364\"]], \"expected\": [[[0, 1, 2], [3, 1, 1], [6, 2, 0]], [\"6364\", \"61\", \"6364\"]], \"passed\": false}, {\"check\": \"crlf-content fixture 1\", \"actual\": [[[3, 1, 1]], [\"61\"]], \"expected\": [[[3, 1, 1]], [\"61\"]], \"passed\": true}, {\"check\": \"crlf-content fixture 2\", \"actual\": null, \"expected\": [[], []], \"passed\": false}, {\"check\": \"crlf-content fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 5\", \"actual\": [[[0, 2, 1]], [\"c3a9\"]], \"expected\": [[[0, 2, 1]], [\"c3a9\"]], \"passed\": true}, {\"check\": \"crlf-content fixture 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 7\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"crlf-content fixture 8\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.95,"exit_code":0,"observations":[{"actual":[[[0,1,2],[3,1,1],[6,2,0]],["6364","61","6364"]],"check":"crlf-content fixture 0","expected":[[[0,1,2],[3,1,1],[6,2,0]],["6364","61","6364"]],"passed":true},{"actual":[[[3,1,1]],["61"]],"check":"crlf-content fixture 1","expected":[[[3,1,1]],["61"]],"passed":true},{"actual":[[],[]],"check":"crlf-content fixture 2","expected":[[],[]],"passed":true},{"actual":null,"check":"crlf-content fixture 3","expected":null,"passed":true},{"actual":null,"check":"crlf-content fixture 4","expected":null,"passed":true},{"actual":[[[0,2,1]],["c3a9"]],"check":"crlf-content fixture 5","expected":[[[0,2,1]],["c3a9"]],"passed":true},{"actual":null,"check":"crlf-content fixture 6","expected":null,"passed":true},{"actual":[[],[]],"check":"crlf-content fixture 7","expected":[[],[]],"passed":true},{"actual":null,"check":"crlf-content fixture 8","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"crlf-content fixture 0\", \"actual\": [[[0, 1, 2], [3, 1, 1], [6, 2, 0]], [\"6364\", \"61\", \"6364\"]], \"expected\": [[[0, 1, 2], [3, 1, 1], [6, 2, 0]], [\"6364\", \"61\", \"6364\"]], \"passed\": true}, {\"check\": \"crlf-content fixture 1\", \"actual\": [[[3, 1, 1]], [\"61\"]], \"expected\": [[[3, 1, 1]], [\"61\"]], \"passed\": true}, {\"check\": \"crlf-content fixture 2\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"crlf-content fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 5\", \"actual\": [[[0, 2, 1]], [\"c3a9\"]], \"expected\": [[[0, 2, 1]], [\"c3a9\"]], \"passed\": true}, {\"check\": \"crlf-content fixture 6\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"crlf-content fixture 7\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"crlf-content fixture 8\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}