{"abstract":"Negative powers of two are allocated an unnecessary sign bit.","category":"Integer arithmetic","checks":5,"contract":"Integer arguments; denominators, steps, moduli, and bit widths are positive. Unsigned word inputs fit the specified width except where masking is explicitly the operation. Sequence sizes are nonnegative. Return the smallest positive width whose signed two-complement range contains n. Exact operational definition: max(1, (n if n >= 0 else ~n).bit_length()+1)","evaluation_group":"model-c86641c34aceaa80","failed_approach":"Dropping the sign bit underallocates positive values.","family":"xn-minimum-signed-twos-complement-width","id":"FA-5366","implementations":{"attempt":{"sha256":"0a64dea924f9222a5077230a5a904e85476567c555f5a8eb5799994ec5620703","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(n):\n    return max(1, abs(n).bit_length())\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (-8,)', solve(*(-8,)), 4)\ncheck('fixture 2: (7,)', solve(*(7,)), 4)\ncheck('fixture 3: (0,)', solve(*(0,)), 1)\ncheck('fixture 4: (-1,)', solve(*(-1,)), 1)\ncheck('fixture 5: (8,)', solve(*(8,)), 5)\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":"fbb83a716ac3ab60101c707cea810404b4ee88c72bc194abfa54e06a35d1b516","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(n):\n    return abs(n).bit_length()+1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (-8,)', solve(*(-8,)), 4)\ncheck('fixture 2: (7,)', solve(*(7,)), 4)\ncheck('fixture 3: (0,)', solve(*(0,)), 1)\ncheck('fixture 4: (-1,)', solve(*(-1,)), 1)\ncheck('fixture 5: (8,)', solve(*(8,)), 5)\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":"00dd1d8fad02f1196b7044080dcf3feefea8e90d37dd7d4b40a6658a877fb897","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(n):\n    return max(1, (n if n >= 0 else ~n).bit_length()+1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (-8,)', solve(*(-8,)), 4)\ncheck('fixture 2: (7,)', solve(*(7,)), 4)\ncheck('fixture 3: (0,)', solve(*(0,)), 1)\ncheck('fixture 4: (-1,)', solve(*(-1,)), 1)\ncheck('fixture 5: (8,)', solve(*(8,)), 5)\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":"xn-minimum-signed-twos-complement-width","generated_at":"2026-09-29T14:37:48.636837+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Integer mathematics results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return max(1, (n if n >= 0 else ~n).bit_length()+1)","root_cause":"Negative powers of two are allocated an unnecessary sign bit.","sha256":"741a57c58979172ecd5cf3d28c08c510075af88036d0916982e455ac98ed7c8a","title":"Minimum signed twos complement width · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.496,"exit_code":1,"observations":[{"actual":4,"check":"fixture 1: (-8,)","expected":4,"passed":true},{"actual":3,"check":"fixture 2: (7,)","expected":4,"passed":false},{"actual":1,"check":"fixture 3: (0,)","expected":1,"passed":true},{"actual":1,"check":"fixture 4: (-1,)","expected":1,"passed":true},{"actual":4,"check":"fixture 5: (8,)","expected":5,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (-8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 2: (7,)\", \"actual\": 3, \"expected\": 4, \"passed\": false}, {\"check\": \"fixture 3: (0,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 4: (-1,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 5: (8,)\", \"actual\": 4, \"expected\": 5, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":48.912,"exit_code":1,"observations":[{"actual":5,"check":"fixture 1: (-8,)","expected":4,"passed":false},{"actual":4,"check":"fixture 2: (7,)","expected":4,"passed":true},{"actual":1,"check":"fixture 3: (0,)","expected":1,"passed":true},{"actual":2,"check":"fixture 4: (-1,)","expected":1,"passed":false},{"actual":5,"check":"fixture 5: (8,)","expected":5,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (-8,)\", \"actual\": 5, \"expected\": 4, \"passed\": false}, {\"check\": \"fixture 2: (7,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 3: (0,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 4: (-1,)\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"fixture 5: (8,)\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.486,"exit_code":0,"observations":[{"actual":4,"check":"fixture 1: (-8,)","expected":4,"passed":true},{"actual":4,"check":"fixture 2: (7,)","expected":4,"passed":true},{"actual":1,"check":"fixture 3: (0,)","expected":1,"passed":true},{"actual":1,"check":"fixture 4: (-1,)","expected":1,"passed":true},{"actual":5,"check":"fixture 5: (8,)","expected":5,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (-8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 2: (7,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 3: (0,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 4: (-1,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 5: (8,)\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}