{"abstract":"The exact rational continued fraction result violates the stated contract at euclidean remainder.","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 p-a still violates the euclidean remainder invariant.","family":"s3-numerics-rational-continued-fraction-euclidean-remainder","id":"FA-14421","implementations":{"attempt":{"sha256":"7bdbb2153a1aa0ab095024a113bcb1e4a33c43078b6a5826169ead21921dbf5d","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\n     p,q=q,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, 2], [-13, 2]), ([-25, 1], [-25]), ([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, 3], [-9, 1, 2]), ([-25, 5], [-5]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-24, 1], [-24]), ([-24, 2], [-12]), ([-24, 3], [-8]), ([-24, 4], [-6])], [([-25, 4], [-7, 1, 3]), ([-25, 8], [-4, 1, 7]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-23, 1], [-23]), ([-23, 2], [-12, 2]), ([-23, 3], [-8, 3]), ([-23, 4], [-6, 4])], [([-25, 6], [-5, 1, 5]), ([-25, 11], [-3, 1, 2, 1, 2]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-22, 1], [-22]), ([-22, 2], [-11]), ([-22, 3], [-8, 1, 2]), ([-22, 4], [-6, 2])], [([-25, 7], [-4, 2, 3]), ([-25, 14], [-2, 4, 1, 2]), ([-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":"c0282839dddb11bc014ff70bd2d40f8658aace2c17f1347785eed5e112fe0c15","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%q if p>=0 else -(abs(p)%q)\n     p,q=q,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, 2], [-13, 2]), ([-25, 1], [-25]), ([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, 3], [-9, 1, 2]), ([-25, 5], [-5]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-24, 1], [-24]), ([-24, 2], [-12]), ([-24, 3], [-8]), ([-24, 4], [-6])], [([-25, 4], [-7, 1, 3]), ([-25, 8], [-4, 1, 7]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-23, 1], [-23]), ([-23, 2], [-12, 2]), ([-23, 3], [-8, 3]), ([-23, 4], [-6, 4])], [([-25, 6], [-5, 1, 5]), ([-25, 11], [-3, 1, 2, 1, 2]), ([-25, 1], [-25]), ([25, 17], [1, 2, 8]), ([-22, 1], [-22]), ([-22, 2], [-11]), ([-22, 3], [-8, 1, 2]), ([-22, 4], [-6, 2])], [([-25, 7], [-4, 2, 3]), ([-25, 14], [-2, 4, 1, 2]), ([-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-euclidean-remainder","generated_at":"2026-09-29T14:39:16.674770+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 euclidean remainder step uses p%q if p>=0 else -(abs(p)%q) instead of p-a*q.","sha256":"d32bab21817f67e662dfa515540e1a04647c2254938cc283250e5cabcf2fc5ed","title":"Rational continued fraction: euclidean remainder · 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":44.683,"exit_code":1,"observations":[{"actual":[-13,-1,-4,-1,-2,-1,-2,-2,-1,-3,-1,-5,-1,-15,-1],"check":"explicit oracle 0","expected":[-13,2],"passed":false},{"actual":[-25],"check":"explicit oracle 1","expected":[-25],"passed":true},{"actual":[1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2],"check":"explicit oracle 2","expected":[1,2,8],"passed":false},{"actual":[-9,-1,-4,-1,-3,-1,-2,-1,-1,-2,-1,-2,-1,-3,-1,-5,-1,-10,-1,-29,-1],"check":"explicit oracle 3","expected":[-9,1,2],"passed":false},{"actual":[-7,-1,-4,-1,-3,-1,-2,-1,-2,-2,-1,-2,-1,-3,-1,-4,-1,-7,-1,-13,-1,-39,-1],"check":"explicit oracle 4","expected":[-7,1,3],"passed":false},{"actual":[-5,-1,-4,-1,-3,-1,-2,-1,-2,-1,-1,-2,-1,-2,-1,-3,-1,-4,-1,-6,-1,-9,-1,-18,-1,-54,-1],"check":"explicit oracle 5","expected":[-5],"passed":false},{"actual":[-5,-1,-3,-1,-3,-1,-2,-1,-2,-1,-1,-2,-1,-2,-1,-3,-1,-3,-1,-5,-1,-7,-1,-11,-1,-22,-1,-66,-1],"check":"explicit oracle 6","expected":[-5,1,5],"passed":false},{"actual":[-4,-1,-3,-1,-2,-1,-2,-1,-2,-1,-1,-2,-1,-2,-1,-2,-1,-3,-1,-3,-1,-4,-1,-6,-1,-9,-1,-15,-1,-29],"check":"explicit oracle 7","expected":[-4,2,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-13, -1, -4, -1, -2, -1, -2, -2, -1, -3, -1, -5, -1, -15, -1], \"expected\": [-13, 2], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [-25], \"expected\": [-25], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], \"expected\": [1, 2, 8], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [-9, -1, -4, -1, -3, -1, -2, -1, -1, -2, -1, -2, -1, -3, -1, -5, -1, -10, -1, -29, -1], \"expected\": [-9, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [-7, -1, -4, -1, -3, -1, -2, -1, -2, -2, -1, -2, -1, -3, -1, -4, -1, -7, -1, -13, -1, -39, -1], \"expected\": [-7, 1, 3], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [-5, -1, -4, -1, -3, -1, -2, -1, -2, -1, -1, -2, -1, -2, -1, -3, -1, -4, -1, -6, -1, -9, -1, -18, -1, -54, -1], \"expected\": [-5], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [-5, -1, -3, -1, -3, -1, -2, -1, -2, -1, -1, -2, -1, -2, -1, -3, -1, -3, -1, -5, -1, -7, -1, -11, -1, -22, -1, -66, -1], \"expected\": [-5, 1, 5], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [-4, -1, -3, -1, -2, -1, -2, -1, -2, -1, -1, -2, -1, -2, -1, -2, -1, -3, -1, -3, -1, -4, -1, -6, -1, -9, -1, -15, -1, -29], \"expected\": [-4, 2, 3], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.943,"exit_code":1,"observations":[{"actual":[-13,-2],"check":"explicit oracle 0","expected":[-13,2],"passed":false},{"actual":[-25],"check":"explicit oracle 1","expected":[-25],"passed":true},{"actual":[1,2,8],"check":"explicit oracle 2","expected":[1,2,8],"passed":true},{"actual":[-9,-3],"check":"explicit oracle 3","expected":[-9,1,2],"passed":false},{"actual":[-7,-4],"check":"explicit oracle 4","expected":[-7,1,3],"passed":false},{"actual":[-5],"check":"explicit oracle 5","expected":[-5],"passed":true},{"actual":[-5,-6],"check":"explicit oracle 6","expected":[-5,1,5],"passed":false},{"actual":[-4,-2,4],"check":"explicit oracle 7","expected":[-4,2,3],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-13, -2], \"expected\": [-13, 2], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [-25], \"expected\": [-25], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [1, 2, 8], \"expected\": [1, 2, 8], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [-9, -3], \"expected\": [-9, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [-7, -4], \"expected\": [-7, 1, 3], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [-5], \"expected\": [-5], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [-5, -6], \"expected\": [-5, 1, 5], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [-4, -2, 4], \"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."}}