{"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].","contract_signature":"data","evaluation_group":"s3-delimited-text-csv-line-provenance","failed_approach":"The alternate implementation still violates the same declared invariant: csv row provenance reverses start and end positions.","family":"s3-delimited-text-csv-line-provenance-provenance-swapped","id":"FA-48806","implementations":{"attempt":{"sha256":"984978926d77b7089da8a9534938c4c796dabf4da87bcbb33f63d9d55ce1af28","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-start,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":"9634ab427065be3be71fc9d89fb7dc28c068986372e8d840c0b90568faa7850f","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([end,start,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-provenance-swapped","generated_at":"2026-09-29T14:44:54.069098+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.","root_cause":"CSV row provenance reverses start and end positions.","sha256":"96251ce58d5afc803739efe2a58661c860fdf25b8161604458318de38850ac93","title":"CSV row provenance reverses start and end positions · 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":39.637,"exit_code":1,"observations":[{"actual":[[1,1,["a","x\ny"]],[3,0,["z","cell"]]],"check":"multiline","expected":[[1,2,["a","x\ny"]],[3,3,["z","cell"]]],"passed":false},{"actual":[[1,0,["a"]],[2,0,[]],[3,0,["z"]]],"check":"blank middle","expected":[[1,1,["a"]],[2,2,[]],[3,3,["z"]]],"passed":false},{"actual":[[1,0,["cell","x"]]],"check":"plain","expected":[[1,1,["cell","x"]]],"passed":false},{"actual":[[1,1,["a\r\nb","z"]]],"check":"CRLF","expected":[[1,2,["a\r\nb","z"]]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,0,["cell"]]],"check":"unterminated final","expected":[[1,1,["cell"]]],"passed":false},{"actual":[[1,1,["a\nb"]],[3,1,["c\nd"]]],"check":"two multiline","expected":[[1,2,["a\nb"]],[3,4,["c\nd"]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"multiline\", \"actual\": [[1, 1, [\"a\", \"x\\ny\"]], [3, 0, [\"z\", \"cell\"]]], \"expected\": [[1, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"passed\": false}, {\"check\": \"blank middle\", \"actual\": [[1, 0, [\"a\"]], [2, 0, []], [3, 0, [\"z\"]]], \"expected\": [[1, 1, [\"a\"]], [2, 2, []], [3, 3, [\"z\"]]], \"passed\": false}, {\"check\": \"plain\", \"actual\": [[1, 0, [\"cell\", \"x\"]]], \"expected\": [[1, 1, [\"cell\", \"x\"]]], \"passed\": false}, {\"check\": \"CRLF\", \"actual\": [[1, 1, [\"a\\r\\nb\", \"z\"]]], \"expected\": [[1, 2, [\"a\\r\\nb\", \"z\"]]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated final\", \"actual\": [[1, 0, [\"cell\"]]], \"expected\": [[1, 1, [\"cell\"]]], \"passed\": false}, {\"check\": \"two multiline\", \"actual\": [[1, 1, [\"a\\nb\"]], [3, 1, [\"c\\nd\"]]], \"expected\": [[1, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.268,"exit_code":1,"observations":[{"actual":[[2,1,["a","x\ny"]],[3,3,["z","cell"]]],"check":"multiline","expected":[[1,2,["a","x\ny"]],[3,3,["z","cell"]]],"passed":false},{"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":[[2,1,["a\r\nb","z"]]],"check":"CRLF","expected":[[1,2,["a\r\nb","z"]]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,1,["cell"]]],"check":"unterminated final","expected":[[1,1,["cell"]]],"passed":true},{"actual":[[2,1,["a\nb"]],[4,3,["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, 1, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"expected\": [[1, 2, [\"a\", \"x\\ny\"]], [3, 3, [\"z\", \"cell\"]]], \"passed\": false}, {\"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\": [[2, 1, [\"a\\r\\nb\", \"z\"]]], \"expected\": [[1, 2, [\"a\\r\\nb\", \"z\"]]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated final\", \"actual\": [[1, 1, [\"cell\"]]], \"expected\": [[1, 1, [\"cell\"]]], \"passed\": true}, {\"check\": \"two multiline\", \"actual\": [[2, 1, [\"a\\nb\"]], [4, 3, [\"c\\nd\"]]], \"expected\": [[1, 2, [\"a\\nb\"]], [3, 4, [\"c\\nd\"]]], \"passed\": false}], \"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."}}