{"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":"Starting after an assumed header shifts positions even when no header exists.","family":"s3-delimited-text-byte-record-spans-physical-line","id":"FA-48086","implementations":{"attempt":{"sha256":"2186d57828cdb1683eca87bc50d281c264cb1a3f604f6808e16afa8f4233e475","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, 2\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"},"broken":{"sha256":"ba1b076ddc5772fb4866502aa7dda19de832bbadafed226c0fe89d383b167964","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, 0\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"},"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-physical-line","generated_at":"2026-09-29T14:44:47.545022+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: out, start, line = [], 0, 1","root_cause":"Record diagnostics use an internal zero-based counter.","sha256":"820c86cd7e310abf7b16c9c2a0982235589057d88cf9acea302ea6e868c87878","title":"Span line numbers start at zero · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.012,"exit_code":1,"observations":[{"actual":[["é",0,2,2],["cell",3,7,3]],"check":"unicode","expected":[["é",0,2,1],["cell",3,7,2]],"passed":false},{"actual":[["a",0,1,2],["",2,2,3],["b",3,4,4]],"check":"empty middle","expected":[["a",0,1,1],["",2,2,2],["b",3,4,3]],"passed":false},{"actual":[["a",0,1,2]],"check":"final LF","expected":[["a",0,1,1]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["",0,0,2]],"check":"only LF","expected":[["",0,0,1]],"passed":false},{"actual":[["😀",0,4,2],["z",5,6,3]],"check":"astral","expected":[["😀",0,4,1],["z",5,6,2]],"passed":false},{"actual":[["x",0,1,2]],"check":"no LF","expected":[["x",0,1,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": [[\"é\", 0, 2, 2], [\"cell\", 3, 7, 3]], \"expected\": [[\"é\", 0, 2, 1], [\"cell\", 3, 7, 2]], \"passed\": false}, {\"check\": \"empty middle\", \"actual\": [[\"a\", 0, 1, 2], [\"\", 2, 2, 3], [\"b\", 3, 4, 4]], \"expected\": [[\"a\", 0, 1, 1], [\"\", 2, 2, 2], [\"b\", 3, 4, 3]], \"passed\": false}, {\"check\": \"final LF\", \"actual\": [[\"a\", 0, 1, 2]], \"expected\": [[\"a\", 0, 1, 1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"only LF\", \"actual\": [[\"\", 0, 0, 2]], \"expected\": [[\"\", 0, 0, 1]], \"passed\": false}, {\"check\": \"astral\", \"actual\": [[\"😀\", 0, 4, 2], [\"z\", 5, 6, 3]], \"expected\": [[\"😀\", 0, 4, 1], [\"z\", 5, 6, 2]], \"passed\": false}, {\"check\": \"no LF\", \"actual\": [[\"x\", 0, 1, 2]], \"expected\": [[\"x\", 0, 1, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.203,"exit_code":1,"observations":[{"actual":[["é",0,2,0],["cell",3,7,1]],"check":"unicode","expected":[["é",0,2,1],["cell",3,7,2]],"passed":false},{"actual":[["a",0,1,0],["",2,2,1],["b",3,4,2]],"check":"empty middle","expected":[["a",0,1,1],["",2,2,2],["b",3,4,3]],"passed":false},{"actual":[["a",0,1,0]],"check":"final LF","expected":[["a",0,1,1]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["",0,0,0]],"check":"only LF","expected":[["",0,0,1]],"passed":false},{"actual":[["😀",0,4,0],["z",5,6,1]],"check":"astral","expected":[["😀",0,4,1],["z",5,6,2]],"passed":false},{"actual":[["x",0,1,0]],"check":"no LF","expected":[["x",0,1,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": [[\"é\", 0, 2, 0], [\"cell\", 3, 7, 1]], \"expected\": [[\"é\", 0, 2, 1], [\"cell\", 3, 7, 2]], \"passed\": false}, {\"check\": \"empty middle\", \"actual\": [[\"a\", 0, 1, 0], [\"\", 2, 2, 1], [\"b\", 3, 4, 2]], \"expected\": [[\"a\", 0, 1, 1], [\"\", 2, 2, 2], [\"b\", 3, 4, 3]], \"passed\": false}, {\"check\": \"final LF\", \"actual\": [[\"a\", 0, 1, 0]], \"expected\": [[\"a\", 0, 1, 1]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"only LF\", \"actual\": [[\"\", 0, 0, 0]], \"expected\": [[\"\", 0, 0, 1]], \"passed\": false}, {\"check\": \"astral\", \"actual\": [[\"😀\", 0, 4, 0], [\"z\", 5, 6, 1]], \"expected\": [[\"😀\", 0, 4, 1], [\"z\", 5, 6, 2]], \"passed\": false}, {\"check\": \"no LF\", \"actual\": [[\"x\", 0, 1, 0]], \"expected\": [[\"x\", 0, 1, 1]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.934,"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"}