{"abstract":"Right shifting discards the outgoing low bits.","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-e80fbcaafe0289bf","failed_approach":"Left shifting by the same offset places wrap bits incorrectly.","family":"xn-unsigned-rotate-right","id":"FA-5391","implementations":{"attempt":{"sha256":"2e041b8f7318d4b9d8b7ea4caa92d6de7c7c5e31b0d1d4dba7076b625e64df01","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: (3, 1, 8)', solve(*(3, 1, 8)), 129)\ncheck('fixture 2: (12, 2, 8)', solve(*(12, 2, 8)), 3)\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":"2e677a414c8014f81d5940917ec949c5638d25576efacce4bd585832fbdb8012","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\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (3, 1, 8)', solve(*(3, 1, 8)), 129)\ncheck('fixture 2: (12, 2, 8)', solve(*(12, 2, 8)), 3)\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":"fd70d8542d3c63de570641053984b6b1cd0b3005c4e1353fb876acf9691090c2","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: (3, 1, 8)', solve(*(3, 1, 8)), 129)\ncheck('fixture 2: (12, 2, 8)', solve(*(12, 2, 8)), 3)\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-right","generated_at":"2026-09-29T14:37:48.994731+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":"Right shifting discards the outgoing low bits.","sha256":"2af7c80592f42ce1357100365e842898605130c88da4433240d5fcea02a1e630","title":"Unsigned rotate right · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":48.422,"exit_code":1,"observations":[{"actual":7,"check":"fixture 1: (3, 1, 8)","expected":129,"passed":false},{"actual":51,"check":"fixture 2: (12, 2, 8)","expected":3,"passed":false},{"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: (3, 1, 8)\", \"actual\": 7, \"expected\": 129, \"passed\": false}, {\"check\": \"fixture 2: (12, 2, 8)\", \"actual\": 51, \"expected\": 3, \"passed\": false}, {\"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":45.945,"exit_code":1,"observations":[{"actual":1,"check":"fixture 1: (3, 1, 8)","expected":129,"passed":false},{"actual":3,"check":"fixture 2: (12, 2, 8)","expected":3,"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: (3, 1, 8)\", \"actual\": 1, \"expected\": 129, \"passed\": false}, {\"check\": \"fixture 2: (12, 2, 8)\", \"actual\": 3, \"expected\": 3, \"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":124.007,"exit_code":0,"observations":[{"actual":129,"check":"fixture 1: (3, 1, 8)","expected":129,"passed":true},{"actual":3,"check":"fixture 2: (12, 2, 8)","expected":3,"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: (3, 1, 8)\", \"actual\": 129, \"expected\": 129, \"passed\": true}, {\"check\": \"fixture 2: (12, 2, 8)\", \"actual\": 3, \"expected\": 3, \"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"}