{"abstract":"Testing a flag requires every bit to equal the mask.","category":"Binary formats","checks":4,"contract":"Return whether bit three is set, regardless of other bits.","evaluation_group":"model-e7a06745f957a755","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-binary-flag-mask","id":"FA-3636","implementations":{"attempt":{"sha256":"ca1a3b70fcb5cefff90ac39b3b2b7697afd06c54dd9298fe8c9613b9b3679686","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 x>=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(9), True)\ncheck('boundary 2', solve(16), False)\ncheck('boundary 3', solve(8), True)\ncheck('boundary 4', solve(0), False)\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":"f3d3711257f87330e95db11b9837d51ae3ecb85efabb01403a99ce25a6e37375","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 x==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(9), True)\ncheck('boundary 2', solve(16), False)\ncheck('boundary 3', solve(8), True)\ncheck('boundary 4', solve(0), False)\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":"1e1a9c40d8198e8e190ae7ba518ffd8be05cea957f6c533bdf29d8f8102562b2","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 bool(x&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(9), True)\ncheck('boundary 2', solve(16), False)\ncheck('boundary 3', solve(8), True)\ncheck('boundary 4', solve(0), False)\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-binary-flag-mask","generated_at":"2026-09-29T14:37:28.698409+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: Return whether bit three is set, regardless of other bits.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Return whether bit three is set, regardless of other bits.","sha256":"428f4d5213db79a6b4de1ee4d5e7a5a3a16de4195323e440155181ade88b7e9d","title":"Testing a flag requires every bit to equal the mask · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":147.28,"exit_code":1,"observations":[{"actual":true,"check":"boundary 1","expected":true,"passed":true},{"actual":true,"check":"boundary 2","expected":false,"passed":false},{"actual":true,"check":"boundary 3","expected":true,"passed":true},{"actual":false,"check":"boundary 4","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":55.647,"exit_code":1,"observations":[{"actual":false,"check":"boundary 1","expected":true,"passed":false},{"actual":false,"check":"boundary 2","expected":false,"passed":true},{"actual":true,"check":"boundary 3","expected":true,"passed":true},{"actual":false,"check":"boundary 4","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":51.471,"exit_code":0,"observations":[{"actual":true,"check":"boundary 1","expected":true,"passed":true},{"actual":false,"check":"boundary 2","expected":false,"passed":true},{"actual":true,"check":"boundary 3","expected":true,"passed":true},{"actual":false,"check":"boundary 4","expected":false,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}