{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Consume arbitrary text chunks of an unquoted LF-delimited table. Complete records emit immediately into an output list; carry partial records across chunks. EOF emits a nonempty remaining fragment, but not a phantom row after final LF. Empty complete physical records are retained. Return comma-split rows.","evaluation_group":"s3-delimited-text-chunked-lf-records","failed_approach":"The alternate implementation still violates the same declared invariant: a new chunk overwrites the unfinished preceding record.","family":"s3-delimited-text-chunked-lf-records-carry-overwrite","id":"FA-48766","implementations":{"attempt":{"sha256":"b799f676be7dcc585d97874f8f07aee0029fe144f1871a875e7bc1aa36483ba0","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    rows=[]; carry=''\n    for chunk in data:\n        carry=chunk+carry\n        while '\\n' in carry:\n            record,carry=carry.split('\\n',1)\n            rows.append(record.split(','))\n    if carry: rows.append(carry.split(','))\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('split cell', solve(_vary(['a,', '@', '\\nx,y\\n'])), _vary([['a', '@'], ['x', 'y']]))\ncheck('several per chunk', solve(_vary(['a,b\\n@,z\\n'])), _vary([['a', 'b'], ['@', 'z']]))\ncheck('empty chunks', solve(_vary(['', '@', '', '\\n', ''])), _vary([['@']]))\ncheck('partial final', solve(_vary(['a,b\\n@'])), _vary([['a', 'b'], ['@']]))\ncheck('empty rows', solve(_vary(['\\n\\n'])), _vary([[''], ['']]))\ncheck('empty input', solve(_vary([])), _vary([]))\ncheck('no newline', solve(_vary(['@'])), _vary([['@']]))\ncheck('split delimiter', solve(_vary(['a', '\\n', 'b'])), _vary([['a'], ['b']]))\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":"52eebe140cd8ad0f1722de6a2912395a8fdcb19b481c60e5a9aaee014a184e24","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    rows=[]; carry=''\n    for chunk in data:\n        carry=chunk\n        while '\\n' in carry:\n            record,carry=carry.split('\\n',1)\n            rows.append(record.split(','))\n    if carry: rows.append(carry.split(','))\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('split cell', solve(_vary(['a,', '@', '\\nx,y\\n'])), _vary([['a', '@'], ['x', 'y']]))\ncheck('several per chunk', solve(_vary(['a,b\\n@,z\\n'])), _vary([['a', 'b'], ['@', 'z']]))\ncheck('empty chunks', solve(_vary(['', '@', '', '\\n', ''])), _vary([['@']]))\ncheck('partial final', solve(_vary(['a,b\\n@'])), _vary([['a', 'b'], ['@']]))\ncheck('empty rows', solve(_vary(['\\n\\n'])), _vary([[''], ['']]))\ncheck('empty input', solve(_vary([])), _vary([]))\ncheck('no newline', solve(_vary(['@'])), _vary([['@']]))\ncheck('split delimiter', solve(_vary(['a', '\\n', 'b'])), _vary([['a'], ['b']]))\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":"85410585cfb2fad32494d3b27709ac40176364ac6f648ab54678ed08bd179c6b","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    rows=[]; carry=''\n    for chunk in data:\n        carry+=chunk\n        while '\\n' in carry:\n            record,carry=carry.split('\\n',1)\n            rows.append(record.split(','))\n    if carry: rows.append(carry.split(','))\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('split cell', solve(_vary(['a,', '@', '\\nx,y\\n'])), _vary([['a', '@'], ['x', 'y']]))\ncheck('several per chunk', solve(_vary(['a,b\\n@,z\\n'])), _vary([['a', 'b'], ['@', 'z']]))\ncheck('empty chunks', solve(_vary(['', '@', '', '\\n', ''])), _vary([['@']]))\ncheck('partial final', solve(_vary(['a,b\\n@'])), _vary([['a', 'b'], ['@']]))\ncheck('empty rows', solve(_vary(['\\n\\n'])), _vary([[''], ['']]))\ncheck('empty input', solve(_vary([])), _vary([]))\ncheck('no newline', solve(_vary(['@'])), _vary([['@']]))\ncheck('split delimiter', solve(_vary(['a', '\\n', 'b'])), _vary([['a'], ['b']]))\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-chunked-lf-records-carry-overwrite","generated_at":"2026-09-29T14:44:53.815271+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: carry+=chunk","root_cause":"A new chunk overwrites the unfinished preceding record.","sha256":"12a4e9a112f036c302270ebfc1780858024afaf0a9640a6bbd0d70c1ba2ac289","title":"A new chunk overwrites the unfinished preceding record · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.903,"exit_code":1,"observations":[{"actual":[[""],["x","y"],["cella",""]],"check":"split cell","expected":[["a","cell"],["x","y"]],"passed":false},{"actual":[["a","b"],["cell","z"]],"check":"several per chunk","expected":[["a","b"],["cell","z"]],"passed":true},{"actual":[[""],["cell"]],"check":"empty chunks","expected":[["cell"]],"passed":false},{"actual":[["a","b"],["cell"]],"check":"partial final","expected":[["a","b"],["cell"]],"passed":true},{"actual":[[""],[""]],"check":"empty rows","expected":[[""],[""]],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[["cell"]],"check":"no newline","expected":[["cell"]],"passed":true},{"actual":[[""],["ba"]],"check":"split delimiter","expected":[["a"],["b"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"split cell\", \"actual\": [[\"\"], [\"x\", \"y\"], [\"cella\", \"\"]], \"expected\": [[\"a\", \"cell\"], [\"x\", \"y\"]], \"passed\": false}, {\"check\": \"several per chunk\", \"actual\": [[\"a\", \"b\"], [\"cell\", \"z\"]], \"expected\": [[\"a\", \"b\"], [\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"empty chunks\", \"actual\": [[\"\"], [\"cell\"]], \"expected\": [[\"cell\"]], \"passed\": false}, {\"check\": \"partial final\", \"actual\": [[\"a\", \"b\"], [\"cell\"]], \"expected\": [[\"a\", \"b\"], [\"cell\"]], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [[\"\"], [\"\"]], \"expected\": [[\"\"], [\"\"]], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no newline\", \"actual\": [[\"cell\"]], \"expected\": [[\"cell\"]], \"passed\": true}, {\"check\": \"split delimiter\", \"actual\": [[\"\"], [\"ba\"]], \"expected\": [[\"a\"], [\"b\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.842,"exit_code":1,"observations":[{"actual":[[""],["x","y"]],"check":"split cell","expected":[["a","cell"],["x","y"]],"passed":false},{"actual":[["a","b"],["cell","z"]],"check":"several per chunk","expected":[["a","b"],["cell","z"]],"passed":true},{"actual":[[""]],"check":"empty chunks","expected":[["cell"]],"passed":false},{"actual":[["a","b"],["cell"]],"check":"partial final","expected":[["a","b"],["cell"]],"passed":true},{"actual":[[""],[""]],"check":"empty rows","expected":[[""],[""]],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[["cell"]],"check":"no newline","expected":[["cell"]],"passed":true},{"actual":[[""],["b"]],"check":"split delimiter","expected":[["a"],["b"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"split cell\", \"actual\": [[\"\"], [\"x\", \"y\"]], \"expected\": [[\"a\", \"cell\"], [\"x\", \"y\"]], \"passed\": false}, {\"check\": \"several per chunk\", \"actual\": [[\"a\", \"b\"], [\"cell\", \"z\"]], \"expected\": [[\"a\", \"b\"], [\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"empty chunks\", \"actual\": [[\"\"]], \"expected\": [[\"cell\"]], \"passed\": false}, {\"check\": \"partial final\", \"actual\": [[\"a\", \"b\"], [\"cell\"]], \"expected\": [[\"a\", \"b\"], [\"cell\"]], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [[\"\"], [\"\"]], \"expected\": [[\"\"], [\"\"]], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no newline\", \"actual\": [[\"cell\"]], \"expected\": [[\"cell\"]], \"passed\": true}, {\"check\": \"split delimiter\", \"actual\": [[\"\"], [\"b\"]], \"expected\": [[\"a\"], [\"b\"]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.295,"exit_code":0,"observations":[{"actual":[["a","cell"],["x","y"]],"check":"split cell","expected":[["a","cell"],["x","y"]],"passed":true},{"actual":[["a","b"],["cell","z"]],"check":"several per chunk","expected":[["a","b"],["cell","z"]],"passed":true},{"actual":[["cell"]],"check":"empty chunks","expected":[["cell"]],"passed":true},{"actual":[["a","b"],["cell"]],"check":"partial final","expected":[["a","b"],["cell"]],"passed":true},{"actual":[[""],[""]],"check":"empty rows","expected":[[""],[""]],"passed":true},{"actual":[],"check":"empty input","expected":[],"passed":true},{"actual":[["cell"]],"check":"no newline","expected":[["cell"]],"passed":true},{"actual":[["a"],["b"]],"check":"split delimiter","expected":[["a"],["b"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"split cell\", \"actual\": [[\"a\", \"cell\"], [\"x\", \"y\"]], \"expected\": [[\"a\", \"cell\"], [\"x\", \"y\"]], \"passed\": true}, {\"check\": \"several per chunk\", \"actual\": [[\"a\", \"b\"], [\"cell\", \"z\"]], \"expected\": [[\"a\", \"b\"], [\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"empty chunks\", \"actual\": [[\"cell\"]], \"expected\": [[\"cell\"]], \"passed\": true}, {\"check\": \"partial final\", \"actual\": [[\"a\", \"b\"], [\"cell\"]], \"expected\": [[\"a\", \"b\"], [\"cell\"]], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [[\"\"], [\"\"]], \"expected\": [[\"\"], [\"\"]], \"passed\": true}, {\"check\": \"empty input\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no newline\", \"actual\": [[\"cell\"]], \"expected\": [[\"cell\"]], \"passed\": true}, {\"check\": \"split delimiter\", \"actual\": [[\"a\"], [\"b\"]], \"expected\": [[\"a\"], [\"b\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}