{"abstract":"The exact stern brocot path result violates the stated contract at right edge label.","category":"Numerics","checks":8,"contract":"Input reduced positive [p,q]; return run-expanded L/R path from 1/1. Bounds: 1<=p,q<=24.","contract_signature":"x","evaluation_group":"s3-numerics-stern-brocot-path","failed_approach":"The partial repair '' still violates the right edge label invariant.","family":"s3-numerics-stern-brocot-path-right-edge-label","id":"FA-14531","implementations":{"attempt":{"sha256":"bbf5dc3e8cd855d86d5e78125ebca1ca3cc2ac3588b0f4bff4736da36336d0c0","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(100):\n     if p==q: break\n     if p<q:\n      out.append('L')\n      q=q-p\n     else:\n      out.append('')\n      p=p-q\n    return ''.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1], 'R'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 2], 'L'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL')], [([2, 3], 'LR'), ([2, 7], 'LLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([2, 5], 'LLR'), ([2, 13], 'LLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([2, 7], 'LLLR'), ([2, 19], 'LLLLLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([2, 9], 'LLLLR'), ([3, 1], 'RR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]\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":"ad4ee2f9b637862012ee1c81be0d3340789dbb55a59a9f6f636b443437a7235d","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(100):\n     if p==q: break\n     if p<q:\n      out.append('L')\n      q=q-p\n     else:\n      out.append('L')\n      p=p-q\n    return ''.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1], 'R'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 2], 'L'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL')], [([2, 3], 'LR'), ([2, 7], 'LLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([2, 5], 'LLR'), ([2, 13], 'LLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([2, 7], 'LLLR'), ([2, 19], 'LLLLLLLLLR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([2, 9], 'LLLLR'), ([3, 1], 'RR'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([5, 6], 'LRRRR'), ([5, 7], 'LRRL'), ([5, 8], 'LRLR'), ([5, 9], 'LRLLL')]]\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-stern-brocot-path-right-edge-label","generated_at":"2026-09-29T14:39:17.818394+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 right edge label step uses 'L' instead of 'R'.","sha256":"175c88dc44a449217e732e68463dd79b224012dee79fbcbb4892df852b9506ff","title":"Stern brocot path: right edge label · 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.271,"exit_code":1,"observations":[{"actual":"","check":"explicit oracle 0","expected":"R","passed":false},{"actual":"","check":"explicit oracle 1","expected":"","passed":true},{"actual":"LLLLLLLLLLLLLLLLLLLLLL","check":"explicit oracle 2","expected":"RLLLLLLLLLLLLLLLLLLLLLL","passed":false},{"actual":"L","check":"explicit oracle 3","expected":"L","passed":true},{"actual":"LL","check":"explicit oracle 4","expected":"LL","passed":true},{"actual":"LLL","check":"explicit oracle 5","expected":"LLL","passed":true},{"actual":"LLLL","check":"explicit oracle 6","expected":"LLLL","passed":true},{"actual":"LLLLL","check":"explicit oracle 7","expected":"LLLLL","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": \"\", \"expected\": \"R\", \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": \"LLLLLLLLLLLLLLLLLLLLLL\", \"expected\": \"RLLLLLLLLLLLLLLLLLLLLLL\", \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": \"L\", \"expected\": \"L\", \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": \"LL\", \"expected\": \"LL\", \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": \"LLL\", \"expected\": \"LLL\", \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": \"LLLL\", \"expected\": \"LLLL\", \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": \"LLLLL\", \"expected\": \"LLLLL\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.863,"exit_code":1,"observations":[{"actual":"L","check":"explicit oracle 0","expected":"R","passed":false},{"actual":"","check":"explicit oracle 1","expected":"","passed":true},{"actual":"LLLLLLLLLLLLLLLLLLLLLLL","check":"explicit oracle 2","expected":"RLLLLLLLLLLLLLLLLLLLLLL","passed":false},{"actual":"L","check":"explicit oracle 3","expected":"L","passed":true},{"actual":"LL","check":"explicit oracle 4","expected":"LL","passed":true},{"actual":"LLL","check":"explicit oracle 5","expected":"LLL","passed":true},{"actual":"LLLL","check":"explicit oracle 6","expected":"LLLL","passed":true},{"actual":"LLLLL","check":"explicit oracle 7","expected":"LLLLL","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": \"L\", \"expected\": \"R\", \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": \"LLLLLLLLLLLLLLLLLLLLLLL\", \"expected\": \"RLLLLLLLLLLLLLLLLLLLLLL\", \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": \"L\", \"expected\": \"L\", \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": \"LL\", \"expected\": \"LL\", \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": \"LLL\", \"expected\": \"LLL\", \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": \"LLLL\", \"expected\": \"LLLL\", \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": \"LLLLL\", \"expected\": \"LLLLL\", \"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."}}