{"abstract":"The exact jacobi symbol result violates the stated contract at common factor terminal.","category":"Numerics","checks":8,"contract":"Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.","contract_signature":"x","evaluation_group":"s3-numerics-jacobi-symbol","failed_approach":"The partial repair sign if n>1 else 0 still violates the common factor terminal invariant.","family":"s3-numerics-jacobi-symbol-common-factor-terminal","id":"FA-14861","implementations":{"attempt":{"sha256":"b49c5852ed383fe09cf74ec2c49edfe81cbf3d023e3748f09fb35e4e47f88f8e","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    a,n=x\n    a=a%n;sign=1\n    for _ in range(100):\n     if a==0:break\n     while a%2==0:\n      a//=2\n      if n%8 in (3,5):sign=-sign\n     if a%4==3 and n%4==3:sign=-sign\n     a,n=n%a,a\n    return sign if n>1 else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-30, 3], 0), ([-30, 1], 1), ([50, 69], -1), ([-29, 1], 1), ([-28, 1], 1), ([-27, 1], 1), ([-26, 1], 1), ([-25, 1], 1)], [([-27, 3], 0), ([-27, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([-13, 1], 1), ([-12, 1], 1), ([-11, 1], 1), ([-10, 1], 1)], [([-24, 3], 0), ([-24, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([4, 1], 1), ([5, 1], 1), ([6, 1], 1), ([7, 1], 1)], [([-21, 3], 0), ([-21, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([21, 1], 1), ([22, 1], 1), ([23, 1], 1), ([24, 1], 1)], [([-18, 3], 0), ([-18, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([38, 1], 1), ([39, 1], 1), ([40, 1], 1), ([41, 1], 1)]]\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":"43cac1b119754c438b4c76f8a02aa45e5c90935caee3f9eccd1d441a66a6bb17","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    a,n=x\n    a=a%n;sign=1\n    for _ in range(100):\n     if a==0:break\n     while a%2==0:\n      a//=2\n      if n%8 in (3,5):sign=-sign\n     if a%4==3 and n%4==3:sign=-sign\n     a,n=n%a,a\n    return sign\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-30, 3], 0), ([-30, 1], 1), ([50, 69], -1), ([-29, 1], 1), ([-28, 1], 1), ([-27, 1], 1), ([-26, 1], 1), ([-25, 1], 1)], [([-27, 3], 0), ([-27, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([-13, 1], 1), ([-12, 1], 1), ([-11, 1], 1), ([-10, 1], 1)], [([-24, 3], 0), ([-24, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([4, 1], 1), ([5, 1], 1), ([6, 1], 1), ([7, 1], 1)], [([-21, 3], 0), ([-21, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([21, 1], 1), ([22, 1], 1), ([23, 1], 1), ([24, 1], 1)], [([-18, 3], 0), ([-18, 1], 1), ([-30, 1], 1), ([50, 69], -1), ([38, 1], 1), ([39, 1], 1), ([40, 1], 1), ([41, 1], 1)]]\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-jacobi-symbol-common-factor-terminal","generated_at":"2026-09-29T14:39:21.151750+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 common factor terminal step uses sign instead of sign if n==1 else 0.","sha256":"4259a20dd5c7a662de70d3fa5b3367699accd673119ef2a4cf9ebbdb1ed30ee0","title":"Jacobi symbol: common factor terminal · 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":43.673,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":0,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":1,"passed":false},{"actual":0,"check":"explicit oracle 2","expected":-1,"passed":false},{"actual":0,"check":"explicit oracle 3","expected":1,"passed":false},{"actual":0,"check":"explicit oracle 4","expected":1,"passed":false},{"actual":0,"check":"explicit oracle 5","expected":1,"passed":false},{"actual":0,"check":"explicit oracle 6","expected":1,"passed":false},{"actual":0,"check":"explicit oracle 7","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": 0, \"expected\": -1, \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": 0, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.277,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":0,"passed":false},{"actual":1,"check":"explicit oracle 1","expected":1,"passed":true},{"actual":-1,"check":"explicit oracle 2","expected":-1,"passed":true},{"actual":1,"check":"explicit oracle 3","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 4","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 7","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 1, \"expected\": 1, \"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."}}