{"abstract":"The minus sign is counted as a binary digit.","category":"Integer arithmetic","checks":4,"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 number of significant binary magnitude digits, with zero requiring zero digits. Exact operational definition: abs(n).bit_length()","evaluation_group":"model-ef92d54c4640ee65","failed_approach":"Removing the sign still treats the zero literal as one significant bit.","family":"xn-signed-integer-bit-length","id":"FA-5361","implementations":{"attempt":{"sha256":"3acf392e65ada304f1259db88cdeb18a5488aea3cf5c4d76eadf5ec442146b30","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 len(bin(n).lstrip(\"-\"))-2\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (0,)', solve(*(0,)), 0)\ncheck('fixture 2: (-8,)', solve(*(-8,)), 4)\ncheck('fixture 3: (7,)', solve(*(7,)), 3)\ncheck('fixture 4: (8,)', solve(*(8,)), 4)\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":"1d3eb25cf1b8f8e29ac6bdb4f350b7e105c85862d2f75d7cd9666e2e64094b07","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 len(bin(n))-2\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (0,)', solve(*(0,)), 0)\ncheck('fixture 2: (-8,)', solve(*(-8,)), 4)\ncheck('fixture 3: (7,)', solve(*(7,)), 3)\ncheck('fixture 4: (8,)', solve(*(8,)), 4)\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":"181a1a7590f0fb7266bfcfc802ac1bdee947071df79162e5a03298082b2f33e8","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()\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (0,)', solve(*(0,)), 0)\ncheck('fixture 2: (-8,)', solve(*(-8,)), 4)\ncheck('fixture 3: (7,)', solve(*(7,)), 3)\ncheck('fixture 4: (8,)', solve(*(8,)), 4)\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-signed-integer-bit-length","generated_at":"2026-09-29T14:37:48.593127+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 abs(n).bit_length()","root_cause":"The minus sign is counted as a binary digit.","sha256":"83eb4c5f749d5b5af2856e3b092028be6e1c06ba81cbc78a2000c6463663541f","title":"Signed integer bit length · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.986,"exit_code":1,"observations":[{"actual":1,"check":"fixture 1: (0,)","expected":0,"passed":false},{"actual":4,"check":"fixture 2: (-8,)","expected":4,"passed":true},{"actual":3,"check":"fixture 3: (7,)","expected":3,"passed":true},{"actual":4,"check":"fixture 4: (8,)","expected":4,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (0,)\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 2: (-8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 3: (7,)\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 4: (8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.061,"exit_code":1,"observations":[{"actual":1,"check":"fixture 1: (0,)","expected":0,"passed":false},{"actual":5,"check":"fixture 2: (-8,)","expected":4,"passed":false},{"actual":3,"check":"fixture 3: (7,)","expected":3,"passed":true},{"actual":4,"check":"fixture 4: (8,)","expected":4,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (0,)\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 2: (-8,)\", \"actual\": 5, \"expected\": 4, \"passed\": false}, {\"check\": \"fixture 3: (7,)\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 4: (8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.649,"exit_code":0,"observations":[{"actual":0,"check":"fixture 1: (0,)","expected":0,"passed":true},{"actual":4,"check":"fixture 2: (-8,)","expected":4,"passed":true},{"actual":3,"check":"fixture 3: (7,)","expected":3,"passed":true},{"actual":4,"check":"fixture 4: (8,)","expected":4,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (0,)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 2: (-8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 3: (7,)\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 4: (8,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}