{"abstract":"The exact quadratic surd period result violates the stated contract at partial quotient computation.","category":"Numerics","checks":8,"contract":"Input positive nonsquare D; return [floor(sqrt(D)), repeating continued fraction coefficients]. Bounds: 2<=D<=99.","contract_signature":"x","evaluation_group":"s3-numerics-quadratic-surd-period","failed_approach":"The partial repair (a0-m)//d still violates the partial quotient computation invariant.","family":"s3-numerics-quadratic-surd-period-partial-quotient-computation","id":"FA-14901","implementations":{"attempt":{"sha256":"30b2a745c957a7d57d81eb8465245e3f01af8c40bc540e0e3457c2c2bae08ee9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    D=x\n    a0=math.isqrt(D);m=0;d=1;a=a0;out=[]\n    for _ in range(100):\n     m=d*a-m\n     top=D-m*m\n     if d==0:return None\n     d=top//d\n     if d==0:return None\n     a=(a0-m)//d\n     out.append(a)\n     if a==2*a0:break\n    return [a0,out]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(6, [2, [2, 4]]), (2, [1, [2]]), (99, [9, [1, 18]]), (3, [1, [1, 2]]), (5, [2, [4]]), (7, [2, [1, 1, 1, 4]]), (8, [2, [1, 4]]), (10, [3, [6]])], [(7, [2, [1, 1, 1, 4]]), (6, [2, [2, 4]]), (2, [1, [2]]), (99, [9, [1, 18]]), (22, [4, [1, 2, 4, 2, 1, 8]]), (23, [4, [1, 3, 1, 8]]), (24, [4, [1, 8]]), (26, [5, [10]])], [(8, [2, [1, 4]]), (10, [3, [6]]), (2, [1, [2]]), (99, [9, [1, 18]]), (41, [6, [2, 2, 12]]), (42, [6, [2, 12]]), (43, [6, [1, 1, 3, 1, 5, 1, 3, 1, 1, 12]]), (44, [6, [1, 1, 1, 2, 1, 1, 1, 12]])], [(11, [3, [3, 6]]), (13, [3, [1, 1, 1, 1, 6]]), (2, [1, [2]]), (99, [9, [1, 18]]), (59, [7, [1, 2, 7, 2, 1, 14]]), (60, [7, [1, 2, 1, 14]]), (61, [7, [1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14]]), (62, [7, [1, 6, 1, 14]])], [(12, [3, [2, 6]]), (17, [4, [8]]), (2, [1, [2]]), (99, [9, [1, 18]]), (77, [8, [1, 3, 2, 3, 1, 16]]), (78, [8, [1, 4, 1, 16]]), (79, [8, [1, 7, 1, 16]]), (80, [8, [1, 16]])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\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":"9e30e3f2f5a1a90382c3c30f323b58b1cf1a93829ca620fed782678102e074a0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    D=x\n    a0=math.isqrt(D);m=0;d=1;a=a0;out=[]\n    for _ in range(100):\n     m=d*a-m\n     top=D-m*m\n     if d==0:return None\n     d=top//d\n     if d==0:return None\n     a=a0+m//d\n     out.append(a)\n     if a==2*a0:break\n    return [a0,out]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(6, [2, [2, 4]]), (2, [1, [2]]), (99, [9, [1, 18]]), (3, [1, [1, 2]]), (5, [2, [4]]), (7, [2, [1, 1, 1, 4]]), (8, [2, [1, 4]]), (10, [3, [6]])], [(7, [2, [1, 1, 1, 4]]), (6, [2, [2, 4]]), (2, [1, [2]]), (99, [9, [1, 18]]), (22, [4, [1, 2, 4, 2, 1, 8]]), (23, [4, [1, 3, 1, 8]]), (24, [4, [1, 8]]), (26, [5, [10]])], [(8, [2, [1, 4]]), (10, [3, [6]]), (2, [1, [2]]), (99, [9, [1, 18]]), (41, [6, [2, 2, 12]]), (42, [6, [2, 12]]), (43, [6, [1, 1, 3, 1, 5, 1, 3, 1, 1, 12]]), (44, [6, [1, 1, 1, 2, 1, 1, 1, 12]])], [(11, [3, [3, 6]]), (13, [3, [1, 1, 1, 1, 6]]), (2, [1, [2]]), (99, [9, [1, 18]]), (59, [7, [1, 2, 7, 2, 1, 14]]), (60, [7, [1, 2, 1, 14]]), (61, [7, [1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14]]), (62, [7, [1, 6, 1, 14]])], [(12, [3, [2, 6]]), (17, [4, [8]]), (2, [1, [2]]), (99, [9, [1, 18]]), (77, [8, [1, 3, 2, 3, 1, 16]]), (78, [8, [1, 4, 1, 16]]), (79, [8, [1, 7, 1, 16]]), (80, [8, [1, 16]])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\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":"A deterministic bounded teaching model. Inputs are restricted to the explicit contract; this is not a production algebra library. 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":"s3-numerics-quadratic-surd-period-partial-quotient-computation","generated_at":"2026-09-29T14:39:21.339285+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.","root_cause":"The partial quotient computation step uses a0+m//d instead of (a0+m)//d.","sha256":"924f45046dbe3f22a73b5d36925ebc7ddb7f13c9e220be4304bba41b676e1ab6","title":"Quadratic surd period: partial quotient computation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.668,"exit_code":1,"observations":[{"actual":[2,[0,4]],"check":"explicit oracle 0","expected":[2,[2,4]],"passed":false},{"actual":[1,[0,2]],"check":"explicit oracle 1","expected":[1,[2]],"passed":false},{"actual":[9,[0,18]],"check":"explicit oracle 2","expected":[9,[1,18]],"passed":false},{"actual":[1,[0,2]],"check":"explicit oracle 3","expected":[1,[1,2]],"passed":false},{"actual":[2,[0,4]],"check":"explicit oracle 4","expected":[2,[4]],"passed":false},{"actual":[2,[0,4]],"check":"explicit oracle 5","expected":[2,[1,1,1,4]],"passed":false},{"actual":[2,[0,4]],"check":"explicit oracle 6","expected":[2,[1,4]],"passed":false},{"actual":[3,[0,6]],"check":"explicit oracle 7","expected":[3,[6]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [2, [0, 4]], \"expected\": [2, [2, 4]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [1, [0, 2]], \"expected\": [1, [2]], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [9, [0, 18]], \"expected\": [9, [1, 18]], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [0, 2]], \"expected\": [1, [1, 2]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [2, [0, 4]], \"expected\": [2, [4]], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [2, [0, 4]], \"expected\": [2, [1, 1, 1, 4]], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [2, [0, 4]], \"expected\": [2, [1, 4]], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [3, [0, 6]], \"expected\": [3, [6]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.167,"exit_code":1,"observations":[{"actual":[2,[3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],"check":"explicit oracle 0","expected":[2,[2,4]],"passed":false},{"actual":[1,[2]],"check":"explicit oracle 1","expected":[1,[2]],"passed":true},{"actual":[9,[9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]],"check":"explicit oracle 2","expected":[9,[1,18]],"passed":false},{"actual":[1,[1,2]],"check":"explicit oracle 3","expected":[1,[1,2]],"passed":true},{"actual":[2,[4]],"check":"explicit oracle 4","expected":[2,[4]],"passed":true},{"actual":[2,[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],"check":"explicit oracle 5","expected":[2,[1,1,1,4]],"passed":false},{"actual":[2,[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],"check":"explicit oracle 6","expected":[2,[1,4]],"passed":false},{"actual":[3,[6]],"check":"explicit oracle 7","expected":[3,[6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [2, [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], \"expected\": [2, [2, 4]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [1, [2]], \"expected\": [1, [2]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [9, [9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]], \"expected\": [9, [1, 18]], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [1, 2]], \"expected\": [1, [1, 2]], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [2, [4]], \"expected\": [2, [4]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [2, [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], \"expected\": [2, [1, 1, 1, 4]], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [2, [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], \"expected\": [2, [1, 4]], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [3, [6]], \"expected\": [3, [6]], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}