{"abstract":"Green split allocation returns a wrong result when critical flow ratios are read as den over num.","category":"Traffic signal timing plans","checks":8,"contract":"Input {cycle, lost, ratios: per-phase critical flow ratios [num, den], min_green: per-phase minima}. Effective green G = cycle - lost is shared in proportion to the ratios; each phase gets the floor of its ideal share and remaining seconds go one each by largest fractional remainder (ties to the lower phase index). Then each phase below its minimum (in index order) takes seconds one at a time from the phase with the largest surplus over its own minimum (ties to the lower index). If the minima exceed G return 'infeasible'. Return the list of integer greens.","evaluation_group":"w2-traffic_signal_timing_plans-green-split","failed_approach":"Rounding through a float to one decimal still distorts the proportions of ratios such as 3/20.","family":"w2-traffic_signal_timing_plans-green-split-ratio-parse","id":"FA-67886","implementations":{"attempt":{"sha256":"99503adb3de9c00dd2e90bccd6b024a48a0ec7716d2bfa2a477dfab6bb7b815f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    G = x['cycle'] - x['lost']\n    ys = [Fraction(round(a / b, 1)) for a, b in x['ratios']]\n    mins = x['min_green']\n    if sum(mins) > G:\n        return 'infeasible'\n    Y = sum(ys)\n    ideal = [G * y / Y for y in ys]\n    g = [int(v) for v in ideal]\n    left = G - sum(g)\n    order = sorted(range(len(g)), key=lambda i: (-(ideal[i] - g[i]), i))\n    for i in order[:left]:\n        g[i] += 1\n    for i in range(len(g)):\n        while g[i] < mins[i]:\n            donor = max(range(len(g)), key=lambda j: (g[j] - mins[j], -j))\n            g[donor] -= 1\n            g[i] += 1\n    return g\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'cycle': 80, 'lost': 13, 'ratios': [[2, 20], [9, 25], [7, 10], [3, 20]], 'min_green': [20, 20, 5, 7]}, [20, 20, 19, 8]), ({'cycle': 80, 'lost': 12, 'ratios': [[1, 10], [2, 10], [3, 10]], 'min_green': [20, 20, 28]}, [20, 20, 28]), ({'cycle': 100, 'lost': 12, 'ratios': [[1, 10], [1, 10], [1, 10], [1, 10]], 'min_green': [5, 5, 5, 5]}, [22, 22, 22, 22]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15]), ({'cycle': 85, 'lost': 9, 'ratios': [[6, 20], [1, 20], [6, 25], [9, 10]], 'min_green': [5, 7, 10, 7]}, [15, 7, 12, 42]), ({'cycle': 120, 'lost': 13, 'ratios': [[6, 20], [6, 20]], 'min_green': [20, 15]}, [54, 53]), ({'cycle': 75, 'lost': 10, 'ratios': [[4, 20], [4, 20], [4, 20], [4, 20]], 'min_green': [15, 15, 5, 7]}, [17, 16, 16, 16]), ({'cycle': 80, 'lost': 16, 'ratios': [[2, 20], [7, 10]], 'min_green': [10, 7]}, [10, 54])], [({'cycle': 90, 'lost': 12, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [7, 7, 7]}, [26, 26, 26]), ({'cycle': 85, 'lost': 13, 'ratios': [[5, 20], [9, 20], [6, 10]], 'min_green': [10, 10, 5]}, [14, 25, 33]), ({'cycle': 65, 'lost': 8, 'ratios': [[9, 10], [6, 20]], 'min_green': [15, 10]}, [43, 14]), ({'cycle': 65, 'lost': 10, 'ratios': [[1, 20], [9, 20]], 'min_green': [20, 35]}, [20, 35]), ({'cycle': 125, 'lost': 10, 'ratios': [[9, 10], [9, 20]], 'min_green': [7, 7]}, [77, 38]), ({'cycle': 115, 'lost': 9, 'ratios': [[3, 20], [3, 20], [3, 20]], 'min_green': [10, 10, 20]}, [36, 35, 35]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 130, 'lost': 9, 'ratios': [[5, 25], [4, 10], [5, 20], [7, 20]], 'min_green': [10, 20, 10, 7]}, [20, 41, 25, 35])], [({'cycle': 65, 'lost': 8, 'ratios': [[2, 20], [2, 20]], 'min_green': [20, 5]}, [29, 28]), ({'cycle': 130, 'lost': 11, 'ratios': [[6, 10], [7, 20], [8, 10]], 'min_green': [5, 10, 7]}, [41, 24, 54]), ({'cycle': 115, 'lost': 14, 'ratios': [[1, 10], [1, 25], [6, 25]], 'min_green': [15, 10, 7]}, [26, 11, 64]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15]), ({'cycle': 75, 'lost': 11, 'ratios': [[2, 20], [2, 20], [2, 20], [2, 20]], 'min_green': [7, 20, 5, 5]}, [16, 20, 14, 14]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 70, 'lost': 16, 'ratios': [[3, 10], [1, 10]], 'min_green': [27, 27]}, [27, 27]), ({'cycle': 115, 'lost': 12, 'ratios': [[3, 20], [2, 10]], 'min_green': [20, 5]}, [44, 59])], [({'cycle': 80, 'lost': 12, 'ratios': [[1, 10], [2, 10], [3, 10]], 'min_green': [20, 20, 28]}, [20, 20, 28]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 100, 'lost': 12, 'ratios': [[1, 10], [1, 10], [1, 10], [1, 10]], 'min_green': [5, 5, 5, 5]}, [22, 22, 22, 22]), ({'cycle': 115, 'lost': 11, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [15, 20, 10]}, [35, 35, 34]), ({'cycle': 100, 'lost': 15, 'ratios': [[4, 25], [7, 10]], 'min_green': [5, 20]}, [16, 69]), ({'cycle': 65, 'lost': 10, 'ratios': [[3, 20], [3, 20], [3, 20]], 'min_green': [5, 15, 7]}, [19, 18, 18]), ({'cycle': 65, 'lost': 15, 'ratios': [[5, 10], [9, 10], [8, 25]], 'min_green': [5, 15, 20]}, [10, 20, 20]), ({'cycle': 95, 'lost': 14, 'ratios': [[1, 10], [2, 25], [4, 20]], 'min_green': [7, 10, 7]}, [21, 17, 43])], [({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 120, 'lost': 15, 'ratios': [[7, 25], [9, 20]], 'min_green': [15, 20]}, [40, 65]), ({'cycle': 115, 'lost': 8, 'ratios': [[9, 10], [1, 25], [2, 10]], 'min_green': [10, 10, 5]}, [78, 10, 19]), ({'cycle': 130, 'lost': 8, 'ratios': [[7, 20], [6, 25]], 'min_green': [5, 20]}, [72, 50]), ({'cycle': 80, 'lost': 10, 'ratios': [[2, 20], [2, 20], [2, 20]], 'min_green': [10, 20, 20]}, [24, 23, 23]), ({'cycle': 80, 'lost': 10, 'ratios': [[2, 10], [2, 10], [2, 10]], 'min_green': [15, 5, 10]}, [24, 23, 23]), ({'cycle': 90, 'lost': 12, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [7, 7, 7]}, [26, 26, 26]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing 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":"ade6d76d3edee1bdc2467b0e60b4127119af76530b846a70cdfbfbeca83cf154","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    G = x['cycle'] - x['lost']\n    ys = [Fraction(b, a) for a, b in x['ratios']]\n    mins = x['min_green']\n    if sum(mins) > G:\n        return 'infeasible'\n    Y = sum(ys)\n    ideal = [G * y / Y for y in ys]\n    g = [int(v) for v in ideal]\n    left = G - sum(g)\n    order = sorted(range(len(g)), key=lambda i: (-(ideal[i] - g[i]), i))\n    for i in order[:left]:\n        g[i] += 1\n    for i in range(len(g)):\n        while g[i] < mins[i]:\n            donor = max(range(len(g)), key=lambda j: (g[j] - mins[j], -j))\n            g[donor] -= 1\n            g[i] += 1\n    return g\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'cycle': 80, 'lost': 13, 'ratios': [[2, 20], [9, 25], [7, 10], [3, 20]], 'min_green': [20, 20, 5, 7]}, [20, 20, 19, 8]), ({'cycle': 80, 'lost': 12, 'ratios': [[1, 10], [2, 10], [3, 10]], 'min_green': [20, 20, 28]}, [20, 20, 28]), ({'cycle': 100, 'lost': 12, 'ratios': [[1, 10], [1, 10], [1, 10], [1, 10]], 'min_green': [5, 5, 5, 5]}, [22, 22, 22, 22]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15]), ({'cycle': 85, 'lost': 9, 'ratios': [[6, 20], [1, 20], [6, 25], [9, 10]], 'min_green': [5, 7, 10, 7]}, [15, 7, 12, 42]), ({'cycle': 120, 'lost': 13, 'ratios': [[6, 20], [6, 20]], 'min_green': [20, 15]}, [54, 53]), ({'cycle': 75, 'lost': 10, 'ratios': [[4, 20], [4, 20], [4, 20], [4, 20]], 'min_green': [15, 15, 5, 7]}, [17, 16, 16, 16]), ({'cycle': 80, 'lost': 16, 'ratios': [[2, 20], [7, 10]], 'min_green': [10, 7]}, [10, 54])], [({'cycle': 90, 'lost': 12, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [7, 7, 7]}, [26, 26, 26]), ({'cycle': 85, 'lost': 13, 'ratios': [[5, 20], [9, 20], [6, 10]], 'min_green': [10, 10, 5]}, [14, 25, 33]), ({'cycle': 65, 'lost': 8, 'ratios': [[9, 10], [6, 20]], 'min_green': [15, 10]}, [43, 14]), ({'cycle': 65, 'lost': 10, 'ratios': [[1, 20], [9, 20]], 'min_green': [20, 35]}, [20, 35]), ({'cycle': 125, 'lost': 10, 'ratios': [[9, 10], [9, 20]], 'min_green': [7, 7]}, [77, 38]), ({'cycle': 115, 'lost': 9, 'ratios': [[3, 20], [3, 20], [3, 20]], 'min_green': [10, 10, 20]}, [36, 35, 35]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 130, 'lost': 9, 'ratios': [[5, 25], [4, 10], [5, 20], [7, 20]], 'min_green': [10, 20, 10, 7]}, [20, 41, 25, 35])], [({'cycle': 65, 'lost': 8, 'ratios': [[2, 20], [2, 20]], 'min_green': [20, 5]}, [29, 28]), ({'cycle': 130, 'lost': 11, 'ratios': [[6, 10], [7, 20], [8, 10]], 'min_green': [5, 10, 7]}, [41, 24, 54]), ({'cycle': 115, 'lost': 14, 'ratios': [[1, 10], [1, 25], [6, 25]], 'min_green': [15, 10, 7]}, [26, 11, 64]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15]), ({'cycle': 75, 'lost': 11, 'ratios': [[2, 20], [2, 20], [2, 20], [2, 20]], 'min_green': [7, 20, 5, 5]}, [16, 20, 14, 14]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 70, 'lost': 16, 'ratios': [[3, 10], [1, 10]], 'min_green': [27, 27]}, [27, 27]), ({'cycle': 115, 'lost': 12, 'ratios': [[3, 20], [2, 10]], 'min_green': [20, 5]}, [44, 59])], [({'cycle': 80, 'lost': 12, 'ratios': [[1, 10], [2, 10], [3, 10]], 'min_green': [20, 20, 28]}, [20, 20, 28]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 100, 'lost': 12, 'ratios': [[1, 10], [1, 10], [1, 10], [1, 10]], 'min_green': [5, 5, 5, 5]}, [22, 22, 22, 22]), ({'cycle': 115, 'lost': 11, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [15, 20, 10]}, [35, 35, 34]), ({'cycle': 100, 'lost': 15, 'ratios': [[4, 25], [7, 10]], 'min_green': [5, 20]}, [16, 69]), ({'cycle': 65, 'lost': 10, 'ratios': [[3, 20], [3, 20], [3, 20]], 'min_green': [5, 15, 7]}, [19, 18, 18]), ({'cycle': 65, 'lost': 15, 'ratios': [[5, 10], [9, 10], [8, 25]], 'min_green': [5, 15, 20]}, [10, 20, 20]), ({'cycle': 95, 'lost': 14, 'ratios': [[1, 10], [2, 25], [4, 20]], 'min_green': [7, 10, 7]}, [21, 17, 43])], [({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 120, 'lost': 15, 'ratios': [[7, 25], [9, 20]], 'min_green': [15, 20]}, [40, 65]), ({'cycle': 115, 'lost': 8, 'ratios': [[9, 10], [1, 25], [2, 10]], 'min_green': [10, 10, 5]}, [78, 10, 19]), ({'cycle': 130, 'lost': 8, 'ratios': [[7, 20], [6, 25]], 'min_green': [5, 20]}, [72, 50]), ({'cycle': 80, 'lost': 10, 'ratios': [[2, 20], [2, 20], [2, 20]], 'min_green': [10, 20, 20]}, [24, 23, 23]), ({'cycle': 80, 'lost': 10, 'ratios': [[2, 10], [2, 10], [2, 10]], 'min_green': [15, 5, 10]}, [24, 23, 23]), ({'cycle': 90, 'lost': 12, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [7, 7, 7]}, [26, 26, 26]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing 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":"c2a77f4ab03998989e906b80eadfc839a16ed2f01191907fdf95c9f685c58e3f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    G = x['cycle'] - x['lost']\n    ys = [Fraction(a, b) for a, b in x['ratios']]\n    mins = x['min_green']\n    if sum(mins) > G:\n        return 'infeasible'\n    Y = sum(ys)\n    ideal = [G * y / Y for y in ys]\n    g = [int(v) for v in ideal]\n    left = G - sum(g)\n    order = sorted(range(len(g)), key=lambda i: (-(ideal[i] - g[i]), i))\n    for i in order[:left]:\n        g[i] += 1\n    for i in range(len(g)):\n        while g[i] < mins[i]:\n            donor = max(range(len(g)), key=lambda j: (g[j] - mins[j], -j))\n            g[donor] -= 1\n            g[i] += 1\n    return g\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'cycle': 80, 'lost': 13, 'ratios': [[2, 20], [9, 25], [7, 10], [3, 20]], 'min_green': [20, 20, 5, 7]}, [20, 20, 19, 8]), ({'cycle': 80, 'lost': 12, 'ratios': [[1, 10], [2, 10], [3, 10]], 'min_green': [20, 20, 28]}, [20, 20, 28]), ({'cycle': 100, 'lost': 12, 'ratios': [[1, 10], [1, 10], [1, 10], [1, 10]], 'min_green': [5, 5, 5, 5]}, [22, 22, 22, 22]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15]), ({'cycle': 85, 'lost': 9, 'ratios': [[6, 20], [1, 20], [6, 25], [9, 10]], 'min_green': [5, 7, 10, 7]}, [15, 7, 12, 42]), ({'cycle': 120, 'lost': 13, 'ratios': [[6, 20], [6, 20]], 'min_green': [20, 15]}, [54, 53]), ({'cycle': 75, 'lost': 10, 'ratios': [[4, 20], [4, 20], [4, 20], [4, 20]], 'min_green': [15, 15, 5, 7]}, [17, 16, 16, 16]), ({'cycle': 80, 'lost': 16, 'ratios': [[2, 20], [7, 10]], 'min_green': [10, 7]}, [10, 54])], [({'cycle': 90, 'lost': 12, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [7, 7, 7]}, [26, 26, 26]), ({'cycle': 85, 'lost': 13, 'ratios': [[5, 20], [9, 20], [6, 10]], 'min_green': [10, 10, 5]}, [14, 25, 33]), ({'cycle': 65, 'lost': 8, 'ratios': [[9, 10], [6, 20]], 'min_green': [15, 10]}, [43, 14]), ({'cycle': 65, 'lost': 10, 'ratios': [[1, 20], [9, 20]], 'min_green': [20, 35]}, [20, 35]), ({'cycle': 125, 'lost': 10, 'ratios': [[9, 10], [9, 20]], 'min_green': [7, 7]}, [77, 38]), ({'cycle': 115, 'lost': 9, 'ratios': [[3, 20], [3, 20], [3, 20]], 'min_green': [10, 10, 20]}, [36, 35, 35]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 130, 'lost': 9, 'ratios': [[5, 25], [4, 10], [5, 20], [7, 20]], 'min_green': [10, 20, 10, 7]}, [20, 41, 25, 35])], [({'cycle': 65, 'lost': 8, 'ratios': [[2, 20], [2, 20]], 'min_green': [20, 5]}, [29, 28]), ({'cycle': 130, 'lost': 11, 'ratios': [[6, 10], [7, 20], [8, 10]], 'min_green': [5, 10, 7]}, [41, 24, 54]), ({'cycle': 115, 'lost': 14, 'ratios': [[1, 10], [1, 25], [6, 25]], 'min_green': [15, 10, 7]}, [26, 11, 64]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15]), ({'cycle': 75, 'lost': 11, 'ratios': [[2, 20], [2, 20], [2, 20], [2, 20]], 'min_green': [7, 20, 5, 5]}, [16, 20, 14, 14]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 70, 'lost': 16, 'ratios': [[3, 10], [1, 10]], 'min_green': [27, 27]}, [27, 27]), ({'cycle': 115, 'lost': 12, 'ratios': [[3, 20], [2, 10]], 'min_green': [20, 5]}, [44, 59])], [({'cycle': 80, 'lost': 12, 'ratios': [[1, 10], [2, 10], [3, 10]], 'min_green': [20, 20, 28]}, [20, 20, 28]), ({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 100, 'lost': 12, 'ratios': [[1, 10], [1, 10], [1, 10], [1, 10]], 'min_green': [5, 5, 5, 5]}, [22, 22, 22, 22]), ({'cycle': 115, 'lost': 11, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [15, 20, 10]}, [35, 35, 34]), ({'cycle': 100, 'lost': 15, 'ratios': [[4, 25], [7, 10]], 'min_green': [5, 20]}, [16, 69]), ({'cycle': 65, 'lost': 10, 'ratios': [[3, 20], [3, 20], [3, 20]], 'min_green': [5, 15, 7]}, [19, 18, 18]), ({'cycle': 65, 'lost': 15, 'ratios': [[5, 10], [9, 10], [8, 25]], 'min_green': [5, 15, 20]}, [10, 20, 20]), ({'cycle': 95, 'lost': 14, 'ratios': [[1, 10], [2, 25], [4, 20]], 'min_green': [7, 10, 7]}, [21, 17, 43])], [({'cycle': 70, 'lost': 16, 'ratios': [[1, 4], [1, 4]], 'min_green': [30, 30]}, 'infeasible'), ({'cycle': 120, 'lost': 15, 'ratios': [[7, 25], [9, 20]], 'min_green': [15, 20]}, [40, 65]), ({'cycle': 115, 'lost': 8, 'ratios': [[9, 10], [1, 25], [2, 10]], 'min_green': [10, 10, 5]}, [78, 10, 19]), ({'cycle': 130, 'lost': 8, 'ratios': [[7, 20], [6, 25]], 'min_green': [5, 20]}, [72, 50]), ({'cycle': 80, 'lost': 10, 'ratios': [[2, 20], [2, 20], [2, 20]], 'min_green': [10, 20, 20]}, [24, 23, 23]), ({'cycle': 80, 'lost': 10, 'ratios': [[2, 10], [2, 10], [2, 10]], 'min_green': [15, 5, 10]}, [24, 23, 23]), ({'cycle': 90, 'lost': 12, 'ratios': [[3, 10], [3, 10], [3, 10]], 'min_green': [7, 7, 7]}, [26, 26, 26]), ({'cycle': 60, 'lost': 10, 'ratios': [[8, 10], [1, 10]], 'min_green': [5, 15]}, [35, 15])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing 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 toy model with a stipulated contract; it makes no claim of conformance to any agency manual or standard. 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":"w2-traffic_signal_timing_plans-green-split-ratio-parse","generated_at":"2026-09-29T14:47:57.045265+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Signal timing arithmetic is exact and integer or rational; a wrong rule silently produces unsafe or inefficient timing plans.","repair":"Restore the flow ratio parsing rule so that the step reads `Fraction(a, b)`.","root_cause":"The [num, den] pair is unpacked in the wrong order, so every phase uses the reciprocal of its flow ratio and light phases get the most green.","sha256":"7ba154dbbfb4a0c7bf8cff3a596774a1b9ba62a9e243a83dd0452ecd02dc0ab3","title":"Green split allocation: critical flow ratios are read as den over num · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.042,"exit_code":1,"observations":[{"actual":[20,21,19,7],"check":"timing oracle 0","expected":[20,20,19,8],"passed":false},{"actual":[20,20,28],"check":"timing oracle 1","expected":[20,20,28],"passed":true},{"actual":[22,22,22,22],"check":"timing oracle 2","expected":[22,22,22,22],"passed":true},{"actual":[35,15],"check":"timing oracle 3","expected":[35,15],"passed":true},{"actual":[15,7,10,44],"check":"timing oracle 4","expected":[15,7,12,42],"passed":false},{"actual":[54,53],"check":"timing oracle 5","expected":[54,53],"passed":true},{"actual":[17,16,16,16],"check":"timing oracle 6","expected":[17,16,16,16],"passed":true},{"actual":[10,54],"check":"timing oracle 7","expected":[10,54],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [20, 21, 19, 7], \"expected\": [20, 20, 19, 8], \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": [20, 20, 28], \"expected\": [20, 20, 28], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [22, 22, 22, 22], \"expected\": [22, 22, 22, 22], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [35, 15], \"expected\": [35, 15], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [15, 7, 10, 44], \"expected\": [15, 7, 12, 42], \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": [54, 53], \"expected\": [54, 53], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [17, 16, 16, 16], \"expected\": [17, 16, 16, 16], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [10, 54], \"expected\": [10, 54], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.981,"exit_code":1,"observations":[{"actual":[27,20,5,15],"check":"timing oracle 0","expected":[20,20,19,8],"passed":false},{"actual":[20,20,28],"check":"timing oracle 1","expected":[20,20,28],"passed":true},{"actual":[22,22,22,22],"check":"timing oracle 2","expected":[22,22,22,22],"passed":true},{"actual":[6,44],"check":"timing oracle 3","expected":[35,15],"passed":false},{"actual":[9,49,11,7],"check":"timing oracle 4","expected":[15,7,12,42],"passed":false},{"actual":[54,53],"check":"timing oracle 5","expected":[54,53],"passed":true},{"actual":[17,16,16,16],"check":"timing oracle 6","expected":[17,16,16,16],"passed":true},{"actual":[56,8],"check":"timing oracle 7","expected":[10,54],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [27, 20, 5, 15], \"expected\": [20, 20, 19, 8], \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": [20, 20, 28], \"expected\": [20, 20, 28], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [22, 22, 22, 22], \"expected\": [22, 22, 22, 22], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [6, 44], \"expected\": [35, 15], \"passed\": false}, {\"check\": \"timing oracle 4\", \"actual\": [9, 49, 11, 7], \"expected\": [15, 7, 12, 42], \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": [54, 53], \"expected\": [54, 53], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [17, 16, 16, 16], \"expected\": [17, 16, 16, 16], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [56, 8], \"expected\": [10, 54], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.402,"exit_code":0,"observations":[{"actual":[20,20,19,8],"check":"timing oracle 0","expected":[20,20,19,8],"passed":true},{"actual":[20,20,28],"check":"timing oracle 1","expected":[20,20,28],"passed":true},{"actual":[22,22,22,22],"check":"timing oracle 2","expected":[22,22,22,22],"passed":true},{"actual":[35,15],"check":"timing oracle 3","expected":[35,15],"passed":true},{"actual":[15,7,12,42],"check":"timing oracle 4","expected":[15,7,12,42],"passed":true},{"actual":[54,53],"check":"timing oracle 5","expected":[54,53],"passed":true},{"actual":[17,16,16,16],"check":"timing oracle 6","expected":[17,16,16,16],"passed":true},{"actual":[10,54],"check":"timing oracle 7","expected":[10,54],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": [20, 20, 19, 8], \"expected\": [20, 20, 19, 8], \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": [20, 20, 28], \"expected\": [20, 20, 28], \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": [22, 22, 22, 22], \"expected\": [22, 22, 22, 22], \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": [35, 15], \"expected\": [35, 15], \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": [15, 7, 12, 42], \"expected\": [15, 7, 12, 42], \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": [54, 53], \"expected\": [54, 53], \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": [17, 16, 16, 16], \"expected\": [17, 16, 16, 16], \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": [10, 54], \"expected\": [10, 54], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}