FAILURE MAP
← Case archive

FA-67961 / Traffic signal timing plans / Open access

Pedestrian walk and clearance timing: a plan that exactly fills its split is reported as not fitting · case 01

Pedestrian walk and clearance timing returns a wrong result when a plan that exactly fills its split is reported as not fitting.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The strict comparison rejects a green plus change interval that exactly equals the split.

VERIFIED REPAIR

Restore the split fit check rule so that the step reads `g + yr <= x['split']`.

Unsuccessful approach: Comparing only the green with the split forgets that yellow and all-red are inside the split.

Case contract

Input {crossing_ft, walk_speed_tenths (ft/s*10), min_walk, yellow_tenths, red_tenths, min_green, ped_call, split}. FDW = ceil(crossing*10/speed). Walk starts at min_walk and is extended so that walk + FDW >= ceil((crossing + 6)/3.0) (pushbutton-to-far-curb check at 3.0 ft/s). FDW may overlap yellow and all-red, so with a ped call the vehicle green is max(min_green, ceil(walk + FDW - (yellow+red))). Without a call green = min_green. fits is green + yellow + red <= split. Return {walk, fdw, green, fits}.

Why this case matters

Signal timing arithmetic is exact and integer or rational; a wrong rule silently produces unsafe or inefficient timing plans.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(x):
    sp = x['walk_speed_tenths']
    fdw = -(-x['crossing_ft'] * 10 // sp)
    walk = x['min_walk']
    total = -(-(x['crossing_ft'] + 6) * 10 // 30)
    if walk + fdw < total:
        walk = total - fdw
    yr = Fraction(x['yellow_tenths'] + x['red_tenths'], 10)
    g = x['min_green']
    if x['ped_call']:
        need = walk + fdw - yr
        g = max(g, math.ceil(need))
    return {'walk': walk, 'fdw': fdw, 'green': g, 'fits': g + yr < x['split']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'crossing_ft': 78, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 28}, {'walk': 5, 'fdw': 23, 'green': 23, 'fits': True}), ({'crossing_ft': 62, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 23}, {'walk': 7, 'fdw': 16, 'green': 18, 'fits': True}), ({'crossing_ft': 85, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 45, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 32}, {'walk': 7, 'fdw': 25, 'green': 27, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 30, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 45, 'red_tenths': 20, 'min_green': 15, 'ped_call': True, 'split': 21}, {'walk': 5, 'fdw': 10, 'green': 15, 'fits': False}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 81, 'walk_speed_tenths': 35, 'min_walk': 5, 'yellow_tenths': 40, 'red_tenths': 15, 'min_green': 8, 'ped_call': False, 'split': 43}, {'walk': 5, 'fdw': 24, 'green': 8, 'fits': True})], [({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 79, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 29}, {'walk': 6, 'fdw': 23, 'green': 24, 'fits': True}), ({'crossing_ft': 47, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 10, 'min_green': 5, 'ped_call': False, 'split': 37}, {'walk': 7, 'fdw': 12, 'green': 5, 'fits': True}), ({'crossing_ft': 78, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 23}, {'walk': 5, 'fdw': 23, 'green': 23, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 84, 'walk_speed_tenths': 30, 'min_walk': 10, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 38}, {'walk': 10, 'fdw': 28, 'green': 33, 'fits': True}), ({'crossing_ft': 44, 'walk_speed_tenths': 40, 'min_walk': 5, 'yellow_tenths': 30, 'red_tenths': 20, 'min_green': 8, 'ped_call': True, 'split': 15}, {'walk': 6, 'fdw': 11, 'green': 12, 'fits': False})], [({'crossing_ft': 103, 'walk_speed_tenths': 35, 'min_walk': 5, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 22}, {'walk': 7, 'fdw': 30, 'green': 33, 'fits': False}), ({'crossing_ft': 105, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 37}, {'walk': 7, 'fdw': 30, 'green': 32, 'fits': True}), ({'crossing_ft': 100, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 34}, {'walk': 7, 'fdw': 29, 'green': 31, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 101, 'walk_speed_tenths': 40, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 36}, {'walk': 10, 'fdw': 26, 'green': 31, 'fits': True}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 100, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 15, 'min_green': 15, 'ped_call': True, 'split': 35}, {'walk': 7, 'fdw': 29, 'green': 32, 'fits': False})], [({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 34, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 15, 'ped_call': True, 'split': 20}, {'walk': 5, 'fdw': 12, 'green': 15, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 45, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 16}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': False}), ({'crossing_ft': 42, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 8, 'ped_call': True, 'split': 19}, {'walk': 5, 'fdw': 14, 'green': 13, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 95, 'walk_speed_tenths': 35, 'min_walk': 10, 'yellow_tenths': 35, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 36}, {'walk': 10, 'fdw': 28, 'green': 34, 'fits': False}), ({'crossing_ft': 91, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 30, 'red_tenths': 20, 'min_green': 15, 'ped_call': False, 'split': 19}, {'walk': 7, 'fdw': 26, 'green': 15, 'fits': False})], [({'crossing_ft': 94, 'walk_speed_tenths': 40, 'min_walk': 4, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 33}, {'walk': 10, 'fdw': 24, 'green': 28, 'fits': False}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 80, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 15, 'ped_call': True, 'split': 31}, {'walk': 7, 'fdw': 23, 'green': 24, 'fits': True}), ({'crossing_ft': 86, 'walk_speed_tenths': 30, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 36}, {'walk': 7, 'fdw': 29, 'green': 32, 'fits': True}), ({'crossing_ft': 55, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 10, 'ped_call': True, 'split': 20}, {'walk': 7, 'fdw': 14, 'green': 15, 'fits': False}), ({'crossing_ft': 33, 'walk_speed_tenths': 35, 'min_walk': 10, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 20}, {'walk': 10, 'fdw': 10, 'green': 14, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check('timing oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
timing oracle 0{'fdw': 23, 'fits': False, 'green': 23, 'walk': 5}{'fdw': 23, 'fits': True, 'green': 23, 'walk': 5}Failed
timing oracle 1{'fdw': 16, 'fits': False, 'green': 18, 'walk': 7}{'fdw': 16, 'fits': True, 'green': 18, 'walk': 7}Failed
timing oracle 2{'fdw': 25, 'fits': False, 'green': 27, 'walk': 7}{'fdw': 25, 'fits': False, 'green': 27, 'walk': 7}Passed
timing oracle 3{'fdw': 26, 'fits': True, 'green': 27, 'walk': 6}{'fdw': 26, 'fits': True, 'green': 27, 'walk': 6}Passed
timing oracle 4{'fdw': 9, 'fits': False, 'green': 8, 'walk': 7}{'fdw': 9, 'fits': True, 'green': 8, 'walk': 7}Failed
timing oracle 5{'fdw': 10, 'fits': False, 'green': 15, 'walk': 5}{'fdw': 10, 'fits': False, 'green': 15, 'walk': 5}Passed
timing oracle 6{'fdw': 20, 'fits': True, 'green': 21, 'walk': 7}{'fdw': 20, 'fits': True, 'green': 21, 'walk': 7}Passed
timing oracle 7{'fdw': 24, 'fits': True, 'green': 8, 'walk': 5}{'fdw': 24, 'fits': True, 'green': 8, 'walk': 5}Passed

SHA-256 / 32a546d1348debe55c8455002fbf47d23659523bacb85ea0300f9113755422c9

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(x):
    sp = x['walk_speed_tenths']
    fdw = -(-x['crossing_ft'] * 10 // sp)
    walk = x['min_walk']
    total = -(-(x['crossing_ft'] + 6) * 10 // 30)
    if walk + fdw < total:
        walk = total - fdw
    yr = Fraction(x['yellow_tenths'] + x['red_tenths'], 10)
    g = x['min_green']
    if x['ped_call']:
        need = walk + fdw - yr
        g = max(g, math.ceil(need))
    return {'walk': walk, 'fdw': fdw, 'green': g, 'fits': g <= x['split']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'crossing_ft': 78, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 28}, {'walk': 5, 'fdw': 23, 'green': 23, 'fits': True}), ({'crossing_ft': 62, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 23}, {'walk': 7, 'fdw': 16, 'green': 18, 'fits': True}), ({'crossing_ft': 85, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 45, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 32}, {'walk': 7, 'fdw': 25, 'green': 27, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 30, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 45, 'red_tenths': 20, 'min_green': 15, 'ped_call': True, 'split': 21}, {'walk': 5, 'fdw': 10, 'green': 15, 'fits': False}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 81, 'walk_speed_tenths': 35, 'min_walk': 5, 'yellow_tenths': 40, 'red_tenths': 15, 'min_green': 8, 'ped_call': False, 'split': 43}, {'walk': 5, 'fdw': 24, 'green': 8, 'fits': True})], [({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 79, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 29}, {'walk': 6, 'fdw': 23, 'green': 24, 'fits': True}), ({'crossing_ft': 47, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 10, 'min_green': 5, 'ped_call': False, 'split': 37}, {'walk': 7, 'fdw': 12, 'green': 5, 'fits': True}), ({'crossing_ft': 78, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 23}, {'walk': 5, 'fdw': 23, 'green': 23, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 84, 'walk_speed_tenths': 30, 'min_walk': 10, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 38}, {'walk': 10, 'fdw': 28, 'green': 33, 'fits': True}), ({'crossing_ft': 44, 'walk_speed_tenths': 40, 'min_walk': 5, 'yellow_tenths': 30, 'red_tenths': 20, 'min_green': 8, 'ped_call': True, 'split': 15}, {'walk': 6, 'fdw': 11, 'green': 12, 'fits': False})], [({'crossing_ft': 103, 'walk_speed_tenths': 35, 'min_walk': 5, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 22}, {'walk': 7, 'fdw': 30, 'green': 33, 'fits': False}), ({'crossing_ft': 105, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 37}, {'walk': 7, 'fdw': 30, 'green': 32, 'fits': True}), ({'crossing_ft': 100, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 34}, {'walk': 7, 'fdw': 29, 'green': 31, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 101, 'walk_speed_tenths': 40, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 36}, {'walk': 10, 'fdw': 26, 'green': 31, 'fits': True}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 100, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 15, 'min_green': 15, 'ped_call': True, 'split': 35}, {'walk': 7, 'fdw': 29, 'green': 32, 'fits': False})], [({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 34, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 15, 'ped_call': True, 'split': 20}, {'walk': 5, 'fdw': 12, 'green': 15, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 45, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 16}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': False}), ({'crossing_ft': 42, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 8, 'ped_call': True, 'split': 19}, {'walk': 5, 'fdw': 14, 'green': 13, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 95, 'walk_speed_tenths': 35, 'min_walk': 10, 'yellow_tenths': 35, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 36}, {'walk': 10, 'fdw': 28, 'green': 34, 'fits': False}), ({'crossing_ft': 91, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 30, 'red_tenths': 20, 'min_green': 15, 'ped_call': False, 'split': 19}, {'walk': 7, 'fdw': 26, 'green': 15, 'fits': False})], [({'crossing_ft': 94, 'walk_speed_tenths': 40, 'min_walk': 4, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 33}, {'walk': 10, 'fdw': 24, 'green': 28, 'fits': False}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 80, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 15, 'ped_call': True, 'split': 31}, {'walk': 7, 'fdw': 23, 'green': 24, 'fits': True}), ({'crossing_ft': 86, 'walk_speed_tenths': 30, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 36}, {'walk': 7, 'fdw': 29, 'green': 32, 'fits': True}), ({'crossing_ft': 55, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 10, 'ped_call': True, 'split': 20}, {'walk': 7, 'fdw': 14, 'green': 15, 'fits': False}), ({'crossing_ft': 33, 'walk_speed_tenths': 35, 'min_walk': 10, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 20}, {'walk': 10, 'fdw': 10, 'green': 14, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check('timing oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
timing oracle 0{'fdw': 23, 'fits': True, 'green': 23, 'walk': 5}{'fdw': 23, 'fits': True, 'green': 23, 'walk': 5}Passed
timing oracle 1{'fdw': 16, 'fits': True, 'green': 18, 'walk': 7}{'fdw': 16, 'fits': True, 'green': 18, 'walk': 7}Passed
timing oracle 2{'fdw': 25, 'fits': True, 'green': 27, 'walk': 7}{'fdw': 25, 'fits': False, 'green': 27, 'walk': 7}Failed
timing oracle 3{'fdw': 26, 'fits': True, 'green': 27, 'walk': 6}{'fdw': 26, 'fits': True, 'green': 27, 'walk': 6}Passed
timing oracle 4{'fdw': 9, 'fits': True, 'green': 8, 'walk': 7}{'fdw': 9, 'fits': True, 'green': 8, 'walk': 7}Passed
timing oracle 5{'fdw': 10, 'fits': True, 'green': 15, 'walk': 5}{'fdw': 10, 'fits': False, 'green': 15, 'walk': 5}Failed
timing oracle 6{'fdw': 20, 'fits': True, 'green': 21, 'walk': 7}{'fdw': 20, 'fits': True, 'green': 21, 'walk': 7}Passed
timing oracle 7{'fdw': 24, 'fits': True, 'green': 8, 'walk': 5}{'fdw': 24, 'fits': True, 'green': 8, 'walk': 5}Passed

SHA-256 / 01b1ac8f08a83f9b4dee5e4647ca5ebb705ea86305bf8d2537e4650339783035

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(x):
    sp = x['walk_speed_tenths']
    fdw = -(-x['crossing_ft'] * 10 // sp)
    walk = x['min_walk']
    total = -(-(x['crossing_ft'] + 6) * 10 // 30)
    if walk + fdw < total:
        walk = total - fdw
    yr = Fraction(x['yellow_tenths'] + x['red_tenths'], 10)
    g = x['min_green']
    if x['ped_call']:
        need = walk + fdw - yr
        g = max(g, math.ceil(need))
    return {'walk': walk, 'fdw': fdw, 'green': g, 'fits': g + yr <= x['split']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'crossing_ft': 78, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 28}, {'walk': 5, 'fdw': 23, 'green': 23, 'fits': True}), ({'crossing_ft': 62, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 23}, {'walk': 7, 'fdw': 16, 'green': 18, 'fits': True}), ({'crossing_ft': 85, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 45, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 32}, {'walk': 7, 'fdw': 25, 'green': 27, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 30, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 45, 'red_tenths': 20, 'min_green': 15, 'ped_call': True, 'split': 21}, {'walk': 5, 'fdw': 10, 'green': 15, 'fits': False}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 81, 'walk_speed_tenths': 35, 'min_walk': 5, 'yellow_tenths': 40, 'red_tenths': 15, 'min_green': 8, 'ped_call': False, 'split': 43}, {'walk': 5, 'fdw': 24, 'green': 8, 'fits': True})], [({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 79, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 29}, {'walk': 6, 'fdw': 23, 'green': 24, 'fits': True}), ({'crossing_ft': 47, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 10, 'min_green': 5, 'ped_call': False, 'split': 37}, {'walk': 7, 'fdw': 12, 'green': 5, 'fits': True}), ({'crossing_ft': 78, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 23}, {'walk': 5, 'fdw': 23, 'green': 23, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 84, 'walk_speed_tenths': 30, 'min_walk': 10, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 38}, {'walk': 10, 'fdw': 28, 'green': 33, 'fits': True}), ({'crossing_ft': 44, 'walk_speed_tenths': 40, 'min_walk': 5, 'yellow_tenths': 30, 'red_tenths': 20, 'min_green': 8, 'ped_call': True, 'split': 15}, {'walk': 6, 'fdw': 11, 'green': 12, 'fits': False})], [({'crossing_ft': 103, 'walk_speed_tenths': 35, 'min_walk': 5, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 22}, {'walk': 7, 'fdw': 30, 'green': 33, 'fits': False}), ({'crossing_ft': 105, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 37}, {'walk': 7, 'fdw': 30, 'green': 32, 'fits': True}), ({'crossing_ft': 100, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 34}, {'walk': 7, 'fdw': 29, 'green': 31, 'fits': False}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 101, 'walk_speed_tenths': 40, 'min_walk': 4, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 36}, {'walk': 10, 'fdw': 26, 'green': 31, 'fits': True}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 100, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 15, 'min_green': 15, 'ped_call': True, 'split': 35}, {'walk': 7, 'fdw': 29, 'green': 32, 'fits': False})], [({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 34, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 40, 'red_tenths': 10, 'min_green': 15, 'ped_call': True, 'split': 20}, {'walk': 5, 'fdw': 12, 'green': 15, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 45, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 16}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': False}), ({'crossing_ft': 42, 'walk_speed_tenths': 30, 'min_walk': 5, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 8, 'ped_call': True, 'split': 19}, {'walk': 5, 'fdw': 14, 'green': 13, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True}), ({'crossing_ft': 95, 'walk_speed_tenths': 35, 'min_walk': 10, 'yellow_tenths': 35, 'red_tenths': 10, 'min_green': 8, 'ped_call': True, 'split': 36}, {'walk': 10, 'fdw': 28, 'green': 34, 'fits': False}), ({'crossing_ft': 91, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 30, 'red_tenths': 20, 'min_green': 15, 'ped_call': False, 'split': 19}, {'walk': 7, 'fdw': 26, 'green': 15, 'fits': False})], [({'crossing_ft': 94, 'walk_speed_tenths': 40, 'min_walk': 4, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 5, 'ped_call': True, 'split': 33}, {'walk': 10, 'fdw': 24, 'green': 28, 'fits': False}), ({'crossing_ft': 70, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 5, 'ped_call': True, 'split': 30}, {'walk': 7, 'fdw': 20, 'green': 21, 'fits': True}), ({'crossing_ft': 36, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 8, 'ped_call': False, 'split': 12}, {'walk': 7, 'fdw': 9, 'green': 8, 'fits': True}), ({'crossing_ft': 80, 'walk_speed_tenths': 35, 'min_walk': 7, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 15, 'ped_call': True, 'split': 31}, {'walk': 7, 'fdw': 23, 'green': 24, 'fits': True}), ({'crossing_ft': 86, 'walk_speed_tenths': 30, 'min_walk': 7, 'yellow_tenths': 30, 'red_tenths': 10, 'min_green': 10, 'ped_call': True, 'split': 36}, {'walk': 7, 'fdw': 29, 'green': 32, 'fits': True}), ({'crossing_ft': 55, 'walk_speed_tenths': 40, 'min_walk': 7, 'yellow_tenths': 40, 'red_tenths': 20, 'min_green': 10, 'ped_call': True, 'split': 20}, {'walk': 7, 'fdw': 14, 'green': 15, 'fits': False}), ({'crossing_ft': 33, 'walk_speed_tenths': 35, 'min_walk': 10, 'yellow_tenths': 45, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 20}, {'walk': 10, 'fdw': 10, 'green': 14, 'fits': True}), ({'crossing_ft': 90, 'walk_speed_tenths': 35, 'min_walk': 4, 'yellow_tenths': 35, 'red_tenths': 15, 'min_green': 10, 'ped_call': True, 'split': 35}, {'walk': 6, 'fdw': 26, 'green': 27, 'fits': True})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check('timing oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
timing oracle 0{'fdw': 23, 'fits': True, 'green': 23, 'walk': 5}{'fdw': 23, 'fits': True, 'green': 23, 'walk': 5}Passed
timing oracle 1{'fdw': 16, 'fits': True, 'green': 18, 'walk': 7}{'fdw': 16, 'fits': True, 'green': 18, 'walk': 7}Passed
timing oracle 2{'fdw': 25, 'fits': False, 'green': 27, 'walk': 7}{'fdw': 25, 'fits': False, 'green': 27, 'walk': 7}Passed
timing oracle 3{'fdw': 26, 'fits': True, 'green': 27, 'walk': 6}{'fdw': 26, 'fits': True, 'green': 27, 'walk': 6}Passed
timing oracle 4{'fdw': 9, 'fits': True, 'green': 8, 'walk': 7}{'fdw': 9, 'fits': True, 'green': 8, 'walk': 7}Passed
timing oracle 5{'fdw': 10, 'fits': False, 'green': 15, 'walk': 5}{'fdw': 10, 'fits': False, 'green': 15, 'walk': 5}Passed
timing oracle 6{'fdw': 20, 'fits': True, 'green': 21, 'walk': 7}{'fdw': 20, 'fits': True, 'green': 21, 'walk': 7}Passed
timing oracle 7{'fdw': 24, 'fits': True, 'green': 8, 'walk': 5}{'fdw': 24, 'fits': True, 'green': 8, 'walk': 5}Passed

SHA-256 / d4ad0e2128c2b06baec208bd51ee2d6039c5b03d174c54655f2efe6a9a34e144

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:47:57.805266+00:00.

Case digest / d2042536d58c812a46cb59194b91b1d6089a7541e543de51db88f0f1ad754223