{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Encode a list of text cells as TSV without a terminator. Escape backslashes before introducing backslash-t, backslash-n, backslash-r; preserve empty columns and all other text.","evaluation_group":"s3-delimited-text-escaped-tsv-writer","failed_approach":"Trimming delimiters preserves inner gaps but still removes edge columns.","family":"s3-delimited-text-escaped-tsv-writer-empty-columns","id":"FA-47436","implementations":{"attempt":{"sha256":"4cbdf6f3636c54aaba8509ebb9fd74a9e56e06478302a0c11df480b92972a01c","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    out = []\n    for field in data:\n        field = field.replace('\\\\', '\\\\\\\\')\n        field = field.replace('\\t', '\\\\t')\n        field = field.replace('\\n', '\\\\n')\n        field = field.replace('\\r', '\\\\r')\n        out.append(field)\n    return '\\t'.join(out).strip('\\t')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('all controls', solve(_vary(['@\\t\\n\\r\\\\'])), _vary('@\\\\t\\\\n\\\\r\\\\\\\\'))\ncheck('empty cells', solve(_vary(['', '@', ''])), _vary('\\t@\\t'))\ncheck('literal slash-t', solve(_vary(['\\\\t'])), _vary('\\\\\\\\t'))\ncheck('normal', solve(_vary(['@', 'x'])), _vary('@\\tx'))\ncheck('zero columns', solve(_vary([])), _vary(''))\ncheck('all empty', solve(_vary(['', '', ''])), _vary('\\t\\t'))\ncheck('LF only', solve(_vary(['\\n'])), _vary('\\\\n'))\ncheck('CR only', solve(_vary(['\\r'])), _vary('\\\\r'))\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":"b445234f11a43b2acef214d46d36d66a254f57670a22dab6c45e2cc7cfd8e41b","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    out = []\n    for field in data:\n        field = field.replace('\\\\', '\\\\\\\\')\n        field = field.replace('\\t', '\\\\t')\n        field = field.replace('\\n', '\\\\n')\n        field = field.replace('\\r', '\\\\r')\n        out.append(field)\n    return '\\t'.join(x for x in out if x)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('all controls', solve(_vary(['@\\t\\n\\r\\\\'])), _vary('@\\\\t\\\\n\\\\r\\\\\\\\'))\ncheck('empty cells', solve(_vary(['', '@', ''])), _vary('\\t@\\t'))\ncheck('literal slash-t', solve(_vary(['\\\\t'])), _vary('\\\\\\\\t'))\ncheck('normal', solve(_vary(['@', 'x'])), _vary('@\\tx'))\ncheck('zero columns', solve(_vary([])), _vary(''))\ncheck('all empty', solve(_vary(['', '', ''])), _vary('\\t\\t'))\ncheck('LF only', solve(_vary(['\\n'])), _vary('\\\\n'))\ncheck('CR only', solve(_vary(['\\r'])), _vary('\\\\r'))\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":"cb59a0aeadc5359c537e056b45d1753eb2d79c66b37674bf20822e8768925ba6","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    out = []\n    for field in data:\n        field = field.replace('\\\\', '\\\\\\\\')\n        field = field.replace('\\t', '\\\\t')\n        field = field.replace('\\n', '\\\\n')\n        field = field.replace('\\r', '\\\\r')\n        out.append(field)\n    return '\\t'.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('all controls', solve(_vary(['@\\t\\n\\r\\\\'])), _vary('@\\\\t\\\\n\\\\r\\\\\\\\'))\ncheck('empty cells', solve(_vary(['', '@', ''])), _vary('\\t@\\t'))\ncheck('literal slash-t', solve(_vary(['\\\\t'])), _vary('\\\\\\\\t'))\ncheck('normal', solve(_vary(['@', 'x'])), _vary('@\\tx'))\ncheck('zero columns', solve(_vary([])), _vary(''))\ncheck('all empty', solve(_vary(['', '', ''])), _vary('\\t\\t'))\ncheck('LF only', solve(_vary(['\\n'])), _vary('\\\\n'))\ncheck('CR only', solve(_vary(['\\r'])), _vary('\\\\r'))\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-escaped-tsv-writer-empty-columns","generated_at":"2026-09-29T14:44:41.493964+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: return '\\t'.join(out)","root_cause":"Falsy-cell filtering changes positional column identity.","sha256":"6a108656f38ccf775ce7bd09d8dd3d38f642daf63914f47b8e2329ae84d2e5cc","title":"TSV joining omits explicit empty columns · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.766,"exit_code":1,"observations":[{"actual":"cell\\t\\n\\r\\\\","check":"all controls","expected":"cell\\t\\n\\r\\\\","passed":true},{"actual":"cell","check":"empty cells","expected":"\tcell\t","passed":false},{"actual":"\\\\t","check":"literal slash-t","expected":"\\\\t","passed":true},{"actual":"cell\tx","check":"normal","expected":"cell\tx","passed":true},{"actual":"","check":"zero columns","expected":"","passed":true},{"actual":"","check":"all empty","expected":"\t\t","passed":false},{"actual":"\\n","check":"LF only","expected":"\\n","passed":true},{"actual":"\\r","check":"CR only","expected":"\\r","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"all controls\", \"actual\": \"cell\\\\t\\\\n\\\\r\\\\\\\\\", \"expected\": \"cell\\\\t\\\\n\\\\r\\\\\\\\\", \"passed\": true}, {\"check\": \"empty cells\", \"actual\": \"cell\", \"expected\": \"\\tcell\\t\", \"passed\": false}, {\"check\": \"literal slash-t\", \"actual\": \"\\\\\\\\t\", \"expected\": \"\\\\\\\\t\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"cell\\tx\", \"expected\": \"cell\\tx\", \"passed\": true}, {\"check\": \"zero columns\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"all empty\", \"actual\": \"\", \"expected\": \"\\t\\t\", \"passed\": false}, {\"check\": \"LF only\", \"actual\": \"\\\\n\", \"expected\": \"\\\\n\", \"passed\": true}, {\"check\": \"CR only\", \"actual\": \"\\\\r\", \"expected\": \"\\\\r\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.657,"exit_code":1,"observations":[{"actual":"cell\\t\\n\\r\\\\","check":"all controls","expected":"cell\\t\\n\\r\\\\","passed":true},{"actual":"cell","check":"empty cells","expected":"\tcell\t","passed":false},{"actual":"\\\\t","check":"literal slash-t","expected":"\\\\t","passed":true},{"actual":"cell\tx","check":"normal","expected":"cell\tx","passed":true},{"actual":"","check":"zero columns","expected":"","passed":true},{"actual":"","check":"all empty","expected":"\t\t","passed":false},{"actual":"\\n","check":"LF only","expected":"\\n","passed":true},{"actual":"\\r","check":"CR only","expected":"\\r","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"all controls\", \"actual\": \"cell\\\\t\\\\n\\\\r\\\\\\\\\", \"expected\": \"cell\\\\t\\\\n\\\\r\\\\\\\\\", \"passed\": true}, {\"check\": \"empty cells\", \"actual\": \"cell\", \"expected\": \"\\tcell\\t\", \"passed\": false}, {\"check\": \"literal slash-t\", \"actual\": \"\\\\\\\\t\", \"expected\": \"\\\\\\\\t\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"cell\\tx\", \"expected\": \"cell\\tx\", \"passed\": true}, {\"check\": \"zero columns\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"all empty\", \"actual\": \"\", \"expected\": \"\\t\\t\", \"passed\": false}, {\"check\": \"LF only\", \"actual\": \"\\\\n\", \"expected\": \"\\\\n\", \"passed\": true}, {\"check\": \"CR only\", \"actual\": \"\\\\r\", \"expected\": \"\\\\r\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.158,"exit_code":0,"observations":[{"actual":"cell\\t\\n\\r\\\\","check":"all controls","expected":"cell\\t\\n\\r\\\\","passed":true},{"actual":"\tcell\t","check":"empty cells","expected":"\tcell\t","passed":true},{"actual":"\\\\t","check":"literal slash-t","expected":"\\\\t","passed":true},{"actual":"cell\tx","check":"normal","expected":"cell\tx","passed":true},{"actual":"","check":"zero columns","expected":"","passed":true},{"actual":"\t\t","check":"all empty","expected":"\t\t","passed":true},{"actual":"\\n","check":"LF only","expected":"\\n","passed":true},{"actual":"\\r","check":"CR only","expected":"\\r","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"all controls\", \"actual\": \"cell\\\\t\\\\n\\\\r\\\\\\\\\", \"expected\": \"cell\\\\t\\\\n\\\\r\\\\\\\\\", \"passed\": true}, {\"check\": \"empty cells\", \"actual\": \"\\tcell\\t\", \"expected\": \"\\tcell\\t\", \"passed\": true}, {\"check\": \"literal slash-t\", \"actual\": \"\\\\\\\\t\", \"expected\": \"\\\\\\\\t\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"cell\\tx\", \"expected\": \"cell\\tx\", \"passed\": true}, {\"check\": \"zero columns\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"all empty\", \"actual\": \"\\t\\t\", \"expected\": \"\\t\\t\", \"passed\": true}, {\"check\": \"LF only\", \"actual\": \"\\\\n\", \"expected\": \"\\\\n\", \"passed\": true}, {\"check\": \"CR only\", \"actual\": \"\\\\r\", \"expected\": \"\\\\r\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}