{"abstract":"Percent decoding destroys non-UTF8 bytes.","category":"Encodings","checks":4,"contract":"Decode percent escapes to raw integer bytes, UTF-8-encoding unescaped Unicode text.","evaluation_group":"model-72f7dc99e42263ee","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-percent-byte-decoding","id":"FA-3281","implementations":{"attempt":{"sha256":"44d5257797362ce1437b92d211f5f40be3ac74e2c7d9d8cc7f917c3f952a3c07","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 list(x.encode('utf-8'))\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('%FF'), [255])\ncheck('boundary 2', solve('é'), [195, 169])\ncheck('boundary 3', solve('%00'), [0])\ncheck('boundary 4', solve('%ZZ'), [37, 90, 90])\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":"2f19fb1ed714cb43fad224cdf92a912f0012670efe8a2888313edeaaed307ce8","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 list(unquote(x).encode('utf-8'))\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('%FF'), [255])\ncheck('boundary 2', solve('é'), [195, 169])\ncheck('boundary 3', solve('%00'), [0])\ncheck('boundary 4', solve('%ZZ'), [37, 90, 90])\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":"7a2678f52ec0bd1f230c9106793b2f86bc8d08496db6c168a79bafa92480040a","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 list(unquote_to_bytes(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('%FF'), [255])\ncheck('boundary 2', solve('é'), [195, 169])\ncheck('boundary 3', solve('%00'), [0])\ncheck('boundary 4', solve('%ZZ'), [37, 90, 90])\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-percent-byte-decoding","generated_at":"2026-09-29T14:37:23.574496+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: Decode percent escapes to raw integer bytes, UTF-8-encoding unescaped Unicode text.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Decode percent escapes to raw integer bytes, UTF-8-encoding unescaped Unicode text.","sha256":"1b7ef799f0e45c5c0d34c4d31b37c217868683b4490a96ab6e8776eac64643e9","title":"Percent decoding destroys non-UTF8 bytes · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":56.046,"exit_code":1,"observations":[{"actual":[37,70,70],"check":"boundary 1","expected":[255],"passed":false},{"actual":[195,169],"check":"boundary 2","expected":[195,169],"passed":true},{"actual":[37,48,48],"check":"boundary 3","expected":[0],"passed":false},{"actual":[37,90,90],"check":"boundary 4","expected":[37,90,90],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": [37, 70, 70], \"expected\": [255], \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": [195, 169], \"expected\": [195, 169], \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": [37, 48, 48], \"expected\": [0], \"passed\": false}, {\"check\": \"boundary 4\", \"actual\": [37, 90, 90], \"expected\": [37, 90, 90], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":57.794,"exit_code":1,"observations":[{"actual":[239,191,189],"check":"boundary 1","expected":[255],"passed":false},{"actual":[195,169],"check":"boundary 2","expected":[195,169],"passed":true},{"actual":[0],"check":"boundary 3","expected":[0],"passed":true},{"actual":[37,90,90],"check":"boundary 4","expected":[37,90,90],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": [239, 191, 189], \"expected\": [255], \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": [195, 169], \"expected\": [195, 169], \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [37, 90, 90], \"expected\": [37, 90, 90], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":52.446,"exit_code":0,"observations":[{"actual":[255],"check":"boundary 1","expected":[255],"passed":true},{"actual":[195,169],"check":"boundary 2","expected":[195,169],"passed":true},{"actual":[0],"check":"boundary 3","expected":[0],"passed":true},{"actual":[37,90,90],"check":"boundary 4","expected":[37,90,90],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": [255], \"expected\": [255], \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": [195, 169], \"expected\": [195, 169], \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [37, 90, 90], \"expected\": [37, 90, 90], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}