{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Parse bounded valid CSV text using Python csv.reader and report each logical row with inclusive one-based physical start/end line numbers. Quoted embedded newlines count as physical lines. Empty input gives no rows; blank physical lines are zero-cell rows. Return [start,end,cells].","evaluation_group":"s3-delimited-text-csv-line-provenance","failed_approach":"The alternate implementation still violates the same declared invariant: csv physical line provenance starts from zero.","family":"s3-delimited-text-csv-line-provenance-origin-one","id":"FA-48801","implementations":{"attempt":{"sha256":"6cbc770ad360511268e17e31da2206e7ddc22df65a4af9b8785a87bc22ef4103","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    import csv,io\n    reader=csv.reader(io.StringIO(data,newline=''))\n    out=[]; start=2\n    for cells in reader:\n        end=reader.line_num\n        out.append([start,end,cells])\n        start=end+1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('multiline', solve(_vary('a,\"x\\ny\"\\nz,@\\n')), _vary([[1, 2, ['a', 'x\\ny']], [3, 3, ['z', '@']]]))\ncheck('blank middle', solve(_vary('a\\n\\nz\\n')), _vary([[1, 1, ['a']], [2, 2, []], [3, 3, ['z']]]))\ncheck('plain', solve(_vary('@,x\\n')), _vary([[1, 1, ['@', 'x']]]))\ncheck('CRLF', solve(_vary('\"a\\r\\nb\",z\\r\\n')), _vary([[1, 2, ['a\\r\\nb', 'z']]]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('unterminated final', solve(_vary('@')), _vary([[1, 1, ['@']]]))\ncheck('two multiline', solve(_vary('\"a\\nb\"\\n\"c\\nd\"')), _vary([[1, 2, ['a\\nb']], [3, 4, ['c\\nd']]]))\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":"9ec74c49dd706e5db9c1d8a357b4f64a0d171a33185d5c68c7a5606f72c6a7b0","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    import csv,io\n    reader=csv.reader(io.StringIO(data,newline=''))\n    out=[]; start=0\n    for cells in reader:\n        end=reader.line_num\n        out.append([start,end,cells])\n        start=end+1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('multiline', solve(_vary('a,\"x\\ny\"\\nz,@\\n')), _vary([[1, 2, ['a', 'x\\ny']], [3, 3, ['z', '@']]]))\ncheck('blank middle', solve(_vary('a\\n\\nz\\n')), _vary([[1, 1, ['a']], [2, 2, []], [3, 3, ['z']]]))\ncheck('plain', solve(_vary('@,x\\n')), _vary([[1, 1, ['@', 'x']]]))\ncheck('CRLF', solve(_vary('\"a\\r\\nb\",z\\r\\n')), _vary([[1, 2, ['a\\r\\nb', 'z']]]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('unterminated final', solve(_vary('@')), _vary([[1, 1, ['@']]]))\ncheck('two multiline', solve(_vary('\"a\\nb\"\\n\"c\\nd\"')), _vary([[1, 2, ['a\\nb']], [3, 4, ['c\\nd']]]))\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":"c0dcd833e59189ee8c02f058ae4196f72cb98eb308059eff0a5c0abb27b2d4b0","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    import csv,io\n    reader=csv.reader(io.StringIO(data,newline=''))\n    out=[]; start=1\n    for cells in reader:\n        end=reader.line_num\n        out.append([start,end,cells])\n        start=end+1\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('multiline', solve(_vary('a,\"x\\ny\"\\nz,@\\n')), _vary([[1, 2, ['a', 'x\\ny']], [3, 3, ['z', '@']]]))\ncheck('blank middle', solve(_vary('a\\n\\nz\\n')), _vary([[1, 1, ['a']], [2, 2, []], [3, 3, ['z']]]))\ncheck('plain', solve(_vary('@,x\\n')), _vary([[1, 1, ['@', 'x']]]))\ncheck('CRLF', solve(_vary('\"a\\r\\nb\",z\\r\\n')), _vary([[1, 2, ['a\\r\\nb', 'z']]]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('unterminated final', solve(_vary('@')), _vary([[1, 1, ['@']]]))\ncheck('two multiline', solve(_vary('\"a\\nb\"\\n\"c\\nd\"')), _vary([[1, 2, ['a\\nb']], [3, 4, ['c\\nd']]]))\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-csv-line-provenance-origin-one","generated_at":"2026-09-29T14:44:54.070648+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=1","root_cause":"CSV physical line provenance starts from zero.","sha256":"0dfa5a09971c63658ba0115be930a503c5f0885a86e74b0cc8d5f05552f7f2f6","title":"CSV physical line provenance starts from zero · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.218,"exit_code":1,"observations":[{"actual":[[2,2,["a","x\ny"]],[3,3,["z","cell"]]],"check":"multiline","expected":[[1,2,["a","x\ny"]],[3,3,["z","cell"]]],"passed":false},{"actual":[[2,1,["a"]],[2,2,[]],[3,3,["z"]]],"check":"blank middle","expected":[[1,1,["a"]],[2,2,[]],[3,3,["z"]]],"passed":false},{"actual":[[2,1,["cell","x"]]],"check":"plain","expected":[[1,1,["cell","x"]]],"passed":false},{"actual":[[2,2,["a\r\nb","z"]]],"check":"CRLF","expected":[[1,2,["a\r\nb","z"]]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[2,1,["cell"]]],"check":"unterminated final","expected":[[1,1,["cell"]]],"passed":false},{"actual":[[2,2,["a\nb"]],[3,4,["c\nd"]]],"check":"two multiline","expected":[[1,2,["a\nb"]],[3,4,["c\nd"]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"multiline\", \"actual\": [[2, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"expected\": [[1, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"passed\": false}, {\"check\": \"blank middle\", \"actual\": [[2, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"expected\": [[1, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"passed\": false}, {\"check\": \"plain\", \"actual\": [[2, 1, [\"cell\", \"x\"]]], \"expected\": [[1, 1, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"CRLF\", \"actual\": [[2, 2, [\"a\\r\\nb\", \"z\"]]], \"expected\": [[1, 2, [\"a\\r\\nb\", \"z\"]]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated final\", \"actual\": [[2, 1, [\"cell\"]]], \"expected\": [[1, 1, [\"cell\"]]], \"passed\": false}, {\"check\": \"two multiline\", \"actual\": [[2, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"expected\": [[1, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.925,"exit_code":1,"observations":[{"actual":[[0,2,["a","x\ny"]],[3,3,["z","cell"]]],"check":"multiline","expected":[[1,2,["a","x\ny"]],[3,3,["z","cell"]]],"passed":false},{"actual":[[0,1,["a"]],[2,2,[]],[3,3,["z"]]],"check":"blank middle","expected":[[1,1,["a"]],[2,2,[]],[3,3,["z"]]],"passed":false},{"actual":[[0,1,["cell","x"]]],"check":"plain","expected":[[1,1,["cell","x"]]],"passed":false},{"actual":[[0,2,["a\r\nb","z"]]],"check":"CRLF","expected":[[1,2,["a\r\nb","z"]]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[0,1,["cell"]]],"check":"unterminated final","expected":[[1,1,["cell"]]],"passed":false},{"actual":[[0,2,["a\nb"]],[3,4,["c\nd"]]],"check":"two multiline","expected":[[1,2,["a\nb"]],[3,4,["c\nd"]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"multiline\", \"actual\": [[0, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"expected\": [[1, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"passed\": false}, {\"check\": \"blank middle\", \"actual\": [[0, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"expected\": [[1, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"passed\": false}, {\"check\": \"plain\", \"actual\": [[0, 1, [\"cell\", \"x\"]]], \"expected\": [[1, 1, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"CRLF\", \"actual\": [[0, 2, [\"a\\r\\nb\", \"z\"]]], \"expected\": [[1, 2, [\"a\\r\\nb\", \"z\"]]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated final\", \"actual\": [[0, 1, [\"cell\"]]], \"expected\": [[1, 1, [\"cell\"]]], \"passed\": false}, {\"check\": \"two multiline\", \"actual\": [[0, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"expected\": [[1, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.772,"exit_code":0,"observations":[{"actual":[[1,2,["a","x\ny"]],[3,3,["z","cell"]]],"check":"multiline","expected":[[1,2,["a","x\ny"]],[3,3,["z","cell"]]],"passed":true},{"actual":[[1,1,["a"]],[2,2,[]],[3,3,["z"]]],"check":"blank middle","expected":[[1,1,["a"]],[2,2,[]],[3,3,["z"]]],"passed":true},{"actual":[[1,1,["cell","x"]]],"check":"plain","expected":[[1,1,["cell","x"]]],"passed":true},{"actual":[[1,2,["a\r\nb","z"]]],"check":"CRLF","expected":[[1,2,["a\r\nb","z"]]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,1,["cell"]]],"check":"unterminated final","expected":[[1,1,["cell"]]],"passed":true},{"actual":[[1,2,["a\nb"]],[3,4,["c\nd"]]],"check":"two multiline","expected":[[1,2,["a\nb"]],[3,4,["c\nd"]]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"multiline\", \"actual\": [[1, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"expected\": [[1, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"passed\": true}, {\"check\": \"blank middle\", \"actual\": [[1, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"expected\": [[1, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"passed\": true}, {\"check\": \"plain\", \"actual\": [[1, 1, [\"cell\", \"x\"]]], \"expected\": [[1, 1, [\"cell\", \"x\"]]], \"passed\": true}, {\"check\": \"CRLF\", \"actual\": [[1, 2, [\"a\\r\\nb\", \"z\"]]], \"expected\": [[1, 2, [\"a\\r\\nb\", \"z\"]]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated final\", \"actual\": [[1, 1, [\"cell\"]]], \"expected\": [[1, 1, [\"cell\"]]], \"passed\": true}, {\"check\": \"two multiline\", \"actual\": [[1, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"expected\": [[1, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}