{"abstract":"Plain-text footers are appended inside HTML bodies.","category":"Email MIME structure","checks":7,"contract":"A top-level text/plain body in 7bit, 8bit or quoted-printable (default 7bit, case-insensitive) gets the footer appended in place (\"text+footer\"). A multipart/mixed gets a text/plain footer part appended after its children. Everything else (alternative, signed, encrypted, html, base64 text) is wrapped: mixed(<type>,text/plain). Output is a compact structure string.","contract_signature":"node","evaluation_group":"w2-email_mime_structure-list-footer","failed_approach":"Treating text/enriched like plain text still appends into formatted content. The attempted `if t in ('text/plain', 'text/enriched') and` still disagrees with a fixture.","family":"w2-email_mime_structure-list-footer-plain-text-only","id":"FA-76791","implementations":{"attempt":{"sha256":"4103b90e60695fec63c3f5cf4c924d99856e101b6a96875e2dd3baeca96e1c8f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(node):\n    t = node['type'].lower()\n    cte = (node.get('cte') or '7bit').lower()\n    if t in ('text/plain', 'text/enriched') and cte in ('7bit', '8bit', 'quoted-printable'):\n        return 'text+footer'\n    if t == 'multipart/mixed':\n        return 'mixed(' + ','.join(c['type'].lower() for c in node['parts']) + ',text/plain)'\n    return 'mixed(' + t + ',text/plain)'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,text/plain)')], 2: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,text/plain)')], 3: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,image/png,text/plain)')], 4: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,image/png,image/png,text/plain)')], 5: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,image/png,image/png,image/png,text/plain)')]}\nfor _label, _args, _expected in _CASES[N]:\n    check(_label, solve(*_args), _expected)\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":"a21a1e5f3f228e1a26834511cf3d98319ae207ea8675255c237bd942081cb616","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(node):\n    t = node['type'].lower()\n    cte = (node.get('cte') or '7bit').lower()\n    if t.startswith('text/') and cte in ('7bit', '8bit', 'quoted-printable'):\n        return 'text+footer'\n    if t == 'multipart/mixed':\n        return 'mixed(' + ','.join(c['type'].lower() for c in node['parts']) + ',text/plain)'\n    return 'mixed(' + t + ',text/plain)'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_CASES = {1: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,text/plain)')], 2: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,text/plain)')], 3: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,image/png,text/plain)')], 4: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,image/png,image/png,text/plain)')], 5: [('base64 text body', ({'type': 'text/plain', 'cte': 'BASE64'},), 'mixed(text/plain,text/plain)'), ('quoted-printable text body', ({'type': 'text/plain', 'cte': 'quoted-printable'},), 'text+footer'), ('signed message', ({'type': 'multipart/signed', 'parts': [{'type': 'text/plain'}, {'type': 'application/pgp-signature'}]},), 'mixed(multipart/signed,text/plain)'), ('encrypted message', ({'type': 'multipart/encrypted', 'parts': [{'type': 'application/pgp-encrypted'}, {'type': 'application/octet-stream'}]},), 'mixed(multipart/encrypted,text/plain)'), ('html body', ({'type': 'text/html'},), 'mixed(text/html,text/plain)'), ('enriched body', ({'type': 'text/enriched', 'cte': '7bit'},), 'mixed(text/enriched,text/plain)'), ('mixed message', ({'type': 'multipart/mixed', 'parts': [{'type': 'text/plain'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}, {'type': 'image/png'}]},), 'mixed(text/plain,image/png,image/png,image/png,image/png,image/png,text/plain)')]}\nfor _label, _args, _expected in _CASES[N]:\n    check(_label, solve(*_args), _expected)\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":"Stipulated offline model over pre-parsed MIME dictionaries; not a conforming MIME parser, generator or mail client. 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":"w2-email_mime_structure-list-footer-plain-text-only","generated_at":"2026-09-29T14:49:19.394747+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"List managers that edit signed or encoded bodies in place break signatures and corrupt content.","root_cause":"The plain text only decision evaluates `if t.startswith('text/') and` where the contract requires `if t == 'text/plain' and`.","sha256":"8921de4dc3fba3318f4fd568db5c3ecbe8fde41ff48c1f9661e2deffdf47415b","title":"Inject a mailing-list footer without breaking the message: plain text only · case 01","variant":1,"variant_policy":"N selects a different enumerated fixture set (renamed identifiers, part counts and sizes); boundary fixtures recur across variants.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.918,"exit_code":1,"observations":[{"actual":"mixed(text/plain,text/plain)","check":"base64 text body","expected":"mixed(text/plain,text/plain)","passed":true},{"actual":"text+footer","check":"quoted-printable text body","expected":"text+footer","passed":true},{"actual":"mixed(multipart/signed,text/plain)","check":"signed message","expected":"mixed(multipart/signed,text/plain)","passed":true},{"actual":"mixed(multipart/encrypted,text/plain)","check":"encrypted message","expected":"mixed(multipart/encrypted,text/plain)","passed":true},{"actual":"mixed(text/html,text/plain)","check":"html body","expected":"mixed(text/html,text/plain)","passed":true},{"actual":"text+footer","check":"enriched body","expected":"mixed(text/enriched,text/plain)","passed":false},{"actual":"mixed(text/plain,image/png,text/plain)","check":"mixed message","expected":"mixed(text/plain,image/png,text/plain)","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"base64 text body\", \"actual\": \"mixed(text/plain,text/plain)\", \"expected\": \"mixed(text/plain,text/plain)\", \"passed\": true}, {\"check\": \"quoted-printable text body\", \"actual\": \"text+footer\", \"expected\": \"text+footer\", \"passed\": true}, {\"check\": \"signed message\", \"actual\": \"mixed(multipart/signed,text/plain)\", \"expected\": \"mixed(multipart/signed,text/plain)\", \"passed\": true}, {\"check\": \"encrypted message\", \"actual\": \"mixed(multipart/encrypted,text/plain)\", \"expected\": \"mixed(multipart/encrypted,text/plain)\", \"passed\": true}, {\"check\": \"html body\", \"actual\": \"mixed(text/html,text/plain)\", \"expected\": \"mixed(text/html,text/plain)\", \"passed\": true}, {\"check\": \"enriched body\", \"actual\": \"text+footer\", \"expected\": \"mixed(text/enriched,text/plain)\", \"passed\": false}, {\"check\": \"mixed message\", \"actual\": \"mixed(text/plain,image/png,text/plain)\", \"expected\": \"mixed(text/plain,image/png,text/plain)\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.666,"exit_code":1,"observations":[{"actual":"mixed(text/plain,text/plain)","check":"base64 text body","expected":"mixed(text/plain,text/plain)","passed":true},{"actual":"text+footer","check":"quoted-printable text body","expected":"text+footer","passed":true},{"actual":"mixed(multipart/signed,text/plain)","check":"signed message","expected":"mixed(multipart/signed,text/plain)","passed":true},{"actual":"mixed(multipart/encrypted,text/plain)","check":"encrypted message","expected":"mixed(multipart/encrypted,text/plain)","passed":true},{"actual":"text+footer","check":"html body","expected":"mixed(text/html,text/plain)","passed":false},{"actual":"text+footer","check":"enriched body","expected":"mixed(text/enriched,text/plain)","passed":false},{"actual":"mixed(text/plain,image/png,text/plain)","check":"mixed message","expected":"mixed(text/plain,image/png,text/plain)","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"base64 text body\", \"actual\": \"mixed(text/plain,text/plain)\", \"expected\": \"mixed(text/plain,text/plain)\", \"passed\": true}, {\"check\": \"quoted-printable text body\", \"actual\": \"text+footer\", \"expected\": \"text+footer\", \"passed\": true}, {\"check\": \"signed message\", \"actual\": \"mixed(multipart/signed,text/plain)\", \"expected\": \"mixed(multipart/signed,text/plain)\", \"passed\": true}, {\"check\": \"encrypted message\", \"actual\": \"mixed(multipart/encrypted,text/plain)\", \"expected\": \"mixed(multipart/encrypted,text/plain)\", \"passed\": true}, {\"check\": \"html body\", \"actual\": \"text+footer\", \"expected\": \"mixed(text/html,text/plain)\", \"passed\": false}, {\"check\": \"enriched body\", \"actual\": \"text+footer\", \"expected\": \"mixed(text/enriched,text/plain)\", \"passed\": false}, {\"check\": \"mixed message\", \"actual\": \"mixed(text/plain,image/png,text/plain)\", \"expected\": \"mixed(text/plain,image/png,text/plain)\", \"passed\": true}], \"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."}}