{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":10,"contract":"Frame raw TSV records from arbitrary string chunks using CRLF only. Bare CR and bare LF are invalid. A trailing nonterminated record is allowed; a final CR is invalid. Return records without terminators, retaining empty records.","evaluation_group":"s3-delimited-text-crlf-chunk-framer","failed_approach":"A length guard still drops a legitimate one-character fragment.","family":"s3-delimited-text-crlf-chunk-framer-eof-fragment","id":"FA-47526","implementations":{"attempt":{"sha256":"d015353831672036d10ac8738cbe5a4b60e544636fa86cb701309714c4ce7929","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, buf, pending = [], [], False\n    for chunk in data:\n        for ch in chunk:\n            if pending:\n                if ch != '\\n': return None\n                rows.append(''.join(buf))\n                buf, pending = [], False\n            elif ch == '\\r': pending = True\n            elif ch == '\\n': return None\n            else: buf.append(ch)\n    if pending: return None\n    if len(buf) > 1: rows.append(''.join(buf))\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('split terminator', solve(_vary(['@\\r', '\\nZ\\r', '\\n'])), _vary(['@', 'Z']))\ncheck('whole', solve(_vary(['@\\tA\\r\\nB'])), _vary(['@\\tA', 'B']))\ncheck('empty records', solve(_vary(['\\r\\n\\r\\n'])), _vary(['', '']))\ncheck('empty chunks', solve(_vary(['', '@', '', '\\r', '', '\\n', ''])), _vary(['@']))\ncheck('trailing CR', solve(_vary(['@\\r'])), _vary(None))\ncheck('bare LF', solve(_vary(['@\\n'])), _vary(None))\ncheck('bad CR', solve(_vary(['@\\rZ'])), _vary(None))\ncheck('no data', solve(_vary([])), _vary([]))\ncheck('trailing unframed', solve(_vary(['@'])), _vary(['@']))\ncheck('three chunks', solve(_vary(['@\\r', '\\n', 'X'])), _vary(['@', 'X']))\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":"d1b19d84d8f862ec24fcef93676f8aefa6913e498f569b8b9df12990ae5b5250","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, buf, pending = [], [], False\n    for chunk in data:\n        for ch in chunk:\n            if pending:\n                if ch != '\\n': return None\n                rows.append(''.join(buf))\n                buf, pending = [], False\n            elif ch == '\\r': pending = True\n            elif ch == '\\n': return None\n            else: buf.append(ch)\n    if pending: return None\n    if False: rows.append(''.join(buf))\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('split terminator', solve(_vary(['@\\r', '\\nZ\\r', '\\n'])), _vary(['@', 'Z']))\ncheck('whole', solve(_vary(['@\\tA\\r\\nB'])), _vary(['@\\tA', 'B']))\ncheck('empty records', solve(_vary(['\\r\\n\\r\\n'])), _vary(['', '']))\ncheck('empty chunks', solve(_vary(['', '@', '', '\\r', '', '\\n', ''])), _vary(['@']))\ncheck('trailing CR', solve(_vary(['@\\r'])), _vary(None))\ncheck('bare LF', solve(_vary(['@\\n'])), _vary(None))\ncheck('bad CR', solve(_vary(['@\\rZ'])), _vary(None))\ncheck('no data', solve(_vary([])), _vary([]))\ncheck('trailing unframed', solve(_vary(['@'])), _vary(['@']))\ncheck('three chunks', solve(_vary(['@\\r', '\\n', 'X'])), _vary(['@', 'X']))\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":"f495bf941e395e1a4d39a9c3aa637de71fe7a5e1e9f5955fd1bc41eb65d05334","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, buf, pending = [], [], False\n    for chunk in data:\n        for ch in chunk:\n            if pending:\n                if ch != '\\n': return None\n                rows.append(''.join(buf))\n                buf, pending = [], False\n            elif ch == '\\r': pending = True\n            elif ch == '\\n': return None\n            else: buf.append(ch)\n    if pending: return None\n    if buf: rows.append(''.join(buf))\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('split terminator', solve(_vary(['@\\r', '\\nZ\\r', '\\n'])), _vary(['@', 'Z']))\ncheck('whole', solve(_vary(['@\\tA\\r\\nB'])), _vary(['@\\tA', 'B']))\ncheck('empty records', solve(_vary(['\\r\\n\\r\\n'])), _vary(['', '']))\ncheck('empty chunks', solve(_vary(['', '@', '', '\\r', '', '\\n', ''])), _vary(['@']))\ncheck('trailing CR', solve(_vary(['@\\r'])), _vary(None))\ncheck('bare LF', solve(_vary(['@\\n'])), _vary(None))\ncheck('bad CR', solve(_vary(['@\\rZ'])), _vary(None))\ncheck('no data', solve(_vary([])), _vary([]))\ncheck('trailing unframed', solve(_vary(['@'])), _vary(['@']))\ncheck('three chunks', solve(_vary(['@\\r', '\\n', 'X'])), _vary(['@', 'X']))\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-crlf-chunk-framer-eof-fragment","generated_at":"2026-09-29T14:44:42.312191+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: if buf: rows.append(''.join(buf))","root_cause":"EOF publishes only explicitly terminated records despite allowing final fragments.","sha256":"f14f9a984277b11de8c468d50703667ecb9cf09207b9b88d4d9dfdefab2494c7","title":"A complete unterminated final record is discarded · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":47.742,"exit_code":1,"observations":[{"actual":["cell","Z"],"check":"split terminator","expected":["cell","Z"],"passed":true},{"actual":["cell\tA"],"check":"whole","expected":["cell\tA","B"],"passed":false},{"actual":["",""],"check":"empty records","expected":["",""],"passed":true},{"actual":["cell"],"check":"empty chunks","expected":["cell"],"passed":true},{"actual":null,"check":"trailing CR","expected":null,"passed":true},{"actual":null,"check":"bare LF","expected":null,"passed":true},{"actual":null,"check":"bad CR","expected":null,"passed":true},{"actual":[],"check":"no data","expected":[],"passed":true},{"actual":["cell"],"check":"trailing unframed","expected":["cell"],"passed":true},{"actual":["cell"],"check":"three chunks","expected":["cell","X"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"split terminator\", \"actual\": [\"cell\", \"Z\"], \"expected\": [\"cell\", \"Z\"], \"passed\": true}, {\"check\": \"whole\", \"actual\": [\"cell\\tA\"], \"expected\": [\"cell\\tA\", \"B\"], \"passed\": false}, {\"check\": \"empty records\", \"actual\": [\"\", \"\"], \"expected\": [\"\", \"\"], \"passed\": true}, {\"check\": \"empty chunks\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}, {\"check\": \"trailing CR\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bare LF\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad CR\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"no data\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing unframed\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}, {\"check\": \"three chunks\", \"actual\": [\"cell\"], \"expected\": [\"cell\", \"X\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.774,"exit_code":1,"observations":[{"actual":["cell","Z"],"check":"split terminator","expected":["cell","Z"],"passed":true},{"actual":["cell\tA"],"check":"whole","expected":["cell\tA","B"],"passed":false},{"actual":["",""],"check":"empty records","expected":["",""],"passed":true},{"actual":["cell"],"check":"empty chunks","expected":["cell"],"passed":true},{"actual":null,"check":"trailing CR","expected":null,"passed":true},{"actual":null,"check":"bare LF","expected":null,"passed":true},{"actual":null,"check":"bad CR","expected":null,"passed":true},{"actual":[],"check":"no data","expected":[],"passed":true},{"actual":[],"check":"trailing unframed","expected":["cell"],"passed":false},{"actual":["cell"],"check":"three chunks","expected":["cell","X"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"split terminator\", \"actual\": [\"cell\", \"Z\"], \"expected\": [\"cell\", \"Z\"], \"passed\": true}, {\"check\": \"whole\", \"actual\": [\"cell\\tA\"], \"expected\": [\"cell\\tA\", \"B\"], \"passed\": false}, {\"check\": \"empty records\", \"actual\": [\"\", \"\"], \"expected\": [\"\", \"\"], \"passed\": true}, {\"check\": \"empty chunks\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}, {\"check\": \"trailing CR\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bare LF\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad CR\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"no data\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing unframed\", \"actual\": [], \"expected\": [\"cell\"], \"passed\": false}, {\"check\": \"three chunks\", \"actual\": [\"cell\"], \"expected\": [\"cell\", \"X\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":46.976,"exit_code":0,"observations":[{"actual":["cell","Z"],"check":"split terminator","expected":["cell","Z"],"passed":true},{"actual":["cell\tA","B"],"check":"whole","expected":["cell\tA","B"],"passed":true},{"actual":["",""],"check":"empty records","expected":["",""],"passed":true},{"actual":["cell"],"check":"empty chunks","expected":["cell"],"passed":true},{"actual":null,"check":"trailing CR","expected":null,"passed":true},{"actual":null,"check":"bare LF","expected":null,"passed":true},{"actual":null,"check":"bad CR","expected":null,"passed":true},{"actual":[],"check":"no data","expected":[],"passed":true},{"actual":["cell"],"check":"trailing unframed","expected":["cell"],"passed":true},{"actual":["cell","X"],"check":"three chunks","expected":["cell","X"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"split terminator\", \"actual\": [\"cell\", \"Z\"], \"expected\": [\"cell\", \"Z\"], \"passed\": true}, {\"check\": \"whole\", \"actual\": [\"cell\\tA\", \"B\"], \"expected\": [\"cell\\tA\", \"B\"], \"passed\": true}, {\"check\": \"empty records\", \"actual\": [\"\", \"\"], \"expected\": [\"\", \"\"], \"passed\": true}, {\"check\": \"empty chunks\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}, {\"check\": \"trailing CR\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bare LF\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad CR\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"no data\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing unframed\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}, {\"check\": \"three chunks\", \"actual\": [\"cell\", \"X\"], \"expected\": [\"cell\", \"X\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}