{"abstract":"A packed field includes adjacent flag bits.","category":"Binary formats","checks":4,"contract":"Extract bits 2 through 4 as a three-bit unsigned field.","evaluation_group":"model-a1e8f26fe61301df","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-binary-bitfield-shift","id":"FA-3641","implementations":{"attempt":{"sha256":"7b98d61649946e00eaf0c4b8f5d0318cdf165b38e21c2fd81828d35576955d2e","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&28\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(255), 7)\ncheck('boundary 2', solve(20), 5)\ncheck('boundary 3', solve(3), 0)\ncheck('boundary 4', solve(0), 0)\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":"2ea17ee39f5a235450f47426b032b09c4c9d369fe84683ec8ee7c11ec4671f8c","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>>2\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(255), 7)\ncheck('boundary 2', solve(20), 5)\ncheck('boundary 3', solve(3), 0)\ncheck('boundary 4', solve(0), 0)\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":"b5a344d5959f0d7bf6c4cc724d29c4b4bb8d5ad5a75733c5881c62a835224dea","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>>2)&7\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(255), 7)\ncheck('boundary 2', solve(20), 5)\ncheck('boundary 3', solve(3), 0)\ncheck('boundary 4', solve(0), 0)\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-bitfield-shift","generated_at":"2026-09-29T14:37:28.884455+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 bits 2 through 4 as a three-bit unsigned field.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Extract bits 2 through 4 as a three-bit unsigned field.","sha256":"8363e66d5c1f932002a7a409d5e1e239b3a73375e231e12953c64ba5c786759b","title":"A packed field includes adjacent flag bits · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":53.039,"exit_code":1,"observations":[{"actual":28,"check":"boundary 1","expected":7,"passed":false},{"actual":20,"check":"boundary 2","expected":5,"passed":false},{"actual":0,"check":"boundary 3","expected":0,"passed":true},{"actual":0,"check":"boundary 4","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": 28, \"expected\": 7, \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": 20, \"expected\": 5, \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":53.452,"exit_code":1,"observations":[{"actual":63,"check":"boundary 1","expected":7,"passed":false},{"actual":5,"check":"boundary 2","expected":5,"passed":true},{"actual":0,"check":"boundary 3","expected":0,"passed":true},{"actual":0,"check":"boundary 4","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": 63, \"expected\": 7, \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":59.67,"exit_code":0,"observations":[{"actual":7,"check":"boundary 1","expected":7,"passed":true},{"actual":5,"check":"boundary 2","expected":5,"passed":true},{"actual":0,"check":"boundary 3","expected":0,"passed":true},{"actual":0,"check":"boundary 4","expected":0,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}