{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"For UTF-8 text with LF-delimited physical records, report each record as [text,start_byte,end_byte,line_number]. LF is excluded from text and end offset; a final LF does not add a phantom record. Empty interior records remain. Leading BOM is ordinary text here.","evaluation_group":"s3-delimited-text-byte-record-spans","failed_approach":"Subtracting one instead loses a payload byte.","family":"s3-delimited-text-byte-record-spans-end-exclusion","id":"FA-48076","implementations":{"attempt":{"sha256":"cfd166ad0ff3ad3d0412ff47132d23d10cf3347329ed26dae3e587b23638cc37","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    out, start, line = [], 0, 1\n    parts = data.split('\\n')\n    if parts[-1] == '': parts.pop()\n    for text in parts:\n        size = len(text.encode('utf-8'))\n        out.append([text, start, start + max(size - 1, 0), line])\n        start += size + 1\n        line += 1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unicode', solve(_vary('é\\n@')), _vary([['é', 0, 2, 1], ['@', 3, '@END', 2]]))\ncheck('empty middle', solve(_vary('a\\n\\nb')), _vary([['a', 0, 1, 1], ['', 2, 2, 2], ['b', 3, 4, 3]]))\ncheck('final LF', solve(_vary('a\\n')), _vary([['a', 0, 1, 1]]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('only LF', solve(_vary('\\n')), _vary([['', 0, 0, 1]]))\ncheck('astral', solve(_vary('😀\\nz')), _vary([['😀', 0, 4, 1], ['z', 5, 6, 2]]))\ncheck('no LF', solve(_vary('x')), _vary([['x', 0, 1, 1]]))\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":"d5d439696806ee45faef04a3bb428b94faa60917986a24d6541c2a0afd7e4b48","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    out, start, line = [], 0, 1\n    parts = data.split('\\n')\n    if parts[-1] == '': parts.pop()\n    for text in parts:\n        size = len(text.encode('utf-8'))\n        out.append([text, start, start + size + 1, line])\n        start += size + 1\n        line += 1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unicode', solve(_vary('é\\n@')), _vary([['é', 0, 2, 1], ['@', 3, '@END', 2]]))\ncheck('empty middle', solve(_vary('a\\n\\nb')), _vary([['a', 0, 1, 1], ['', 2, 2, 2], ['b', 3, 4, 3]]))\ncheck('final LF', solve(_vary('a\\n')), _vary([['a', 0, 1, 1]]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('only LF', solve(_vary('\\n')), _vary([['', 0, 0, 1]]))\ncheck('astral', solve(_vary('😀\\nz')), _vary([['😀', 0, 4, 1], ['z', 5, 6, 2]]))\ncheck('no LF', solve(_vary('x')), _vary([['x', 0, 1, 1]]))\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":"5a6882ff32edfacc4f2d66200eb1f89df8b3f59bdc8b43ded53608af400d1d63","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    out, start, line = [], 0, 1\n    parts = data.split('\\n')\n    if parts[-1] == '': parts.pop()\n    for text in parts:\n        size = len(text.encode('utf-8'))\n        out.append([text, start, start + size, line])\n        start += size + 1\n        line += 1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unicode', solve(_vary('é\\n@')), _vary([['é', 0, 2, 1], ['@', 3, '@END', 2]]))\ncheck('empty middle', solve(_vary('a\\n\\nb')), _vary([['a', 0, 1, 1], ['', 2, 2, 2], ['b', 3, 4, 3]]))\ncheck('final LF', solve(_vary('a\\n')), _vary([['a', 0, 1, 1]]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('only LF', solve(_vary('\\n')), _vary([['', 0, 0, 1]]))\ncheck('astral', solve(_vary('😀\\nz')), _vary([['😀', 0, 4, 1], ['z', 5, 6, 2]]))\ncheck('no LF', solve(_vary('x')), _vary([['x', 0, 1, 1]]))\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 bounded in-memory model. No claim of complete CSV or external format conformance. 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-delimited-text-byte-record-spans-end-exclusion","generated_at":"2026-09-29T14:44:47.488094+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Delimited interchange needs explicit framing, schema and field semantics at ingestion and emission boundaries.","repair":"Preserve the named invariant at the faulty decision: start + size, line","root_cause":"The end offset includes framing bytes excluded from the cell text.","sha256":"f987b632b173de3d06fa4ca3b26ffd2d2749e738f2a378069b6702e3c1690417","title":"Record spans include the LF terminator in their payload extent · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.989,"exit_code":1,"observations":[{"actual":[["é",0,1,1],["cell",3,6,2]],"check":"unicode","expected":[["é",0,2,1],["cell",3,7,2]],"passed":false},{"actual":[["a",0,0,1],["",2,2,2],["b",3,3,3]],"check":"empty middle","expected":[["a",0,1,1],["",2,2,2],["b",3,4,3]],"passed":false},{"actual":[["a",0,0,1]],"check":"final LF","expected":[["a",0,1,1]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["",0,0,1]],"check":"only LF","expected":[["",0,0,1]],"passed":true},{"actual":[["😀",0,3,1],["z",5,5,2]],"check":"astral","expected":[["😀",0,4,1],["z",5,6,2]],"passed":false},{"actual":[["x",0,0,1]],"check":"no LF","expected":[["x",0,1,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": [[\"é\", 0, 1, 1], [\"cell\", 3, 6, 2]], \"expected\": [[\"é\", 0, 2, 1], [\"cell\", 3, 7, 2]], \"passed\": false}, {\"check\": \"empty middle\", \"actual\": [[\"a\", 0, 0, 1], [\"\", 2, 2, 2], [\"b\", 3, 3, 3]], \"expected\": [[\"a\", 0, 1, 1], [\"\", 2, 2, 2], [\"b\", 3, 4, 3]], \"passed\": false}, {\"check\": \"final LF\", \"actual\": [[\"a\", 0, 0, 1]], \"expected\": [[\"a\", 0, 1, 1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"only LF\", \"actual\": [[\"\", 0, 0, 1]], \"expected\": [[\"\", 0, 0, 1]], \"passed\": true}, {\"check\": \"astral\", \"actual\": [[\"😀\", 0, 3, 1], [\"z\", 5, 5, 2]], \"expected\": [[\"😀\", 0, 4, 1], [\"z\", 5, 6, 2]], \"passed\": false}, {\"check\": \"no LF\", \"actual\": [[\"x\", 0, 0, 1]], \"expected\": [[\"x\", 0, 1, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.376,"exit_code":1,"observations":[{"actual":[["é",0,3,1],["cell",3,8,2]],"check":"unicode","expected":[["é",0,2,1],["cell",3,7,2]],"passed":false},{"actual":[["a",0,2,1],["",2,3,2],["b",3,5,3]],"check":"empty middle","expected":[["a",0,1,1],["",2,2,2],["b",3,4,3]],"passed":false},{"actual":[["a",0,2,1]],"check":"final LF","expected":[["a",0,1,1]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["",0,1,1]],"check":"only LF","expected":[["",0,0,1]],"passed":false},{"actual":[["😀",0,5,1],["z",5,7,2]],"check":"astral","expected":[["😀",0,4,1],["z",5,6,2]],"passed":false},{"actual":[["x",0,2,1]],"check":"no LF","expected":[["x",0,1,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": [[\"é\", 0, 3, 1], [\"cell\", 3, 8, 2]], \"expected\": [[\"é\", 0, 2, 1], [\"cell\", 3, 7, 2]], \"passed\": false}, {\"check\": \"empty middle\", \"actual\": [[\"a\", 0, 2, 1], [\"\", 2, 3, 2], [\"b\", 3, 5, 3]], \"expected\": [[\"a\", 0, 1, 1], [\"\", 2, 2, 2], [\"b\", 3, 4, 3]], \"passed\": false}, {\"check\": \"final LF\", \"actual\": [[\"a\", 0, 2, 1]], \"expected\": [[\"a\", 0, 1, 1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"only LF\", \"actual\": [[\"\", 0, 1, 1]], \"expected\": [[\"\", 0, 0, 1]], \"passed\": false}, {\"check\": \"astral\", \"actual\": [[\"😀\", 0, 5, 1], [\"z\", 5, 7, 2]], \"expected\": [[\"😀\", 0, 4, 1], [\"z\", 5, 6, 2]], \"passed\": false}, {\"check\": \"no LF\", \"actual\": [[\"x\", 0, 2, 1]], \"expected\": [[\"x\", 0, 1, 1]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.492,"exit_code":0,"observations":[{"actual":[["é",0,2,1],["cell",3,7,2]],"check":"unicode","expected":[["é",0,2,1],["cell",3,7,2]],"passed":true},{"actual":[["a",0,1,1],["",2,2,2],["b",3,4,3]],"check":"empty middle","expected":[["a",0,1,1],["",2,2,2],["b",3,4,3]],"passed":true},{"actual":[["a",0,1,1]],"check":"final LF","expected":[["a",0,1,1]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["",0,0,1]],"check":"only LF","expected":[["",0,0,1]],"passed":true},{"actual":[["😀",0,4,1],["z",5,6,2]],"check":"astral","expected":[["😀",0,4,1],["z",5,6,2]],"passed":true},{"actual":[["x",0,1,1]],"check":"no LF","expected":[["x",0,1,1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": [[\"é\", 0, 2, 1], [\"cell\", 3, 7, 2]], \"expected\": [[\"é\", 0, 2, 1], [\"cell\", 3, 7, 2]], \"passed\": true}, {\"check\": \"empty middle\", \"actual\": [[\"a\", 0, 1, 1], [\"\", 2, 2, 2], [\"b\", 3, 4, 3]], \"expected\": [[\"a\", 0, 1, 1], [\"\", 2, 2, 2], [\"b\", 3, 4, 3]], \"passed\": true}, {\"check\": \"final LF\", \"actual\": [[\"a\", 0, 1, 1]], \"expected\": [[\"a\", 0, 1, 1]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"only LF\", \"actual\": [[\"\", 0, 0, 1]], \"expected\": [[\"\", 0, 0, 1]], \"passed\": true}, {\"check\": \"astral\", \"actual\": [[\"😀\", 0, 4, 1], [\"z\", 5, 6, 2]], \"expected\": [[\"😀\", 0, 4, 1], [\"z\", 5, 6, 2]], \"passed\": true}, {\"check\": \"no LF\", \"actual\": [[\"x\", 0, 1, 1]], \"expected\": [[\"x\", 0, 1, 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}