{"abstract":"The lower root is used when an enclosing square is required.","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. n is nonnegative. Return the least r>=0 such that r*r>=n. Exact operational definition: math.isqrt(n) + (math.isqrt(n)**2 < n)","evaluation_group":"model-59ff253e5a8c44f3","failed_approach":"Always adding one overshoots perfect squares.","family":"xn-integer-square-ceiling","id":"FA-5356","implementations":{"attempt":{"sha256":"c534e95939ef57cdfa9eda533bdb8ef1a286351c88e7c17419ccc396c2e19157","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 math.isqrt(n)+1\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: (1,)', solve(*(1,)), 1)\ncheck('fixture 3: (2,)', solve(*(2,)), 2)\ncheck('fixture 4: (16,)', solve(*(16,)), 4)\ncheck('fixture 5: (17,)', solve(*(17,)), 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":"e24b7c61ebfa314e216aaa1d818d20ae2b24427fd2179a4fa1ef800e2ff299f6","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 math.isqrt(n)\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: (1,)', solve(*(1,)), 1)\ncheck('fixture 3: (2,)', solve(*(2,)), 2)\ncheck('fixture 4: (16,)', solve(*(16,)), 4)\ncheck('fixture 5: (17,)', solve(*(17,)), 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":"7fdd5226dd6d121d266da05e92f360c432f8dd93c4e67fd2c855f7d83b7e24a4","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 math.isqrt(n) + (math.isqrt(n)**2 < n)\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: (1,)', solve(*(1,)), 1)\ncheck('fixture 3: (2,)', solve(*(2,)), 2)\ncheck('fixture 4: (16,)', solve(*(16,)), 4)\ncheck('fixture 5: (17,)', solve(*(17,)), 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-integer-square-ceiling","generated_at":"2026-09-29T14:37:48.590945+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 math.isqrt(n) + (math.isqrt(n)**2 < n)","root_cause":"The lower root is used when an enclosing square is required.","sha256":"8dea4d642af6a4001db04fd71aa3dcd66b8e10e7d1f13e385e9f6ca55350be58","title":"Integer square ceiling · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.658,"exit_code":1,"observations":[{"actual":1,"check":"fixture 1: (0,)","expected":0,"passed":false},{"actual":2,"check":"fixture 2: (1,)","expected":1,"passed":false},{"actual":2,"check":"fixture 3: (2,)","expected":2,"passed":true},{"actual":5,"check":"fixture 4: (16,)","expected":4,"passed":false},{"actual":5,"check":"fixture 5: (17,)","expected":5,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (0,)\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"fixture 2: (1,)\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"fixture 3: (2,)\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 4: (16,)\", \"actual\": 5, \"expected\": 4, \"passed\": false}, {\"check\": \"fixture 5: (17,)\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.545,"exit_code":1,"observations":[{"actual":0,"check":"fixture 1: (0,)","expected":0,"passed":true},{"actual":1,"check":"fixture 2: (1,)","expected":1,"passed":true},{"actual":1,"check":"fixture 3: (2,)","expected":2,"passed":false},{"actual":4,"check":"fixture 4: (16,)","expected":4,"passed":true},{"actual":4,"check":"fixture 5: (17,)","expected":5,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (0,)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 2: (1,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: (2,)\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"fixture 4: (16,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 5: (17,)\", \"actual\": 4, \"expected\": 5, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.929,"exit_code":0,"observations":[{"actual":0,"check":"fixture 1: (0,)","expected":0,"passed":true},{"actual":1,"check":"fixture 2: (1,)","expected":1,"passed":true},{"actual":2,"check":"fixture 3: (2,)","expected":2,"passed":true},{"actual":4,"check":"fixture 4: (16,)","expected":4,"passed":true},{"actual":5,"check":"fixture 5: (17,)","expected":5,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (0,)\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"fixture 2: (1,)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 3: (2,)\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"fixture 4: (16,)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 5: (17,)\", \"actual\": 5, \"expected\": 5, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}