{"abstract":"A quoted multiline field is either split into records or silently concatenated without its newline.","category":"Serialization","checks":8,"contract":"Read comma-delimited CSV using double-quote escaping and strict parser mode. Preserve embedded CR/LF characters within quoted fields, empty fields, and blank records; return None for parser errors.","evaluation_group":"model-a122f1a2ff1a7dd7","failed_approach":"Using a CSV reader after splitlines understands quotes but has already discarded the embedded line endings.","family":"parse-csv-multiline","id":"FA-196","implementations":{"attempt":{"sha256":"ab4a610ee411cb9183709092eb5c8220a4cf109ccd5688ab73defee611c7e066","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport csv\nimport io\nN = 1\nobservations = []\ndef solve(text):\n    try:\n        return list(csv.reader(text.splitlines(), strict=True))\n    except csv.Error:\n        return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nvalue = 'row' * N\ncheck('embedded LF preserved', solve('\"' + value + '\\nnext\",z\\r\\n'), [[value + '\\nnext', 'z']])\ncheck('embedded CRLF preserved', solve('\"a\\r\\nb\",' + str(N) + '\\r\\n'), [['a\\r\\nb', str(N)]])\ncheck('quoted comma is field content', solve('\"a,b\",c\\n'), [['a,b', 'c']])\ncheck('doubled quote decoded', solve('\"a\"\"b\",c\\n'), [['a\"b', 'c']])\ncheck('trailing empty field', solve(value + ',\\n'), [[value, '']])\ncheck('blank records stay blank records', solve('\\n' + value + '\\n'), [[], [value]])\ncheck('empty input', solve(''), [])\ncheck('unterminated quoted field rejected', solve('\"open,' + value), 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":"d1ba522b69225e593ddbae8dbf92ca23a588432f2c30d622f7cb515956e532e4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport csv\nimport io\nN = 1\nobservations = []\ndef solve(text):\n    return [line.split(',') for line in text.splitlines()]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nvalue = 'row' * N\ncheck('embedded LF preserved', solve('\"' + value + '\\nnext\",z\\r\\n'), [[value + '\\nnext', 'z']])\ncheck('embedded CRLF preserved', solve('\"a\\r\\nb\",' + str(N) + '\\r\\n'), [['a\\r\\nb', str(N)]])\ncheck('quoted comma is field content', solve('\"a,b\",c\\n'), [['a,b', 'c']])\ncheck('doubled quote decoded', solve('\"a\"\"b\",c\\n'), [['a\"b', 'c']])\ncheck('trailing empty field', solve(value + ',\\n'), [[value, '']])\ncheck('blank records stay blank records', solve('\\n' + value + '\\n'), [[], [value]])\ncheck('empty input', solve(''), [])\ncheck('unterminated quoted field rejected', solve('\"open,' + value), 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":"49ccf1e81b6e55e27b51bc9c38d506a8539a44beedcd6df811d71adbb34646f4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport csv\nimport io\nN = 1\nobservations = []\ndef solve(text):\n    try:\n        return list(csv.reader(io.StringIO(text, newline=''), strict=True))\n    except csv.Error:\n        return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nvalue = 'row' * N\ncheck('embedded LF preserved', solve('\"' + value + '\\nnext\",z\\r\\n'), [[value + '\\nnext', 'z']])\ncheck('embedded CRLF preserved', solve('\"a\\r\\nb\",' + str(N) + '\\r\\n'), [['a\\r\\nb', str(N)]])\ncheck('quoted comma is field content', solve('\"a,b\",c\\n'), [['a,b', 'c']])\ncheck('doubled quote decoded', solve('\"a\"\"b\",c\\n'), [['a\"b', 'c']])\ncheck('trailing empty field', solve(value + ',\\n'), [[value, '']])\ncheck('blank records stay blank records', solve('\\n' + value + '\\n'), [[], [value]])\ncheck('empty input', solve(''), [])\ncheck('unterminated quoted field rejected', solve('\"open,' + value), 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":" 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":"parse-csv-multiline","generated_at":"2026-09-29T14:36:51.028600+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"CSV records can span physical lines. Correct quote handling is not enough if the input preparation already removed information.","repair":"Give the CSV parser the original text stream with newline translation disabled.","root_cause":"Physical line splitting happens before a CSV-aware reader can preserve quoted line breaks.","sha256":"27b2330995e058685c30369b02e95a5dfb0823bb85e745da7aae54f3c39dd4ab","title":"Line splitting removes a quoted CSV line break · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":29.538,"exit_code":1,"observations":[{"actual":[["rownext","z"]],"check":"embedded LF preserved","expected":[["row\nnext","z"]],"passed":false},{"actual":[["ab","1"]],"check":"embedded CRLF preserved","expected":[["a\r\nb","1"]],"passed":false},{"actual":[["a,b","c"]],"check":"quoted comma is field content","expected":[["a,b","c"]],"passed":true},{"actual":[["a\"b","c"]],"check":"doubled quote decoded","expected":[["a\"b","c"]],"passed":true},{"actual":[["row",""]],"check":"trailing empty field","expected":[["row",""]],"passed":true},{"actual":[[],["row"]],"check":"blank records stay blank records","expected":[[],["row"]],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":null,"check":"unterminated quoted field rejected","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"embedded LF preserved\", \"actual\": [[\"rownext\", \"z\"]], \"expected\": [[\"row\\nnext\", \"z\"]], \"passed\": false}, {\"check\": \"embedded CRLF preserved\", \"actual\": [[\"ab\", \"1\"]], \"expected\": [[\"a\\r\\nb\", \"1\"]], \"passed\": false}, {\"check\": \"quoted comma is field content\", \"actual\": [[\"a,b\", \"c\"]], \"expected\": [[\"a,b\", \"c\"]], \"passed\": true}, {\"check\": \"doubled quote decoded\", \"actual\": [[\"a\\\"b\", \"c\"]], \"expected\": [[\"a\\\"b\", \"c\"]], \"passed\": true}, {\"check\": \"trailing empty field\", \"actual\": [[\"row\", \"\"]], \"expected\": [[\"row\", \"\"]], \"passed\": true}, {\"check\": \"blank records stay blank records\", \"actual\": [[], [\"row\"]], \"expected\": [[], [\"row\"]], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated quoted field rejected\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":34.33,"exit_code":1,"observations":[{"actual":[["\"row"],["next\"","z"]],"check":"embedded LF preserved","expected":[["row\nnext","z"]],"passed":false},{"actual":[["\"a"],["b\"","1"]],"check":"embedded CRLF preserved","expected":[["a\r\nb","1"]],"passed":false},{"actual":[["\"a","b\"","c"]],"check":"quoted comma is field content","expected":[["a,b","c"]],"passed":false},{"actual":[["\"a\"\"b\"","c"]],"check":"doubled quote decoded","expected":[["a\"b","c"]],"passed":false},{"actual":[["row",""]],"check":"trailing empty field","expected":[["row",""]],"passed":true},{"actual":[[""],["row"]],"check":"blank records stay blank records","expected":[[],["row"]],"passed":false},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[["\"open","row"]],"check":"unterminated quoted field rejected","expected":null,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"embedded LF preserved\", \"actual\": [[\"\\\"row\"], [\"next\\\"\", \"z\"]], \"expected\": [[\"row\\nnext\", \"z\"]], \"passed\": false}, {\"check\": \"embedded CRLF preserved\", \"actual\": [[\"\\\"a\"], [\"b\\\"\", \"1\"]], \"expected\": [[\"a\\r\\nb\", \"1\"]], \"passed\": false}, {\"check\": \"quoted comma is field content\", \"actual\": [[\"\\\"a\", \"b\\\"\", \"c\"]], \"expected\": [[\"a,b\", \"c\"]], \"passed\": false}, {\"check\": \"doubled quote decoded\", \"actual\": [[\"\\\"a\\\"\\\"b\\\"\", \"c\"]], \"expected\": [[\"a\\\"b\", \"c\"]], \"passed\": false}, {\"check\": \"trailing empty field\", \"actual\": [[\"row\", \"\"]], \"expected\": [[\"row\", \"\"]], \"passed\": true}, {\"check\": \"blank records stay blank records\", \"actual\": [[\"\"], [\"row\"]], \"expected\": [[], [\"row\"]], \"passed\": false}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated quoted field rejected\", \"actual\": [[\"\\\"open\", \"row\"]], \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":32.538,"exit_code":0,"observations":[{"actual":[["row\nnext","z"]],"check":"embedded LF preserved","expected":[["row\nnext","z"]],"passed":true},{"actual":[["a\r\nb","1"]],"check":"embedded CRLF preserved","expected":[["a\r\nb","1"]],"passed":true},{"actual":[["a,b","c"]],"check":"quoted comma is field content","expected":[["a,b","c"]],"passed":true},{"actual":[["a\"b","c"]],"check":"doubled quote decoded","expected":[["a\"b","c"]],"passed":true},{"actual":[["row",""]],"check":"trailing empty field","expected":[["row",""]],"passed":true},{"actual":[[],["row"]],"check":"blank records stay blank records","expected":[[],["row"]],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":null,"check":"unterminated quoted field rejected","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"embedded LF preserved\", \"actual\": [[\"row\\nnext\", \"z\"]], \"expected\": [[\"row\\nnext\", \"z\"]], \"passed\": true}, {\"check\": \"embedded CRLF preserved\", \"actual\": [[\"a\\r\\nb\", \"1\"]], \"expected\": [[\"a\\r\\nb\", \"1\"]], \"passed\": true}, {\"check\": \"quoted comma is field content\", \"actual\": [[\"a,b\", \"c\"]], \"expected\": [[\"a,b\", \"c\"]], \"passed\": true}, {\"check\": \"doubled quote decoded\", \"actual\": [[\"a\\\"b\", \"c\"]], \"expected\": [[\"a\\\"b\", \"c\"]], \"passed\": true}, {\"check\": \"trailing empty field\", \"actual\": [[\"row\", \"\"]], \"expected\": [[\"row\", \"\"]], \"passed\": true}, {\"check\": \"blank records stay blank records\", \"actual\": [[], [\"row\"]], \"expected\": [[], [\"row\"]], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"unterminated quoted field rejected\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}