{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Write text cells in canonical concatenated length:payload, form with Unicode-code-point lengths, not encoded byte lengths. Empty cells are explicit 0:, and an empty list emits empty text. Do not escape delimiters appearing inside payload.","evaluation_group":"s3-delimited-text-length-cell-writer","failed_approach":"The alternate implementation still violates the same declared invariant: a length-cell writer omits the mandatory trailing delimiter.","family":"s3-delimited-text-length-cell-writer-final-comma","id":"FA-48281","implementations":{"attempt":{"sha256":"8af649e86939de8d9c5634a83c3f51d3cc225290df43a97d1bafe94b37bf5831","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 cell in data:\n        size=len(cell)\n        token=str(size)\n        out.append(token+':'+cell+';')\n    return ''.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unicode', solve(_vary(['é'])), _vary('1:é,'))\ncheck('empty cell', solve(_vary([''])), _vary('0:,'))\ncheck('delimiters', solve(_vary(['a:b,c'])), _vary('5:a:b,c,'))\ncheck('several', solve(_vary(['a', 'bc'])), _vary('1:a,2:bc,'))\ncheck('empty list', solve(_vary([])), _vary(''))\ncheck('ASCII', solve(_vary(['abcd'])), _vary('4:abcd,'))\ncheck('astral', solve(_vary(['😀'])), _vary('1:😀,'))\ncheck('variant payload extent', solve(['x'*N]), str(N)+':'+('x'*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":"573fcd3476d854e9b699b54249a1f6e9c6a35c1abc53be0005cd4b904d9842f6","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 cell in data:\n        size=len(cell)\n        token=str(size)\n        out.append(token+':'+cell)\n    return ''.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unicode', solve(_vary(['é'])), _vary('1:é,'))\ncheck('empty cell', solve(_vary([''])), _vary('0:,'))\ncheck('delimiters', solve(_vary(['a:b,c'])), _vary('5:a:b,c,'))\ncheck('several', solve(_vary(['a', 'bc'])), _vary('1:a,2:bc,'))\ncheck('empty list', solve(_vary([])), _vary(''))\ncheck('ASCII', solve(_vary(['abcd'])), _vary('4:abcd,'))\ncheck('astral', solve(_vary(['😀'])), _vary('1:😀,'))\ncheck('variant payload extent', solve(['x'*N]), str(N)+':'+('x'*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"},"fixed":{"sha256":"f09bf3b090d8cf036f150411d47f0cd35aad71493a8a39073e6f98dbd0ba9de1","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 cell in data:\n        size=len(cell)\n        token=str(size)\n        out.append(token+':'+cell+',')\n    return ''.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unicode', solve(_vary(['é'])), _vary('1:é,'))\ncheck('empty cell', solve(_vary([''])), _vary('0:,'))\ncheck('delimiters', solve(_vary(['a:b,c'])), _vary('5:a:b,c,'))\ncheck('several', solve(_vary(['a', 'bc'])), _vary('1:a,2:bc,'))\ncheck('empty list', solve(_vary([])), _vary(''))\ncheck('ASCII', solve(_vary(['abcd'])), _vary('4:abcd,'))\ncheck('astral', solve(_vary(['😀'])), _vary('1:😀,'))\ncheck('variant payload extent', solve(['x'*N]), str(N)+':'+('x'*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-length-cell-writer-final-comma","generated_at":"2026-09-29T14:44:49.355659+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: out.append(token+':'+cell+',')","root_cause":"A length-cell writer omits the mandatory trailing delimiter.","sha256":"2cd0dbc4187c648d3a783d66b19ef54be02b376a1a47a1a5e88c9c572d4e3697","title":"A length-cell writer omits the mandatory trailing delimiter · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.49,"exit_code":1,"observations":[{"actual":"1:é;","check":"unicode","expected":"1:é,","passed":false},{"actual":"0:;","check":"empty cell","expected":"0:,","passed":false},{"actual":"5:a:b,c;","check":"delimiters","expected":"5:a:b,c,","passed":false},{"actual":"1:a;2:bc;","check":"several","expected":"1:a,2:bc,","passed":false},{"actual":"","check":"empty list","expected":"","passed":true},{"actual":"4:abcd;","check":"ASCII","expected":"4:abcd,","passed":false},{"actual":"1:😀;","check":"astral","expected":"1:😀,","passed":false},{"actual":"1:x;","check":"variant payload extent","expected":"1:x,","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": \"1:é;\", \"expected\": \"1:é,\", \"passed\": false}, {\"check\": \"empty cell\", \"actual\": \"0:;\", \"expected\": \"0:,\", \"passed\": false}, {\"check\": \"delimiters\", \"actual\": \"5:a:b,c;\", \"expected\": \"5:a:b,c,\", \"passed\": false}, {\"check\": \"several\", \"actual\": \"1:a;2:bc;\", \"expected\": \"1:a,2:bc,\", \"passed\": false}, {\"check\": \"empty list\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"ASCII\", \"actual\": \"4:abcd;\", \"expected\": \"4:abcd,\", \"passed\": false}, {\"check\": \"astral\", \"actual\": \"1:😀;\", \"expected\": \"1:😀,\", \"passed\": false}, {\"check\": \"variant payload extent\", \"actual\": \"1:x;\", \"expected\": \"1:x,\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.603,"exit_code":1,"observations":[{"actual":"1:é","check":"unicode","expected":"1:é,","passed":false},{"actual":"0:","check":"empty cell","expected":"0:,","passed":false},{"actual":"5:a:b,c","check":"delimiters","expected":"5:a:b,c,","passed":false},{"actual":"1:a2:bc","check":"several","expected":"1:a,2:bc,","passed":false},{"actual":"","check":"empty list","expected":"","passed":true},{"actual":"4:abcd","check":"ASCII","expected":"4:abcd,","passed":false},{"actual":"1:😀","check":"astral","expected":"1:😀,","passed":false},{"actual":"1:x","check":"variant payload extent","expected":"1:x,","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": \"1:é\", \"expected\": \"1:é,\", \"passed\": false}, {\"check\": \"empty cell\", \"actual\": \"0:\", \"expected\": \"0:,\", \"passed\": false}, {\"check\": \"delimiters\", \"actual\": \"5:a:b,c\", \"expected\": \"5:a:b,c,\", \"passed\": false}, {\"check\": \"several\", \"actual\": \"1:a2:bc\", \"expected\": \"1:a,2:bc,\", \"passed\": false}, {\"check\": \"empty list\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"ASCII\", \"actual\": \"4:abcd\", \"expected\": \"4:abcd,\", \"passed\": false}, {\"check\": \"astral\", \"actual\": \"1:😀\", \"expected\": \"1:😀,\", \"passed\": false}, {\"check\": \"variant payload extent\", \"actual\": \"1:x\", \"expected\": \"1:x,\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.37,"exit_code":0,"observations":[{"actual":"1:é,","check":"unicode","expected":"1:é,","passed":true},{"actual":"0:,","check":"empty cell","expected":"0:,","passed":true},{"actual":"5:a:b,c,","check":"delimiters","expected":"5:a:b,c,","passed":true},{"actual":"1:a,2:bc,","check":"several","expected":"1:a,2:bc,","passed":true},{"actual":"","check":"empty list","expected":"","passed":true},{"actual":"4:abcd,","check":"ASCII","expected":"4:abcd,","passed":true},{"actual":"1:😀,","check":"astral","expected":"1:😀,","passed":true},{"actual":"1:x,","check":"variant payload extent","expected":"1:x,","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unicode\", \"actual\": \"1:é,\", \"expected\": \"1:é,\", \"passed\": true}, {\"check\": \"empty cell\", \"actual\": \"0:,\", \"expected\": \"0:,\", \"passed\": true}, {\"check\": \"delimiters\", \"actual\": \"5:a:b,c,\", \"expected\": \"5:a:b,c,\", \"passed\": true}, {\"check\": \"several\", \"actual\": \"1:a,2:bc,\", \"expected\": \"1:a,2:bc,\", \"passed\": true}, {\"check\": \"empty list\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"ASCII\", \"actual\": \"4:abcd,\", \"expected\": \"4:abcd,\", \"passed\": true}, {\"check\": \"astral\", \"actual\": \"1:😀,\", \"expected\": \"1:😀,\", \"passed\": true}, {\"check\": \"variant payload extent\", \"actual\": \"1:x,\", \"expected\": \"1:x,\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}