{"abstract":"Webster cycle length returns a wrong result when the oversaturation guard only trips above Y = 1.","category":"Traffic signal timing plans","checks":8,"contract":"Input {phases: per-phase lists of lane-group flows veh/h, sat: saturation flow per lane group, lost: lost seconds per phase, allred: extra all-red seconds per cycle, cmin, cmax}. Y is the sum over phases of the critical (largest) flow ratio; L = lost*phases + allred. If Y >= 0.9 return 'oversaturated'. Otherwise C0 = (1.5L + 5)/(1 - Y), rounded UP to a multiple of 5 s and clamped to [cmin, cmax]. Return {cycle, lost: L, y_milli: floor(1000Y)}.","evaluation_group":"w2-traffic_signal_timing_plans-webster-cycle","failed_approach":"A strict comparison misses the stipulated inclusive threshold at exactly Y = 0.9.","family":"w2-traffic_signal_timing_plans-webster-cycle-saturation-guard","id":"FA-67861","implementations":{"attempt":{"sha256":"4f8ef5ec37eb443b792a66c081b466c4fda20ccf1e7f60b32e168aff16451de4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ph = x['phases']\n    s = x['sat']\n    Y = Fraction(0)\n    for group in ph:\n        Y += Fraction(max(group), s)\n    L = x['lost'] * len(ph) + x['allred']\n    if Y > Fraction(9, 10):\n        return 'oversaturated'\n    c0 = (Fraction(3, 2) * L + 5) / (1 - Y)\n    c = -(-c0 // 5) * 5\n    c = max(x['cmin'], min(x['cmax'], int(c)))\n    return {'cycle': c, 'lost': L, 'y_milli': int(Y * 1000)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90, 630], [450, 600], [180, 540]], 'sat': 1800, 'lost': 4, 'allred': 1, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[540, 450, 480], [390, 540]], 'sat': 1800, 'lost': 3, 'allred': 3, 'cmin': 40, 'cmax': 90}, {'cycle': 50, 'lost': 9, 'y_milli': 600}), ({'phases': [[150], [240, 510], [900], [690]], 'sat': 1800, 'lost': 3, 'allred': 4, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[330, 720, 390], [690, 840], [390], [750]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[690], [570]], 'sat': 1900, 'lost': 5, 'allred': 1, 'cmin': 60, 'cmax': 150}, {'cycle': 65, 'lost': 11, 'y_milli': 663})], [({'phases': [[600], [780, 750], [900, 720, 150]], 'sat': 1800, 'lost': 2, 'allred': 1, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[450, 720, 750], [630, 270], [210], [210]], 'sat': 1900, 'lost': 4, 'allred': 4, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[540, 210, 210], [780], [240], [330]], 'sat': 1900, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[570], [600, 210, 660], [210, 780, 240]], 'sat': 1900, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[90, 480], [420, 630]], 'sat': 1900, 'lost': 2, 'allred': 6, 'cmin': 60, 'cmax': 150}, {'cycle': 60, 'lost': 10, 'y_milli': 584})], [({'phases': [[900, 420, 210], [180, 150, 840], [780]], 'sat': 2000, 'lost': 2, 'allred': 0, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[900], [360, 450, 810]], 'sat': 1900, 'lost': 3, 'allred': 3, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[270], [750, 720, 330]], 'sat': 2000, 'lost': 3, 'allred': 4, 'cmin': 40, 'cmax': 120}, {'cycle': 45, 'lost': 10, 'y_milli': 510}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[750], [600], [150, 60, 60], [420]], 'sat': 2000, 'lost': 3, 'allred': 3, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[180, 780], [90, 900, 420]], 'sat': 1800, 'lost': 3, 'allred': 2, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[90, 900, 810], [750, 540]], 'sat': 2000, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 150}, {'cycle': 115, 'lost': 10, 'y_milli': 825}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 510], [300, 750]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 90}, {'cycle': 90, 'lost': 12, 'y_milli': 816}), ({'phases': [[360], [630, 750], [750]], 'sat': 2000, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 90}, 'oversaturated'), ({'phases': [[360], [360, 510, 630], [570, 840], [840]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[300], [630]], 'sat': 1800, 'lost': 4, 'allred': 3, 'cmin': 40, 'cmax': 120}, {'cycle': 45, 'lost': 11, 'y_milli': 516}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated')], [({'phases': [[330, 840, 90], [60, 180], [720]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[690, 420], [150]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 60, 'cmax': 150}, {'cycle': 60, 'lost': 14, 'y_milli': 466}), ({'phases': [[450, 120, 480], [600], [630, 90, 780], [900, 720, 510]], 'sat': 1800, 'lost': 2, 'allred': 4, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[840, 840], [900, 90, 180], [570], [330, 270]], 'sat': 2000, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 150}, 'oversaturated'), ({'phases': [[150, 420], [690, 180, 180], [570, 390]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 180, 'lost': 15, 'y_milli': 884}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150})]]\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":"2ccf5155a1374a151434732471325e85e3ee406a3350d6e53a2f6ad8aea736a6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ph = x['phases']\n    s = x['sat']\n    Y = Fraction(0)\n    for group in ph:\n        Y += Fraction(max(group), s)\n    L = x['lost'] * len(ph) + x['allred']\n    if Y > 1:\n        return 'oversaturated'\n    c0 = (Fraction(3, 2) * L + 5) / (1 - Y)\n    c = -(-c0 // 5) * 5\n    c = max(x['cmin'], min(x['cmax'], int(c)))\n    return {'cycle': c, 'lost': L, 'y_milli': int(Y * 1000)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90, 630], [450, 600], [180, 540]], 'sat': 1800, 'lost': 4, 'allred': 1, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[540, 450, 480], [390, 540]], 'sat': 1800, 'lost': 3, 'allred': 3, 'cmin': 40, 'cmax': 90}, {'cycle': 50, 'lost': 9, 'y_milli': 600}), ({'phases': [[150], [240, 510], [900], [690]], 'sat': 1800, 'lost': 3, 'allred': 4, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[330, 720, 390], [690, 840], [390], [750]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[690], [570]], 'sat': 1900, 'lost': 5, 'allred': 1, 'cmin': 60, 'cmax': 150}, {'cycle': 65, 'lost': 11, 'y_milli': 663})], [({'phases': [[600], [780, 750], [900, 720, 150]], 'sat': 1800, 'lost': 2, 'allred': 1, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[450, 720, 750], [630, 270], [210], [210]], 'sat': 1900, 'lost': 4, 'allred': 4, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[540, 210, 210], [780], [240], [330]], 'sat': 1900, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[570], [600, 210, 660], [210, 780, 240]], 'sat': 1900, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[90, 480], [420, 630]], 'sat': 1900, 'lost': 2, 'allred': 6, 'cmin': 60, 'cmax': 150}, {'cycle': 60, 'lost': 10, 'y_milli': 584})], [({'phases': [[900, 420, 210], [180, 150, 840], [780]], 'sat': 2000, 'lost': 2, 'allred': 0, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[900], [360, 450, 810]], 'sat': 1900, 'lost': 3, 'allred': 3, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[270], [750, 720, 330]], 'sat': 2000, 'lost': 3, 'allred': 4, 'cmin': 40, 'cmax': 120}, {'cycle': 45, 'lost': 10, 'y_milli': 510}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[750], [600], [150, 60, 60], [420]], 'sat': 2000, 'lost': 3, 'allred': 3, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[180, 780], [90, 900, 420]], 'sat': 1800, 'lost': 3, 'allred': 2, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[90, 900, 810], [750, 540]], 'sat': 2000, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 150}, {'cycle': 115, 'lost': 10, 'y_milli': 825}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 510], [300, 750]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 90}, {'cycle': 90, 'lost': 12, 'y_milli': 816}), ({'phases': [[360], [630, 750], [750]], 'sat': 2000, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 90}, 'oversaturated'), ({'phases': [[360], [360, 510, 630], [570, 840], [840]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[300], [630]], 'sat': 1800, 'lost': 4, 'allred': 3, 'cmin': 40, 'cmax': 120}, {'cycle': 45, 'lost': 11, 'y_milli': 516}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated')], [({'phases': [[330, 840, 90], [60, 180], [720]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[690, 420], [150]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 60, 'cmax': 150}, {'cycle': 60, 'lost': 14, 'y_milli': 466}), ({'phases': [[450, 120, 480], [600], [630, 90, 780], [900, 720, 510]], 'sat': 1800, 'lost': 2, 'allred': 4, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[840, 840], [900, 90, 180], [570], [330, 270]], 'sat': 2000, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 150}, 'oversaturated'), ({'phases': [[150, 420], [690, 180, 180], [570, 390]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 180, 'lost': 15, 'y_milli': 884}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150})]]\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":"4e509fe004dab1cff1cdf07e11558ee7cc2767c9cf1fdabd511c0044843cae04","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ph = x['phases']\n    s = x['sat']\n    Y = Fraction(0)\n    for group in ph:\n        Y += Fraction(max(group), s)\n    L = x['lost'] * len(ph) + x['allred']\n    if Y >= Fraction(9, 10):\n        return 'oversaturated'\n    c0 = (Fraction(3, 2) * L + 5) / (1 - Y)\n    c = -(-c0 // 5) * 5\n    c = max(x['cmin'], min(x['cmax'], int(c)))\n    return {'cycle': c, 'lost': L, 'y_milli': int(Y * 1000)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90, 630], [450, 600], [180, 540]], 'sat': 1800, 'lost': 4, 'allred': 1, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[540, 450, 480], [390, 540]], 'sat': 1800, 'lost': 3, 'allred': 3, 'cmin': 40, 'cmax': 90}, {'cycle': 50, 'lost': 9, 'y_milli': 600}), ({'phases': [[150], [240, 510], [900], [690]], 'sat': 1800, 'lost': 3, 'allred': 4, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[330, 720, 390], [690, 840], [390], [750]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[690], [570]], 'sat': 1900, 'lost': 5, 'allred': 1, 'cmin': 60, 'cmax': 150}, {'cycle': 65, 'lost': 11, 'y_milli': 663})], [({'phases': [[600], [780, 750], [900, 720, 150]], 'sat': 1800, 'lost': 2, 'allred': 1, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[450, 720, 750], [630, 270], [210], [210]], 'sat': 1900, 'lost': 4, 'allred': 4, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[540, 210, 210], [780], [240], [330]], 'sat': 1900, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[570], [600, 210, 660], [210, 780, 240]], 'sat': 1900, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[90, 480], [420, 630]], 'sat': 1900, 'lost': 2, 'allred': 6, 'cmin': 60, 'cmax': 150}, {'cycle': 60, 'lost': 10, 'y_milli': 584})], [({'phases': [[900, 420, 210], [180, 150, 840], [780]], 'sat': 2000, 'lost': 2, 'allred': 0, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[900], [360, 450, 810]], 'sat': 1900, 'lost': 3, 'allred': 3, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[270], [750, 720, 330]], 'sat': 2000, 'lost': 3, 'allred': 4, 'cmin': 40, 'cmax': 120}, {'cycle': 45, 'lost': 10, 'y_milli': 510}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[750], [600], [150, 60, 60], [420]], 'sat': 2000, 'lost': 3, 'allred': 3, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[180, 780], [90, 900, 420]], 'sat': 1800, 'lost': 3, 'allred': 2, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[90, 900, 810], [750, 540]], 'sat': 2000, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 150}, {'cycle': 115, 'lost': 10, 'y_milli': 825}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 510], [300, 750]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 90}, {'cycle': 90, 'lost': 12, 'y_milli': 816}), ({'phases': [[360], [630, 750], [750]], 'sat': 2000, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 90}, 'oversaturated'), ({'phases': [[360], [360, 510, 630], [570, 840], [840]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[300], [630]], 'sat': 1800, 'lost': 4, 'allred': 3, 'cmin': 40, 'cmax': 120}, {'cycle': 45, 'lost': 11, 'y_milli': 516}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated')], [({'phases': [[330, 840, 90], [60, 180], [720]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[690, 420], [150]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 60, 'cmax': 150}, {'cycle': 60, 'lost': 14, 'y_milli': 466}), ({'phases': [[450, 120, 480], [600], [630, 90, 780], [900, 720, 510]], 'sat': 1800, 'lost': 2, 'allred': 4, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[840, 840], [900, 90, 180], [570], [330, 270]], 'sat': 2000, 'lost': 2, 'allred': 2, 'cmin': 50, 'cmax': 150}, 'oversaturated'), ({'phases': [[150, 420], [690, 180, 180], [570, 390]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 180, 'lost': 15, 'y_milli': 884}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150})]]\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-webster-cycle-saturation-guard","generated_at":"2026-09-29T14:47:56.834364+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 oversaturation guard rule so that the step reads `if Y >= Fraction(9, 10):`.","root_cause":"The guard uses the physical limit Y > 1, so plans with 0.9 <= Y <= 1 get absurdly long cycles instead of the oversaturated verdict.","sha256":"07bfd45e4dd6ed93760fbc93292be1c2063cd15c5d4bb124c957a1c1ff6c499d","title":"Webster cycle length: the oversaturation guard only trips above Y = 1 · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.101,"exit_code":1,"observations":[{"actual":{"cycle":170,"lost":8,"y_milli":900},"check":"timing oracle 0","expected":"oversaturated","passed":false},{"actual":"oversaturated","check":"timing oracle 1","expected":"oversaturated","passed":true},{"actual":{"cycle":50,"lost":9,"y_milli":600},"check":"timing oracle 2","expected":{"cycle":50,"lost":9,"y_milli":600},"passed":true},{"actual":"oversaturated","check":"timing oracle 3","expected":"oversaturated","passed":true},{"actual":{"cycle":150,"lost":12,"y_milli":900},"check":"timing oracle 4","expected":"oversaturated","passed":false},{"actual":{"cycle":50,"lost":10,"y_milli":583},"check":"timing oracle 5","expected":{"cycle":50,"lost":10,"y_milli":583},"passed":true},{"actual":"oversaturated","check":"timing oracle 6","expected":"oversaturated","passed":true},{"actual":{"cycle":65,"lost":11,"y_milli":663},"check":"timing oracle 7","expected":{"cycle":65,"lost":11,"y_milli":663},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 170, \"lost\": 8, \"y_milli\": 900}, \"expected\": \"oversaturated\", \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 600}, \"expected\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 600}, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 150, \"lost\": 12, \"y_milli\": 900}, \"expected\": \"oversaturated\", \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"expected\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": {\"cycle\": 65, \"lost\": 11, \"y_milli\": 663}, \"expected\": {\"cycle\": 65, \"lost\": 11, \"y_milli\": 663}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.034,"exit_code":1,"observations":[{"actual":{"cycle":170,"lost":8,"y_milli":900},"check":"timing oracle 0","expected":"oversaturated","passed":false},{"actual":{"cycle":120,"lost":13,"y_milli":983},"check":"timing oracle 1","expected":"oversaturated","passed":false},{"actual":{"cycle":50,"lost":9,"y_milli":600},"check":"timing oracle 2","expected":{"cycle":50,"lost":9,"y_milli":600},"passed":true},{"actual":"oversaturated","check":"timing oracle 3","expected":"oversaturated","passed":true},{"actual":{"cycle":150,"lost":12,"y_milli":900},"check":"timing oracle 4","expected":"oversaturated","passed":false},{"actual":{"cycle":50,"lost":10,"y_milli":583},"check":"timing oracle 5","expected":{"cycle":50,"lost":10,"y_milli":583},"passed":true},{"actual":"oversaturated","check":"timing oracle 6","expected":"oversaturated","passed":true},{"actual":{"cycle":65,"lost":11,"y_milli":663},"check":"timing oracle 7","expected":{"cycle":65,"lost":11,"y_milli":663},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 170, \"lost\": 8, \"y_milli\": 900}, \"expected\": \"oversaturated\", \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 120, \"lost\": 13, \"y_milli\": 983}, \"expected\": \"oversaturated\", \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 600}, \"expected\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 600}, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 150, \"lost\": 12, \"y_milli\": 900}, \"expected\": \"oversaturated\", \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"expected\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": {\"cycle\": 65, \"lost\": 11, \"y_milli\": 663}, \"expected\": {\"cycle\": 65, \"lost\": 11, \"y_milli\": 663}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.341,"exit_code":0,"observations":[{"actual":"oversaturated","check":"timing oracle 0","expected":"oversaturated","passed":true},{"actual":"oversaturated","check":"timing oracle 1","expected":"oversaturated","passed":true},{"actual":{"cycle":50,"lost":9,"y_milli":600},"check":"timing oracle 2","expected":{"cycle":50,"lost":9,"y_milli":600},"passed":true},{"actual":"oversaturated","check":"timing oracle 3","expected":"oversaturated","passed":true},{"actual":"oversaturated","check":"timing oracle 4","expected":"oversaturated","passed":true},{"actual":{"cycle":50,"lost":10,"y_milli":583},"check":"timing oracle 5","expected":{"cycle":50,"lost":10,"y_milli":583},"passed":true},{"actual":"oversaturated","check":"timing oracle 6","expected":"oversaturated","passed":true},{"actual":{"cycle":65,"lost":11,"y_milli":663},"check":"timing oracle 7","expected":{"cycle":65,"lost":11,"y_milli":663},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 600}, \"expected\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 600}, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"expected\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": {\"cycle\": 65, \"lost\": 11, \"y_milli\": 663}, \"expected\": {\"cycle\": 65, \"lost\": 11, \"y_milli\": 663}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}