{"abstract":"Comment content leaks into extracted XML text.","category":"Markup","checks":4,"contract":"Extract element text in document order while ignoring XML comments.","evaluation_group":"model-f3369c18f1919ff0","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-xml-comments-text","id":"FA-3256","implementations":{"attempt":{"sha256":"7318b192cbebbee47ac2626b2144b2f422dcfd0ed6133e71b9593cdf4ef3f491","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        return ''.join(ET.fromstring(x,parser=ET.XMLParser(target=ET.TreeBuilder(insert_comments=True))).itertext())\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('boundary 1', solve('<r>a<!--hidden-->b</r>'), 'ab')\ncheck('boundary 2', solve('<r>&lt;x&gt;</r>'), '<x>')\ncheck('boundary 3', solve('<r><b>v</b>!</r>'), 'v!')\ncheck('boundary 4', solve('<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":"940b0dbd74fcf539cf3d8f252461f1ddc3c0001a180a998b13cd70459bf5490f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        return re.sub('<[^>]+>','',x)\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('boundary 1', solve('<r>a<!--hidden-->b</r>'), 'ab')\ncheck('boundary 2', solve('<r>&lt;x&gt;</r>'), '<x>')\ncheck('boundary 3', solve('<r><b>v</b>!</r>'), 'v!')\ncheck('boundary 4', solve('<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":"945e155463190c064b6bb902ccaf1c00a75082482cadb370c00225ddd46bbc0d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        return ''.join(ET.fromstring(x).itertext())\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('boundary 1', solve('<r>a<!--hidden-->b</r>'), 'ab')\ncheck('boundary 2', solve('<r>&lt;x&gt;</r>'), '<x>')\ncheck('boundary 3', solve('<r><b>v</b>!</r>'), 'v!')\ncheck('boundary 4', solve('<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":" 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":"xp-xml-comments-text","generated_at":"2026-09-29T14:37:23.455985+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.","repair":"Implement the complete stated contract, including the boundary fixtures: Extract element text in document order while ignoring XML comments.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Extract element text in document order while ignoring XML comments.","sha256":"4510ae15187eb0a98a02205ed8febdeef26cddd1b338825d907e5ee38aa33599","title":"Comment content leaks into extracted XML text · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":50.237,"exit_code":1,"observations":[{"actual":"ahiddenb","check":"boundary 1","expected":"ab","passed":false},{"actual":"<x>","check":"boundary 2","expected":"<x>","passed":true},{"actual":"v!","check":"boundary 3","expected":"v!","passed":true},{"actual":"","check":"boundary 4","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"ahiddenb\", \"expected\": \"ab\", \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": \"<x>\", \"expected\": \"<x>\", \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"v!\", \"expected\": \"v!\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":52.296,"exit_code":1,"observations":[{"actual":"ab","check":"boundary 1","expected":"ab","passed":true},{"actual":"&lt;x&gt;","check":"boundary 2","expected":"<x>","passed":false},{"actual":"v!","check":"boundary 3","expected":"v!","passed":true},{"actual":"","check":"boundary 4","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"ab\", \"expected\": \"ab\", \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": \"&lt;x&gt;\", \"expected\": \"<x>\", \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"v!\", \"expected\": \"v!\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":54.321,"exit_code":0,"observations":[{"actual":"ab","check":"boundary 1","expected":"ab","passed":true},{"actual":"<x>","check":"boundary 2","expected":"<x>","passed":true},{"actual":"v!","check":"boundary 3","expected":"v!","passed":true},{"actual":"","check":"boundary 4","expected":"","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"ab\", \"expected\": \"ab\", \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": \"<x>\", \"expected\": \"<x>\", \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"v!\", \"expected\": \"v!\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}