{"abstract":"The exact rational continued fraction result violates the stated contract at reciprocal state.","category":"Numerics","checks":8,"contract":"Input [p,q], q>0; canonical simple continued fraction of p/q with last term>1 unless singleton. Bounds: -25<=p<=25 and 1<=q<=17.","contract_signature":"x","evaluation_group":"s3-numerics-rational-continued-fraction","failed_approach":"The partial repair abs(q-p),r still violates the reciprocal state invariant.","family":"s3-numerics-rational-continued-fraction-reciprocal-state","id":"FA-14426","implementations":{"attempt":{"sha256":"f3640ae158c0afa882689fce9938cee7affe02e842fe027b8ee003d1a1949970","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    p,q=x\n    out=[]\n    for _ in range(30):\n     if q==0: break\n     a=p//q\n     out.append(a)\n     r=p-a*q\n     p,q=abs(q-p),r\n    if len(out)>1 and out[-1]==1:\n     out[-2]+=1\n     out.pop()\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-25, 1], [-25]), ([-25, 2], [-13, 2]), ([25, 17], [1, 2, 8]), ([-25, 3], [-9, 1, 2]), ([-25, 4], [-7, 1, 3]), ([-25, 5], [-5]), ([-25, 6], [-5, 1, 5]), ([-25, 7], [-4, 2, 3])], [([-25, 2], [-13, 2]), ([-25, 6], [-5, 1, 5]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-24, 1], [-24]), ([-24, 2], [-12]), ([-24, 3], [-8]), ([-24, 4], [-6])], [([-25, 3], [-9, 1, 2]), ([-25, 9], [-3, 4, 2]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-23, 1], [-23]), ([-23, 2], [-12, 2]), ([-23, 3], [-8, 3]), ([-23, 4], [-6, 4])], [([-25, 4], [-7, 1, 3]), ([-25, 12], [-3, 1, 11]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-22, 1], [-22]), ([-22, 2], [-11]), ([-22, 3], [-8, 1, 2]), ([-22, 4], [-6, 2])], [([-25, 5], [-5]), ([-25, 15], [-2, 3]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-21, 1], [-21]), ([-21, 2], [-11, 2]), ([-21, 3], [-7]), ([-21, 4], [-6, 1, 3])]]\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":"5e96c553ed36eace84a471ae4e5064f0446bfeb107d3264cb2fefa6f101ae95c","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    p,q=x\n    out=[]\n    for _ in range(30):\n     if q==0: break\n     a=p//q\n     out.append(a)\n     r=p-a*q\n     p,q=r,q\n    if len(out)>1 and out[-1]==1:\n     out[-2]+=1\n     out.pop()\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-25, 1], [-25]), ([-25, 2], [-13, 2]), ([25, 17], [1, 2, 8]), ([-25, 3], [-9, 1, 2]), ([-25, 4], [-7, 1, 3]), ([-25, 5], [-5]), ([-25, 6], [-5, 1, 5]), ([-25, 7], [-4, 2, 3])], [([-25, 2], [-13, 2]), ([-25, 6], [-5, 1, 5]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-24, 1], [-24]), ([-24, 2], [-12]), ([-24, 3], [-8]), ([-24, 4], [-6])], [([-25, 3], [-9, 1, 2]), ([-25, 9], [-3, 4, 2]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-23, 1], [-23]), ([-23, 2], [-12, 2]), ([-23, 3], [-8, 3]), ([-23, 4], [-6, 4])], [([-25, 4], [-7, 1, 3]), ([-25, 12], [-3, 1, 11]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-22, 1], [-22]), ([-22, 2], [-11]), ([-22, 3], [-8, 1, 2]), ([-22, 4], [-6, 2])], [([-25, 5], [-5]), ([-25, 15], [-2, 3]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-21, 1], [-21]), ([-21, 2], [-11, 2]), ([-21, 3], [-7]), ([-21, 4], [-6, 1, 3])]]\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-rational-continued-fraction-reciprocal-state","generated_at":"2026-09-29T14:39:16.719717+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 reciprocal state step uses r,q instead of q,r.","sha256":"60f3f37aa1504e3b6edfa5379e726aad4dceb49c8957225556a83684d391f05b","title":"Rational continued fraction: reciprocal state · 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":40.94,"exit_code":1,"observations":[{"actual":[-25],"check":"explicit oracle 0","expected":[-25],"passed":true},{"actual":[-13,27],"check":"explicit oracle 1","expected":[-13,2],"passed":false},{"actual":[2],"check":"explicit oracle 2","expected":[1,2,8],"passed":false},{"actual":[-9,14],"check":"explicit oracle 3","expected":[-9,1,2],"passed":false},{"actual":[-7,9,13],"check":"explicit oracle 4","expected":[-7,1,3],"passed":false},{"actual":[-5],"check":"explicit oracle 5","expected":[-5],"passed":true},{"actual":[-5,6,26],"check":"explicit oracle 6","expected":[-5,1,5],"passed":false},{"actual":[-4,10,14,27],"check":"explicit oracle 7","expected":[-4,2,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-25], \"expected\": [-25], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [-13, 27], \"expected\": [-13, 2], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [2], \"expected\": [1, 2, 8], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [-9, 14], \"expected\": [-9, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [-7, 9, 13], \"expected\": [-7, 1, 3], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [-5], \"expected\": [-5], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [-5, 6, 26], \"expected\": [-5, 1, 5], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [-4, 10, 14, 27], \"expected\": [-4, 2, 3], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.961,"exit_code":1,"observations":[{"actual":[-25,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 0","expected":[-25],"passed":false},{"actual":[-13,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 1","expected":[-13,2],"passed":false},{"actual":[1,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 2","expected":[1,2,8],"passed":false},{"actual":[-9,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 3","expected":[-9,1,2],"passed":false},{"actual":[-7,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 4","expected":[-7,1,3],"passed":false},{"actual":[-5,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":[-5],"passed":false},{"actual":[-5,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 6","expected":[-5,1,5],"passed":false},{"actual":[-4,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 7","expected":[-4,2,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-25, 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\": [-25], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [-13, 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\": [-13, 2], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [1, 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\": [1, 2, 8], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [-9, 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\": [-9, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [-7, 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\": [-7, 1, 3], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [-5, 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\": [-5], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [-5, 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\": [-5, 1, 5], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [-4, 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\": [-4, 2, 3], \"passed\": false}], \"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."}}