{"abstract":"The exact stern brocot path result violates the stated contract at left 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.","evaluation_group":"s3-numerics-stern-brocot-path","failed_approach":"The partial repair '' still violates the left edge label invariant.","family":"s3-numerics-stern-brocot-path-left-edge-label","id":"FA-14521","implementations":{"attempt":{"sha256":"b59e925106e592e3b54dbb0acf70026a2ab2beb5fbe918bacc1c3ae70b1d62a7","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('')\n      q=q-p\n     else:\n      out.append('R')\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 = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([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":"9cce2cd0004f228a4ac73ef9b2f35ab2ec6a63a1d3c88dd8ff487b8c62917f85","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('R')\n      q=q-p\n     else:\n      out.append('R')\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 = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([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"},"fixed":{"sha256":"046af283613ae17e6dee39cec8bd528a022cb4eb3129b56c3b7720e18f3353e5","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('R')\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 = [[([1, 2], 'L'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 3], 'LL'), ([1, 4], 'LLL'), ([1, 5], 'LLLL'), ([1, 6], 'LLLLL'), ([1, 7], 'LLLLLL')], [([1, 3], 'LL'), ([1, 5], 'LLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([1, 18], 'LLLLLLLLLLLLLLLLL'), ([1, 19], 'LLLLLLLLLLLLLLLLLL'), ([1, 20], 'LLLLLLLLLLLLLLLLLLL'), ([1, 21], 'LLLLLLLLLLLLLLLLLLLL')], [([1, 4], 'LLL'), ([1, 8], 'LLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([2, 21], 'LLLLLLLLLLR'), ([2, 23], 'LLLLLLLLLLLR'), ([3, 1], 'RR'), ([3, 2], 'RL')], [([1, 5], 'LLLL'), ([1, 11], 'LLLLLLLLLL'), ([1, 1], ''), ([24, 23], 'RLLLLLLLLLLLLLLLLLLLLLL'), ([3, 23], 'LLLLLLLRL'), ([4, 1], 'RRR'), ([4, 3], 'RLL'), ([4, 5], 'LRRR')], [([1, 6], 'LLLLL'), ([1, 14], 'LLLLLLLLLLLLL'), ([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-left-edge-label","generated_at":"2026-09-29T14:39:17.778544+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.","repair":"Use 'L' at the left edge label step.","root_cause":"The left edge label step uses 'R' instead of 'L'.","sha256":"d63315755662c26b99a33fa6bdfa978c77356d53cb7fa094a7988a7155977c6b","title":"Stern brocot path: left edge label · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.112,"exit_code":1,"observations":[{"actual":"","check":"explicit oracle 0","expected":"L","passed":false},{"actual":"","check":"explicit oracle 1","expected":"","passed":true},{"actual":"R","check":"explicit oracle 2","expected":"RLLLLLLLLLLLLLLLLLLLLLL","passed":false},{"actual":"","check":"explicit oracle 3","expected":"LL","passed":false},{"actual":"","check":"explicit oracle 4","expected":"LLL","passed":false},{"actual":"","check":"explicit oracle 5","expected":"LLLL","passed":false},{"actual":"","check":"explicit oracle 6","expected":"LLLLL","passed":false},{"actual":"","check":"explicit oracle 7","expected":"LLLLLL","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": \"\", \"expected\": \"L\", \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": \"R\", \"expected\": \"RLLLLLLLLLLLLLLLLLLLLLL\", \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": \"\", \"expected\": \"LL\", \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": \"\", \"expected\": \"LLL\", \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": \"\", \"expected\": \"LLLL\", \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": \"\", \"expected\": \"LLLLL\", \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": \"\", \"expected\": \"LLLLLL\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.757,"exit_code":1,"observations":[{"actual":"R","check":"explicit oracle 0","expected":"L","passed":false},{"actual":"","check":"explicit oracle 1","expected":"","passed":true},{"actual":"RRRRRRRRRRRRRRRRRRRRRRR","check":"explicit oracle 2","expected":"RLLLLLLLLLLLLLLLLLLLLLL","passed":false},{"actual":"RR","check":"explicit oracle 3","expected":"LL","passed":false},{"actual":"RRR","check":"explicit oracle 4","expected":"LLL","passed":false},{"actual":"RRRR","check":"explicit oracle 5","expected":"LLLL","passed":false},{"actual":"RRRRR","check":"explicit oracle 6","expected":"LLLLL","passed":false},{"actual":"RRRRRR","check":"explicit oracle 7","expected":"LLLLLL","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": \"R\", \"expected\": \"L\", \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": \"RRRRRRRRRRRRRRRRRRRRRRR\", \"expected\": \"RLLLLLLLLLLLLLLLLLLLLLL\", \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": \"RR\", \"expected\": \"LL\", \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": \"RRR\", \"expected\": \"LLL\", \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": \"RRRR\", \"expected\": \"LLLL\", \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": \"RRRRR\", \"expected\": \"LLLLL\", \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": \"RRRRRR\", \"expected\": \"LLLLLL\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.525,"exit_code":0,"observations":[{"actual":"L","check":"explicit oracle 0","expected":"L","passed":true},{"actual":"","check":"explicit oracle 1","expected":"","passed":true},{"actual":"RLLLLLLLLLLLLLLLLLLLLLL","check":"explicit oracle 2","expected":"RLLLLLLLLLLLLLLLLLLLLLL","passed":true},{"actual":"LL","check":"explicit oracle 3","expected":"LL","passed":true},{"actual":"LLL","check":"explicit oracle 4","expected":"LLL","passed":true},{"actual":"LLLL","check":"explicit oracle 5","expected":"LLLL","passed":true},{"actual":"LLLLL","check":"explicit oracle 6","expected":"LLLLL","passed":true},{"actual":"LLLLLL","check":"explicit oracle 7","expected":"LLLLLL","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": \"L\", \"expected\": \"L\", \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": \"RLLLLLLLLLLLLLLLLLLLLLL\", \"expected\": \"RLLLLLLLLLLLLLLLLLLLLLL\", \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": \"LL\", \"expected\": \"LL\", \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": \"LLL\", \"expected\": \"LLL\", \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": \"LLLL\", \"expected\": \"LLLL\", \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": \"LLLLL\", \"expected\": \"LLLLL\", \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": \"LLLLLL\", \"expected\": \"LLLLLL\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}