{"abstract":"The exact rational mediant walk result violates the stated contract at right bound replacement.","category":"Numerics","checks":8,"contract":"Input path over L/R; return Stern-Brocot interval bounds and its mediant.","evaluation_group":"s3-numerics-rational-mediant-walk","failed_approach":"The partial repair lo=[mid[1],mid[0]] still violates the right bound replacement invariant.","family":"s3-numerics-rational-mediant-walk-right-bound-replacement","id":"FA-14586","implementations":{"attempt":{"sha256":"f299a842f9ac28be7dbadc888dfa330d41863524d9d3ec78672be622ee3115bc","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    lo=[0,1]\n    hi=[1,0]\n    for step in x:\n     mid=[lo[0]+hi[0],lo[1]+hi[1]]\n     if step=='L': hi=mid\n     else: lo=[mid[1],mid[0]]\n    return [lo,hi,[lo[0]+hi[0],lo[1]+hi[1]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('R', [[1, 1], [1, 0], [2, 1]]), ('LR', [[1, 2], [1, 1], [2, 3]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('L', [[0, 1], [1, 1], [1, 2]]), ('LL', [[0, 1], [1, 2], [1, 3]]), ('RL', [[1, 1], [2, 1], [3, 2]]), ('RR', [[2, 1], [1, 0], [3, 1]])], [('LR', [[1, 2], [1, 1], [2, 3]]), ('LRL', [[1, 2], [2, 3], [3, 5]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLRL', [[1, 3], [2, 5], [3, 8]]), ('LLRR', [[2, 5], [1, 2], [3, 7]]), ('LRLL', [[1, 2], [3, 5], [4, 7]]), ('LRLR', [[3, 5], [2, 3], [5, 8]])], [('RL', [[1, 1], [2, 1], [3, 2]]), ('RRR', [[3, 1], [1, 0], [4, 1]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLLRR', [[2, 7], [1, 3], [3, 10]]), ('LLRLL', [[1, 3], [3, 8], [4, 11]]), ('LLRLR', [[3, 8], [2, 5], [5, 13]]), ('LLRRL', [[2, 5], [3, 7], [5, 12]])], [('RR', [[2, 1], [1, 0], [3, 1]]), ('LLRR', [[2, 5], [1, 2], [3, 7]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('RLRLL', [[3, 2], [8, 5], [11, 7]]), ('RLRLR', [[8, 5], [5, 3], [13, 8]]), ('RLRRL', [[5, 3], [7, 4], [12, 7]]), ('RLRRR', [[7, 4], [2, 1], [9, 5]])], [('LLR', [[1, 3], [1, 2], [2, 5]]), ('LRRR', [[3, 4], [1, 1], [4, 5]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLLRLR', [[3, 11], [2, 7], [5, 18]]), ('LLLRRL', [[2, 7], [3, 10], [5, 17]]), ('LLLRRR', [[3, 10], [1, 3], [4, 13]]), ('LLRLLL', [[1, 3], [4, 11], [5, 14]])]]\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":"e2a7a79e246e822b5e5ebe2093e70429c3be7ef640bddbbf4faa15e6ae01ad7f","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    lo=[0,1]\n    hi=[1,0]\n    for step in x:\n     mid=[lo[0]+hi[0],lo[1]+hi[1]]\n     if step=='L': hi=mid\n     else: hi=mid\n    return [lo,hi,[lo[0]+hi[0],lo[1]+hi[1]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('R', [[1, 1], [1, 0], [2, 1]]), ('LR', [[1, 2], [1, 1], [2, 3]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('L', [[0, 1], [1, 1], [1, 2]]), ('LL', [[0, 1], [1, 2], [1, 3]]), ('RL', [[1, 1], [2, 1], [3, 2]]), ('RR', [[2, 1], [1, 0], [3, 1]])], [('LR', [[1, 2], [1, 1], [2, 3]]), ('LRL', [[1, 2], [2, 3], [3, 5]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLRL', [[1, 3], [2, 5], [3, 8]]), ('LLRR', [[2, 5], [1, 2], [3, 7]]), ('LRLL', [[1, 2], [3, 5], [4, 7]]), ('LRLR', [[3, 5], [2, 3], [5, 8]])], [('RL', [[1, 1], [2, 1], [3, 2]]), ('RRR', [[3, 1], [1, 0], [4, 1]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLLRR', [[2, 7], [1, 3], [3, 10]]), ('LLRLL', [[1, 3], [3, 8], [4, 11]]), ('LLRLR', [[3, 8], [2, 5], [5, 13]]), ('LLRRL', [[2, 5], [3, 7], [5, 12]])], [('RR', [[2, 1], [1, 0], [3, 1]]), ('LLRR', [[2, 5], [1, 2], [3, 7]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('RLRLL', [[3, 2], [8, 5], [11, 7]]), ('RLRLR', [[8, 5], [5, 3], [13, 8]]), ('RLRRL', [[5, 3], [7, 4], [12, 7]]), ('RLRRR', [[7, 4], [2, 1], [9, 5]])], [('LLR', [[1, 3], [1, 2], [2, 5]]), ('LRRR', [[3, 4], [1, 1], [4, 5]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLLRLR', [[3, 11], [2, 7], [5, 18]]), ('LLLRRL', [[2, 7], [3, 10], [5, 17]]), ('LLLRRR', [[3, 10], [1, 3], [4, 13]]), ('LLRLLL', [[1, 3], [4, 11], [5, 14]])]]\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":"3de0289c92a402e9b84a39f1abe5a9286dc7e588523b6101dd0e37943526ea72","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    lo=[0,1]\n    hi=[1,0]\n    for step in x:\n     mid=[lo[0]+hi[0],lo[1]+hi[1]]\n     if step=='L': hi=mid\n     else: lo=mid\n    return [lo,hi,[lo[0]+hi[0],lo[1]+hi[1]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('R', [[1, 1], [1, 0], [2, 1]]), ('LR', [[1, 2], [1, 1], [2, 3]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('L', [[0, 1], [1, 1], [1, 2]]), ('LL', [[0, 1], [1, 2], [1, 3]]), ('RL', [[1, 1], [2, 1], [3, 2]]), ('RR', [[2, 1], [1, 0], [3, 1]])], [('LR', [[1, 2], [1, 1], [2, 3]]), ('LRL', [[1, 2], [2, 3], [3, 5]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLRL', [[1, 3], [2, 5], [3, 8]]), ('LLRR', [[2, 5], [1, 2], [3, 7]]), ('LRLL', [[1, 2], [3, 5], [4, 7]]), ('LRLR', [[3, 5], [2, 3], [5, 8]])], [('RL', [[1, 1], [2, 1], [3, 2]]), ('RRR', [[3, 1], [1, 0], [4, 1]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLLRR', [[2, 7], [1, 3], [3, 10]]), ('LLRLL', [[1, 3], [3, 8], [4, 11]]), ('LLRLR', [[3, 8], [2, 5], [5, 13]]), ('LLRRL', [[2, 5], [3, 7], [5, 12]])], [('RR', [[2, 1], [1, 0], [3, 1]]), ('LLRR', [[2, 5], [1, 2], [3, 7]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('RLRLL', [[3, 2], [8, 5], [11, 7]]), ('RLRLR', [[8, 5], [5, 3], [13, 8]]), ('RLRRL', [[5, 3], [7, 4], [12, 7]]), ('RLRRR', [[7, 4], [2, 1], [9, 5]])], [('LLR', [[1, 3], [1, 2], [2, 5]]), ('LRRR', [[3, 4], [1, 1], [4, 5]]), ('', [[0, 1], [1, 0], [1, 1]]), ('RRRRRR', [[6, 1], [1, 0], [7, 1]]), ('LLLRLR', [[3, 11], [2, 7], [5, 18]]), ('LLLRRL', [[2, 7], [3, 10], [5, 17]]), ('LLLRRR', [[3, 10], [1, 3], [4, 13]]), ('LLRLLL', [[1, 3], [4, 11], [5, 14]])]]\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-mediant-walk-right-bound-replacement","generated_at":"2026-09-29T14:39:18.409128+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 lo=mid at the right bound replacement step.","root_cause":"The right bound replacement step uses hi=mid instead of lo=mid.","sha256":"5f3b9b68e3e6b5272a04ca8743f73634a2a9fbb8f297e54d4d3412f8867ebe6d","title":"Rational mediant walk: right bound replacement · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.383,"exit_code":1,"observations":[{"actual":[[1,1],[1,0],[2,1]],"check":"explicit oracle 0","expected":[[1,1],[1,0],[2,1]],"passed":true},{"actual":[[2,1],[1,1],[3,2]],"check":"explicit oracle 1","expected":[[1,2],[1,1],[2,3]],"passed":false},{"actual":[[0,1],[1,0],[1,1]],"check":"explicit oracle 2","expected":[[0,1],[1,0],[1,1]],"passed":true},{"actual":[[3,4],[1,0],[4,4]],"check":"explicit oracle 3","expected":[[6,1],[1,0],[7,1]],"passed":false},{"actual":[[0,1],[1,1],[1,2]],"check":"explicit oracle 4","expected":[[0,1],[1,1],[1,2]],"passed":true},{"actual":[[0,1],[1,2],[1,3]],"check":"explicit oracle 5","expected":[[0,1],[1,2],[1,3]],"passed":true},{"actual":[[1,1],[2,1],[3,2]],"check":"explicit oracle 6","expected":[[1,1],[2,1],[3,2]],"passed":true},{"actual":[[1,2],[1,0],[2,2]],"check":"explicit oracle 7","expected":[[2,1],[1,0],[3,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [[1, 1], [1, 0], [2, 1]], \"expected\": [[1, 1], [1, 0], [2, 1]], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [[2, 1], [1, 1], [3, 2]], \"expected\": [[1, 2], [1, 1], [2, 3]], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [[0, 1], [1, 0], [1, 1]], \"expected\": [[0, 1], [1, 0], [1, 1]], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [[3, 4], [1, 0], [4, 4]], \"expected\": [[6, 1], [1, 0], [7, 1]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [[0, 1], [1, 1], [1, 2]], \"expected\": [[0, 1], [1, 1], [1, 2]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [[0, 1], [1, 2], [1, 3]], \"expected\": [[0, 1], [1, 2], [1, 3]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [[1, 1], [2, 1], [3, 2]], \"expected\": [[1, 1], [2, 1], [3, 2]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [[1, 2], [1, 0], [2, 2]], \"expected\": [[2, 1], [1, 0], [3, 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.054,"exit_code":1,"observations":[{"actual":[[0,1],[1,1],[1,2]],"check":"explicit oracle 0","expected":[[1,1],[1,0],[2,1]],"passed":false},{"actual":[[0,1],[1,2],[1,3]],"check":"explicit oracle 1","expected":[[1,2],[1,1],[2,3]],"passed":false},{"actual":[[0,1],[1,0],[1,1]],"check":"explicit oracle 2","expected":[[0,1],[1,0],[1,1]],"passed":true},{"actual":[[0,1],[1,6],[1,7]],"check":"explicit oracle 3","expected":[[6,1],[1,0],[7,1]],"passed":false},{"actual":[[0,1],[1,1],[1,2]],"check":"explicit oracle 4","expected":[[0,1],[1,1],[1,2]],"passed":true},{"actual":[[0,1],[1,2],[1,3]],"check":"explicit oracle 5","expected":[[0,1],[1,2],[1,3]],"passed":true},{"actual":[[0,1],[1,2],[1,3]],"check":"explicit oracle 6","expected":[[1,1],[2,1],[3,2]],"passed":false},{"actual":[[0,1],[1,2],[1,3]],"check":"explicit oracle 7","expected":[[2,1],[1,0],[3,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [[0, 1], [1, 1], [1, 2]], \"expected\": [[1, 1], [1, 0], [2, 1]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [[0, 1], [1, 2], [1, 3]], \"expected\": [[1, 2], [1, 1], [2, 3]], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [[0, 1], [1, 0], [1, 1]], \"expected\": [[0, 1], [1, 0], [1, 1]], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [[0, 1], [1, 6], [1, 7]], \"expected\": [[6, 1], [1, 0], [7, 1]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [[0, 1], [1, 1], [1, 2]], \"expected\": [[0, 1], [1, 1], [1, 2]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [[0, 1], [1, 2], [1, 3]], \"expected\": [[0, 1], [1, 2], [1, 3]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [[0, 1], [1, 2], [1, 3]], \"expected\": [[1, 1], [2, 1], [3, 2]], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [[0, 1], [1, 2], [1, 3]], \"expected\": [[2, 1], [1, 0], [3, 1]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.765,"exit_code":0,"observations":[{"actual":[[1,1],[1,0],[2,1]],"check":"explicit oracle 0","expected":[[1,1],[1,0],[2,1]],"passed":true},{"actual":[[1,2],[1,1],[2,3]],"check":"explicit oracle 1","expected":[[1,2],[1,1],[2,3]],"passed":true},{"actual":[[0,1],[1,0],[1,1]],"check":"explicit oracle 2","expected":[[0,1],[1,0],[1,1]],"passed":true},{"actual":[[6,1],[1,0],[7,1]],"check":"explicit oracle 3","expected":[[6,1],[1,0],[7,1]],"passed":true},{"actual":[[0,1],[1,1],[1,2]],"check":"explicit oracle 4","expected":[[0,1],[1,1],[1,2]],"passed":true},{"actual":[[0,1],[1,2],[1,3]],"check":"explicit oracle 5","expected":[[0,1],[1,2],[1,3]],"passed":true},{"actual":[[1,1],[2,1],[3,2]],"check":"explicit oracle 6","expected":[[1,1],[2,1],[3,2]],"passed":true},{"actual":[[2,1],[1,0],[3,1]],"check":"explicit oracle 7","expected":[[2,1],[1,0],[3,1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [[1, 1], [1, 0], [2, 1]], \"expected\": [[1, 1], [1, 0], [2, 1]], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [[1, 2], [1, 1], [2, 3]], \"expected\": [[1, 2], [1, 1], [2, 3]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [[0, 1], [1, 0], [1, 1]], \"expected\": [[0, 1], [1, 0], [1, 1]], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [[6, 1], [1, 0], [7, 1]], \"expected\": [[6, 1], [1, 0], [7, 1]], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [[0, 1], [1, 1], [1, 2]], \"expected\": [[0, 1], [1, 1], [1, 2]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [[0, 1], [1, 2], [1, 3]], \"expected\": [[0, 1], [1, 2], [1, 3]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [[1, 1], [2, 1], [3, 2]], \"expected\": [[1, 1], [2, 1], [3, 2]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [[2, 1], [1, 0], [3, 1]], \"expected\": [[2, 1], [1, 0], [3, 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}