{"abstract":"A logical shift discards bits that must rotate back in.","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. n is an unsigned word and k is nonnegative; rotate by k modulo bits. Exact operational definition: ((n << (k%bits)) | (n >> ((bits-k)%bits))) & ((1<<bits)-1)","evaluation_group":"model-0cbbb986a01c1654","failed_approach":"The wrap shift uses k instead of width minus k.","family":"xn-unsigned-rotate-left","id":"FA-5386","implementations":{"attempt":{"sha256":"7af9760d086ba58a680b811cd5d812b60d09a5846ae84d0e6eb538d89d10fe10","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, k, bits):\n    return ((n << k) | (n >> k)) & ((1<<bits)-1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (129, 1, 8)', solve(*(129, 1, 8)), 3)\ncheck('fixture 2: (3, 2, 8)', solve(*(3, 2, 8)), 12)\ncheck('fixture 3: (128, 8, 8)', solve(*(128, 8, 8)), 128)\ncheck('fixture 4: (15, 0, 8)', solve(*(15, 0, 8)), 15)\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":"cdac53d182d99208b6906027ba329e713f7d01ec1ca42e426323dbcac5ea81b4","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, k, bits):\n    return (n << k) & ((1<<bits)-1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (129, 1, 8)', solve(*(129, 1, 8)), 3)\ncheck('fixture 2: (3, 2, 8)', solve(*(3, 2, 8)), 12)\ncheck('fixture 3: (128, 8, 8)', solve(*(128, 8, 8)), 128)\ncheck('fixture 4: (15, 0, 8)', solve(*(15, 0, 8)), 15)\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":"4b934a9b15aae3bdcab3fb518504ced755c9da3721086dbd7c7e96b872a11b0a","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, k, bits):\n    return ((n << (k%bits)) | (n >> ((bits-k)%bits))) & ((1<<bits)-1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (129, 1, 8)', solve(*(129, 1, 8)), 3)\ncheck('fixture 2: (3, 2, 8)', solve(*(3, 2, 8)), 12)\ncheck('fixture 3: (128, 8, 8)', solve(*(128, 8, 8)), 128)\ncheck('fixture 4: (15, 0, 8)', solve(*(15, 0, 8)), 15)\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-unsigned-rotate-left","generated_at":"2026-09-29T14:37:48.834272+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 ((n << (k%bits)) | (n >> ((bits-k)%bits))) & ((1<<bits)-1)","root_cause":"A logical shift discards bits that must rotate back in.","sha256":"6a3d28b6569599679e9d44f3b1cd3551a5b8680ffcdafd6ae5ab8e1570c7f387","title":"Unsigned rotate left · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.663,"exit_code":1,"observations":[{"actual":66,"check":"fixture 1: (129, 1, 8)","expected":3,"passed":false},{"actual":12,"check":"fixture 2: (3, 2, 8)","expected":12,"passed":true},{"actual":0,"check":"fixture 3: (128, 8, 8)","expected":128,"passed":false},{"actual":15,"check":"fixture 4: (15, 0, 8)","expected":15,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (129, 1, 8)\", \"actual\": 66, \"expected\": 3, \"passed\": false}, {\"check\": \"fixture 2: (3, 2, 8)\", \"actual\": 12, \"expected\": 12, \"passed\": true}, {\"check\": \"fixture 3: (128, 8, 8)\", \"actual\": 0, \"expected\": 128, \"passed\": false}, {\"check\": \"fixture 4: (15, 0, 8)\", \"actual\": 15, \"expected\": 15, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.515,"exit_code":1,"observations":[{"actual":2,"check":"fixture 1: (129, 1, 8)","expected":3,"passed":false},{"actual":12,"check":"fixture 2: (3, 2, 8)","expected":12,"passed":true},{"actual":0,"check":"fixture 3: (128, 8, 8)","expected":128,"passed":false},{"actual":15,"check":"fixture 4: (15, 0, 8)","expected":15,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (129, 1, 8)\", \"actual\": 2, \"expected\": 3, \"passed\": false}, {\"check\": \"fixture 2: (3, 2, 8)\", \"actual\": 12, \"expected\": 12, \"passed\": true}, {\"check\": \"fixture 3: (128, 8, 8)\", \"actual\": 0, \"expected\": 128, \"passed\": false}, {\"check\": \"fixture 4: (15, 0, 8)\", \"actual\": 15, \"expected\": 15, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":47.222,"exit_code":0,"observations":[{"actual":3,"check":"fixture 1: (129, 1, 8)","expected":3,"passed":true},{"actual":12,"check":"fixture 2: (3, 2, 8)","expected":12,"passed":true},{"actual":128,"check":"fixture 3: (128, 8, 8)","expected":128,"passed":true},{"actual":15,"check":"fixture 4: (15, 0, 8)","expected":15,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (129, 1, 8)\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 2: (3, 2, 8)\", \"actual\": 12, \"expected\": 12, \"passed\": true}, {\"check\": \"fixture 3: (128, 8, 8)\", \"actual\": 128, \"expected\": 128, \"passed\": true}, {\"check\": \"fixture 4: (15, 0, 8)\", \"actual\": 15, \"expected\": 15, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}