{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":10,"contract":"Decode rows encoded as comma cells followed by |decimal check. The check is the sum of Unicode code points in the exact comma payload modulo 97; this is only a corruption-detection toy, not cryptographic integrity. Use the last pipe as trailer separator, permitting pipes in cells. Reject malformed or mismatched checks. Return fields.","evaluation_group":"s3-delimited-text-row-checksum","failed_approach":"The alternate implementation still violates the same declared invariant: the first literal pipe is mistaken for a checksum trailer separator.","family":"s3-delimited-text-row-checksum-trailer-origin","id":"FA-48451","implementations":{"attempt":{"sha256":"3debfbdac8a01cdb8c0edf1d2893607aa8c5f3ff125cde948852a5a481a72fac","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    parts=data.split('|')\n    if len(parts)!=2: return None\n    payload,token=parts\n    if not token.isascii() or not token.isdecimal(): return None\n    check=int(token)\n    if check>=97: return None\n    expected=sum(ord(ch) for ch in payload)%97\n    if check!=expected: return None\n    return payload.split(',')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('comma', solve(_vary('a,b|45')), _vary(['a', 'b']))\ncheck('empty', solve(_vary('|0')), _vary(['']))\ncheck('pipe data', solve(_vary('a|b|28')), _vary(['a|b']))\ncheck('unicode', solve(_vary('é|39')), _vary(['é']))\ncheck('astral checksum', solve(_vary('😀|84')), _vary(['😀']))\ncheck('bad checksum', solve(_vary('a|1')), _vary(None))\ncheck('bad trailer', solve(_vary('a|-1')), _vary(None))\ncheck('unreduced', solve(_vary('a|97')), _vary(None))\ncheck('normal', solve(_vary('z|25')), _vary(['z']))\ncheck('variant checksum width', solve(('x'*N)+'|'+str((120*N)%97)), ['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":"ae24f5c567b021892a4c76f7a038882e6b7b58db8b1befb3edc0933574089e27","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    parts=data.split('|',1)\n    if len(parts)!=2: return None\n    payload,token=parts\n    if not token.isascii() or not token.isdecimal(): return None\n    check=int(token)\n    if check>=97: return None\n    expected=sum(ord(ch) for ch in payload)%97\n    if check!=expected: return None\n    return payload.split(',')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('comma', solve(_vary('a,b|45')), _vary(['a', 'b']))\ncheck('empty', solve(_vary('|0')), _vary(['']))\ncheck('pipe data', solve(_vary('a|b|28')), _vary(['a|b']))\ncheck('unicode', solve(_vary('é|39')), _vary(['é']))\ncheck('astral checksum', solve(_vary('😀|84')), _vary(['😀']))\ncheck('bad checksum', solve(_vary('a|1')), _vary(None))\ncheck('bad trailer', solve(_vary('a|-1')), _vary(None))\ncheck('unreduced', solve(_vary('a|97')), _vary(None))\ncheck('normal', solve(_vary('z|25')), _vary(['z']))\ncheck('variant checksum width', solve(('x'*N)+'|'+str((120*N)%97)), ['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":"29d730969b37e0a97a1bcc1b47a9743e4aadd304abbb762728730f445f42bbb7","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    parts=data.rsplit('|',1)\n    if len(parts)!=2: return None\n    payload,token=parts\n    if not token.isascii() or not token.isdecimal(): return None\n    check=int(token)\n    if check>=97: return None\n    expected=sum(ord(ch) for ch in payload)%97\n    if check!=expected: return None\n    return payload.split(',')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('comma', solve(_vary('a,b|45')), _vary(['a', 'b']))\ncheck('empty', solve(_vary('|0')), _vary(['']))\ncheck('pipe data', solve(_vary('a|b|28')), _vary(['a|b']))\ncheck('unicode', solve(_vary('é|39')), _vary(['é']))\ncheck('astral checksum', solve(_vary('😀|84')), _vary(['😀']))\ncheck('bad checksum', solve(_vary('a|1')), _vary(None))\ncheck('bad trailer', solve(_vary('a|-1')), _vary(None))\ncheck('unreduced', solve(_vary('a|97')), _vary(None))\ncheck('normal', solve(_vary('z|25')), _vary(['z']))\ncheck('variant checksum width', solve(('x'*N)+'|'+str((120*N)%97)), ['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-row-checksum-trailer-origin","generated_at":"2026-09-29T14:44:50.862072+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: parts=data.rsplit('|',1)","root_cause":"The first literal pipe is mistaken for a checksum trailer separator.","sha256":"a17523d84acec4a15c731425d180a1cf7eca3cfa1f577601133f89badc457adb","title":"The first literal pipe is mistaken for a checksum trailer separator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.759,"exit_code":1,"observations":[{"actual":["a","b"],"check":"comma","expected":["a","b"],"passed":true},{"actual":[""],"check":"empty","expected":[""],"passed":true},{"actual":null,"check":"pipe data","expected":["a|b"],"passed":false},{"actual":["é"],"check":"unicode","expected":["é"],"passed":true},{"actual":["😀"],"check":"astral checksum","expected":["😀"],"passed":true},{"actual":null,"check":"bad checksum","expected":null,"passed":true},{"actual":null,"check":"bad trailer","expected":null,"passed":true},{"actual":null,"check":"unreduced","expected":null,"passed":true},{"actual":["z"],"check":"normal","expected":["z"],"passed":true},{"actual":["x"],"check":"variant checksum width","expected":["x"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"comma\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [\"\"], \"expected\": [\"\"], \"passed\": true}, {\"check\": \"pipe data\", \"actual\": null, \"expected\": [\"a|b\"], \"passed\": false}, {\"check\": \"unicode\", \"actual\": [\"é\"], \"expected\": [\"é\"], \"passed\": true}, {\"check\": \"astral checksum\", \"actual\": [\"😀\"], \"expected\": [\"😀\"], \"passed\": true}, {\"check\": \"bad checksum\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad trailer\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unreduced\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": [\"z\"], \"expected\": [\"z\"], \"passed\": true}, {\"check\": \"variant checksum width\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.605,"exit_code":1,"observations":[{"actual":["a","b"],"check":"comma","expected":["a","b"],"passed":true},{"actual":[""],"check":"empty","expected":[""],"passed":true},{"actual":null,"check":"pipe data","expected":["a|b"],"passed":false},{"actual":["é"],"check":"unicode","expected":["é"],"passed":true},{"actual":["😀"],"check":"astral checksum","expected":["😀"],"passed":true},{"actual":null,"check":"bad checksum","expected":null,"passed":true},{"actual":null,"check":"bad trailer","expected":null,"passed":true},{"actual":null,"check":"unreduced","expected":null,"passed":true},{"actual":["z"],"check":"normal","expected":["z"],"passed":true},{"actual":["x"],"check":"variant checksum width","expected":["x"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"comma\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [\"\"], \"expected\": [\"\"], \"passed\": true}, {\"check\": \"pipe data\", \"actual\": null, \"expected\": [\"a|b\"], \"passed\": false}, {\"check\": \"unicode\", \"actual\": [\"é\"], \"expected\": [\"é\"], \"passed\": true}, {\"check\": \"astral checksum\", \"actual\": [\"😀\"], \"expected\": [\"😀\"], \"passed\": true}, {\"check\": \"bad checksum\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad trailer\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unreduced\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": [\"z\"], \"expected\": [\"z\"], \"passed\": true}, {\"check\": \"variant checksum width\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.904,"exit_code":0,"observations":[{"actual":["a","b"],"check":"comma","expected":["a","b"],"passed":true},{"actual":[""],"check":"empty","expected":[""],"passed":true},{"actual":["a|b"],"check":"pipe data","expected":["a|b"],"passed":true},{"actual":["é"],"check":"unicode","expected":["é"],"passed":true},{"actual":["😀"],"check":"astral checksum","expected":["😀"],"passed":true},{"actual":null,"check":"bad checksum","expected":null,"passed":true},{"actual":null,"check":"bad trailer","expected":null,"passed":true},{"actual":null,"check":"unreduced","expected":null,"passed":true},{"actual":["z"],"check":"normal","expected":["z"],"passed":true},{"actual":["x"],"check":"variant checksum width","expected":["x"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"comma\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": [\"\"], \"expected\": [\"\"], \"passed\": true}, {\"check\": \"pipe data\", \"actual\": [\"a|b\"], \"expected\": [\"a|b\"], \"passed\": true}, {\"check\": \"unicode\", \"actual\": [\"é\"], \"expected\": [\"é\"], \"passed\": true}, {\"check\": \"astral checksum\", \"actual\": [\"😀\"], \"expected\": [\"😀\"], \"passed\": true}, {\"check\": \"bad checksum\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad trailer\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unreduced\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": [\"z\"], \"expected\": [\"z\"], \"passed\": true}, {\"check\": \"variant checksum width\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}