{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Append comma rows to existing serialized text. Existing text is either empty or ends in a complete physical record, optionally lacking its final LF. On an empty file emit the supplied header once, followed by new rows. For a nonempty unterminated tail insert exactly one LF before new rows. With no new rows return existing text unchanged.","contract_signature":"data","evaluation_group":"s3-delimited-text-append-table-writer","failed_approach":"The alternate implementation still violates the same declared invariant: appended rows are concatenated without record terminators.","family":"s3-delimited-text-append-table-writer-row-separator","id":"FA-48236","implementations":{"attempt":{"sha256":"d333c56e367bdea45ed7eb327e0523b6a6db15f608ed0cf3186b17ccd908a606","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    if not data['rows']: return data['existing']\n    text=data['existing']\n    if not text: text=','.join(data['header']) + '\\n'\n    elif not text.endswith('\\n'): text+='\\n'\n    for row in data['rows']:\n        text+=','.join(row)+','\n    return text\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new', solve(_vary({'existing': '', 'header': ['a', 'b'], 'rows': [['@', 'x']]})), _vary('a,b\\n@,x\\n'))\ncheck('terminated', solve(_vary({'existing': 'a,b\\nq,z\\n', 'header': ['a', 'b'], 'rows': [['@', 'x']]})), _vary('a,b\\nq,z\\n@,x\\n'))\ncheck('unterminated', solve(_vary({'existing': 'a,b\\nq,z', 'header': ['a', 'b'], 'rows': [['@', 'x']]})), _vary('a,b\\nq,z\\n@,x\\n'))\ncheck('no new', solve(_vary({'existing': 'a,b', 'header': ['a', 'b'], 'rows': []})), _vary('a,b'))\ncheck('empty untouched', solve(_vary({'existing': '', 'header': ['a', 'b'], 'rows': []})), _vary(''))\ncheck('two appended', solve(_vary({'existing': 'a\\n', 'header': ['a'], 'rows': [['@'], ['z']]})), _vary('a\\n@\\nz\\n'))\ncheck('empty cells', solve(_vary({'existing': '', 'header': ['a', 'b'], 'rows': [['', '']]})), _vary('a,b\\n,\\n'))\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":"f94b43bf65420310fa8e3d90e7790b6125e08d2e29e62b888c072c03fbf0b4f6","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    if not data['rows']: return data['existing']\n    text=data['existing']\n    if not text: text=','.join(data['header']) + '\\n'\n    elif not text.endswith('\\n'): text+='\\n'\n    for row in data['rows']:\n        text+=','.join(row)\n    return text\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new', solve(_vary({'existing': '', 'header': ['a', 'b'], 'rows': [['@', 'x']]})), _vary('a,b\\n@,x\\n'))\ncheck('terminated', solve(_vary({'existing': 'a,b\\nq,z\\n', 'header': ['a', 'b'], 'rows': [['@', 'x']]})), _vary('a,b\\nq,z\\n@,x\\n'))\ncheck('unterminated', solve(_vary({'existing': 'a,b\\nq,z', 'header': ['a', 'b'], 'rows': [['@', 'x']]})), _vary('a,b\\nq,z\\n@,x\\n'))\ncheck('no new', solve(_vary({'existing': 'a,b', 'header': ['a', 'b'], 'rows': []})), _vary('a,b'))\ncheck('empty untouched', solve(_vary({'existing': '', 'header': ['a', 'b'], 'rows': []})), _vary(''))\ncheck('two appended', solve(_vary({'existing': 'a\\n', 'header': ['a'], 'rows': [['@'], ['z']]})), _vary('a\\n@\\nz\\n'))\ncheck('empty cells', solve(_vary({'existing': '', 'header': ['a', 'b'], 'rows': [['', '']]})), _vary('a,b\\n,\\n'))\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-append-table-writer-row-separator","generated_at":"2026-09-29T14:44:48.937112+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":"Appended rows are concatenated without record terminators.","sha256":"72c846b1c1da6c6da724eb984d5f4c75c821d2923af2d50fb13f79363a89595f","title":"Appended rows are concatenated without record terminators · 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":40.698,"exit_code":1,"observations":[{"actual":"a,b\ncell,x,","check":"new","expected":"a,b\ncell,x\n","passed":false},{"actual":"a,b\nq,z\ncell,x,","check":"terminated","expected":"a,b\nq,z\ncell,x\n","passed":false},{"actual":"a,b\nq,z\ncell,x,","check":"unterminated","expected":"a,b\nq,z\ncell,x\n","passed":false},{"actual":"a,b","check":"no new","expected":"a,b","passed":true},{"actual":"","check":"empty untouched","expected":"","passed":true},{"actual":"a\ncell,z,","check":"two appended","expected":"a\ncell\nz\n","passed":false},{"actual":"a,b\n,,","check":"empty cells","expected":"a,b\n,\n","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new\", \"actual\": \"a,b\\ncell,x,\", \"expected\": \"a,b\\ncell,x\\n\", \"passed\": false}, {\"check\": \"terminated\", \"actual\": \"a,b\\nq,z\\ncell,x,\", \"expected\": \"a,b\\nq,z\\ncell,x\\n\", \"passed\": false}, {\"check\": \"unterminated\", \"actual\": \"a,b\\nq,z\\ncell,x,\", \"expected\": \"a,b\\nq,z\\ncell,x\\n\", \"passed\": false}, {\"check\": \"no new\", \"actual\": \"a,b\", \"expected\": \"a,b\", \"passed\": true}, {\"check\": \"empty untouched\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"two appended\", \"actual\": \"a\\ncell,z,\", \"expected\": \"a\\ncell\\nz\\n\", \"passed\": false}, {\"check\": \"empty cells\", \"actual\": \"a,b\\n,,\", \"expected\": \"a,b\\n,\\n\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.785,"exit_code":1,"observations":[{"actual":"a,b\ncell,x","check":"new","expected":"a,b\ncell,x\n","passed":false},{"actual":"a,b\nq,z\ncell,x","check":"terminated","expected":"a,b\nq,z\ncell,x\n","passed":false},{"actual":"a,b\nq,z\ncell,x","check":"unterminated","expected":"a,b\nq,z\ncell,x\n","passed":false},{"actual":"a,b","check":"no new","expected":"a,b","passed":true},{"actual":"","check":"empty untouched","expected":"","passed":true},{"actual":"a\ncellz","check":"two appended","expected":"a\ncell\nz\n","passed":false},{"actual":"a,b\n,","check":"empty cells","expected":"a,b\n,\n","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new\", \"actual\": \"a,b\\ncell,x\", \"expected\": \"a,b\\ncell,x\\n\", \"passed\": false}, {\"check\": \"terminated\", \"actual\": \"a,b\\nq,z\\ncell,x\", \"expected\": \"a,b\\nq,z\\ncell,x\\n\", \"passed\": false}, {\"check\": \"unterminated\", \"actual\": \"a,b\\nq,z\\ncell,x\", \"expected\": \"a,b\\nq,z\\ncell,x\\n\", \"passed\": false}, {\"check\": \"no new\", \"actual\": \"a,b\", \"expected\": \"a,b\", \"passed\": true}, {\"check\": \"empty untouched\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"two appended\", \"actual\": \"a\\ncellz\", \"expected\": \"a\\ncell\\nz\\n\", \"passed\": false}, {\"check\": \"empty cells\", \"actual\": \"a,b\\n,\", \"expected\": \"a,b\\n,\\n\", \"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."}}