{"abstract":"URL-safe base64 uses the standard alphabet.","category":"Encodings","checks":4,"contract":"Encode hex bytes to padded URL-safe base64 ASCII.","evaluation_group":"model-abaa584c8df011ce","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-base64-alphabet","id":"FA-3301","implementations":{"attempt":{"sha256":"6ed2a965d68288ac584b77fe63630362308f0fb92f4a80d85d963458ab290be6","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 base64.b64encode(bytes.fromhex(x)).decode().replace('+','-')\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('fbff'), '-_8=')\ncheck('boundary 2', solve('ff'), '_w==')\ncheck('boundary 3', solve('61'), 'YQ==')\ncheck('boundary 4', solve(''), '')\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":"d1afa1bf4cee046f048ad7275fc0091f7d8722cd6a43460cfc351af07488c3f9","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 base64.b64encode(bytes.fromhex(x)).decode()\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('fbff'), '-_8=')\ncheck('boundary 2', solve('ff'), '_w==')\ncheck('boundary 3', solve('61'), 'YQ==')\ncheck('boundary 4', solve(''), '')\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":"5b0eab118ebc9eae8cd3c93a7afcf465ecd5ae3ca55bb6bb96d2323cae53d6c8","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 base64.urlsafe_b64encode(bytes.fromhex(x)).decode()\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('fbff'), '-_8=')\ncheck('boundary 2', solve('ff'), '_w==')\ncheck('boundary 3', solve('61'), 'YQ==')\ncheck('boundary 4', solve(''), '')\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-base64-alphabet","generated_at":"2026-09-29T14:37:24.053130+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: Encode hex bytes to padded URL-safe base64 ASCII.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Encode hex bytes to padded URL-safe base64 ASCII.","sha256":"53e5f5e28237032cd60fe37650fe2cd67fcd6e82b7591a5bca77d65a80c80b34","title":"URL-safe base64 uses the standard alphabet · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":60.224,"exit_code":1,"observations":[{"actual":"-/8=","check":"boundary 1","expected":"-_8=","passed":false},{"actual":"/w==","check":"boundary 2","expected":"_w==","passed":false},{"actual":"YQ==","check":"boundary 3","expected":"YQ==","passed":true},{"actual":"","check":"boundary 4","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"-/8=\", \"expected\": \"-_8=\", \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": \"/w==\", \"expected\": \"_w==\", \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"YQ==\", \"expected\": \"YQ==\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":50.734,"exit_code":1,"observations":[{"actual":"+/8=","check":"boundary 1","expected":"-_8=","passed":false},{"actual":"/w==","check":"boundary 2","expected":"_w==","passed":false},{"actual":"YQ==","check":"boundary 3","expected":"YQ==","passed":true},{"actual":"","check":"boundary 4","expected":"","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"+/8=\", \"expected\": \"-_8=\", \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": \"/w==\", \"expected\": \"_w==\", \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"YQ==\", \"expected\": \"YQ==\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":64.741,"exit_code":0,"observations":[{"actual":"-_8=","check":"boundary 1","expected":"-_8=","passed":true},{"actual":"_w==","check":"boundary 2","expected":"_w==","passed":true},{"actual":"YQ==","check":"boundary 3","expected":"YQ==","passed":true},{"actual":"","check":"boundary 4","expected":"","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"-_8=\", \"expected\": \"-_8=\", \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": \"_w==\", \"expected\": \"_w==\", \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"YQ==\", \"expected\": \"YQ==\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}