FA-68196 / Traffic signal timing plans / Open access
Transit signal priority decision: arrival times beyond one cycle are clamped instead of wrapped · case 01
Transit signal priority decision returns a wrong result when arrival times beyond one cycle are clamped instead of wrapped.
ROOT CAUSE
The absolute arrival second is compared with in-cycle green times, so buses in later cycles never match the green window.
VERIFIED REPAIR
Restore the arrival cycle time rule so that the step reads `a = x['arrival'] % C`.
Unsuccessful approach: Clamping to the last second of the cycle maps every later arrival to the same cycle time.
Case contract
Input {cycle, green_start, green_end (exclusive), max_ext, max_early, arrival (seconds, reduced modulo cycle), last_granted (cycle index or null), cycle_index, lockout}. A request within lockout cycles of the last grant (difference <= lockout) returns ['locked', 0]. Arrival in green needs nothing. If the arrival is less than max_ext seconds after green end (cyclically) green is extended through the arrival second: ['extend', d+1]. Otherwise green starts early by min(max_early, seconds until next green start).
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
N = 1
observations = []
def solve(x):
C = x['cycle']
a = x['arrival']
last = x['last_granted']
if last is not None and x['cycle_index'] - last <= x['lockout']:
return ['locked', 0]
gs, ge = x['green_start'], x['green_end']
if gs <= a < ge:
return ['none', 0]
d = (a - ge) % C
if d < x['max_ext']:
return ['extend', d + 1]
wait = (gs - a) % C
return ['early', min(x['max_early'], wait)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 120, 'green_start': 33, 'green_end': 56, 'max_ext': 8, 'max_early': 18, 'arrival': 319, 'last_granted': 8, 'cycle_index': 18, 'lockout': 3}, ['early', 18]), ({'cycle': 80, 'green_start': 26, 'green_end': 41, 'max_ext': 5, 'max_early': 11, 'arrival': 119, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['none', 0]), ({'cycle': 130, 'green_start': 17, 'green_end': 37, 'max_ext': 10, 'max_early': 17, 'arrival': 194, 'last_granted': 5, 'cycle_index': 10, 'lockout': 1}, ['early', 17]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 80, 'green_start': 10, 'green_end': 43, 'max_ext': 8, 'max_early': 17, 'arrival': 121, 'last_granted': 9, 'cycle_index': 22, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 100, 'green_start': 30, 'green_end': 74, 'max_ext': 6, 'max_early': 18, 'arrival': 212, 'last_granted': None, 'cycle_index': 2, 'lockout': 1}, ['early', 18])], [({'cycle': 90, 'green_start': 13, 'green_end': 37, 'max_ext': 13, 'max_early': 7, 'arrival': 98, 'last_granted': None, 'cycle_index': 20, 'lockout': 3}, ['early', 5]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 42, 'green_end': 79, 'max_ext': 20, 'max_early': 5, 'arrival': 49, 'last_granted': None, 'cycle_index': 21, 'lockout': 3}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 90, 'green_start': 5, 'green_end': 41, 'max_ext': 17, 'max_early': 17, 'arrival': 217, 'last_granted': None, 'cycle_index': 8, 'lockout': 3}, ['none', 0]), ({'cycle': 80, 'green_start': 22, 'green_end': 55, 'max_ext': 8, 'max_early': 9, 'arrival': 17, 'last_granted': None, 'cycle_index': 22, 'lockout': 3}, ['early', 5]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 90, 'green_start': 30, 'green_end': 69, 'max_ext': 17, 'max_early': 7, 'arrival': 146, 'last_granted': 7, 'cycle_index': 12, 'lockout': 2}, ['none', 0])], [({'cycle': 120, 'green_start': 38, 'green_end': 79, 'max_ext': 11, 'max_early': 8, 'arrival': 227, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['early', 8]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 80, 'green_start': 6, 'green_end': 32, 'max_ext': 9, 'max_early': 14, 'arrival': 35, 'last_granted': None, 'cycle_index': 15, 'lockout': 2}, ['extend', 4]), ({'cycle': 80, 'green_start': 18, 'green_end': 36, 'max_ext': 15, 'max_early': 11, 'arrival': 98, 'last_granted': 1, 'cycle_index': 3, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 80, 'green_start': 21, 'green_end': 52, 'max_ext': 17, 'max_early': 8, 'arrival': 75, 'last_granted': None, 'cycle_index': 22, 'lockout': 1}, ['early', 8]), ({'cycle': 120, 'green_start': 60, 'green_end': 90, 'max_ext': 7, 'max_early': 12, 'arrival': 323, 'last_granted': 4, 'cycle_index': 20, 'lockout': 3}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1])], [({'cycle': 100, 'green_start': 36, 'green_end': 76, 'max_ext': 14, 'max_early': 6, 'arrival': 237, 'last_granted': None, 'cycle_index': 5, 'lockout': 3}, ['none', 0]), ({'cycle': 130, 'green_start': 61, 'green_end': 107, 'max_ext': 6, 'max_early': 17, 'arrival': 254, 'last_granted': None, 'cycle_index': 20, 'lockout': 1}, ['early', 17]), ({'cycle': 120, 'green_start': 17, 'green_end': 34, 'max_ext': 18, 'max_early': 18, 'arrival': 14, 'last_granted': None, 'cycle_index': 19, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 110, 'green_start': 12, 'green_end': 40, 'max_ext': 5, 'max_early': 14, 'arrival': 128, 'last_granted': None, 'cycle_index': 12, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 140, 'green_start': 63, 'green_end': 107, 'max_ext': 8, 'max_early': 20, 'arrival': 247, 'last_granted': None, 'cycle_index': 11, 'lockout': 1}, ['extend', 1])], [({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 29, 'green_end': 67, 'max_ext': 16, 'max_early': 15, 'arrival': 158, 'last_granted': None, 'cycle_index': 9, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 100, 'green_start': 25, 'green_end': 65, 'max_ext': 12, 'max_early': 20, 'arrival': 265, 'last_granted': 9, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 16, 'green_end': 46, 'max_ext': 14, 'max_early': 12, 'arrival': 63, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['early', 12]), ({'cycle': 120, 'green_start': 1, 'green_end': 42, 'max_ext': 6, 'max_early': 11, 'arrival': 270, 'last_granted': None, 'cycle_index': 7, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 37, 'green_end': 82, 'max_ext': 20, 'max_early': 5, 'arrival': 167, 'last_granted': None, 'cycle_index': 3, 'lockout': 2}, ['none', 0])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| timing oracle 0 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 1 | ['early', 18] | ['early', 18] | Passed |
| timing oracle 2 | ['early', 11] | ['none', 0] | Failed |
| timing oracle 3 | ['early', 17] | ['early', 17] | Passed |
| timing oracle 4 | ['early', 0] | ['none', 0] | Failed |
| timing oracle 5 | ['early', 17] | ['none', 0] | Failed |
| timing oracle 6 | ['early', 2] | ['early', 2] | Passed |
| timing oracle 7 | ['early', 18] | ['early', 18] | Passed |
SHA-256 / 83d78fbe222af01afda3f07bff539661617e4877a749728fc0cfce27779242f6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
C = x['cycle']
a = min(x['arrival'], C - 1)
last = x['last_granted']
if last is not None and x['cycle_index'] - last <= x['lockout']:
return ['locked', 0]
gs, ge = x['green_start'], x['green_end']
if gs <= a < ge:
return ['none', 0]
d = (a - ge) % C
if d < x['max_ext']:
return ['extend', d + 1]
wait = (gs - a) % C
return ['early', min(x['max_early'], wait)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 120, 'green_start': 33, 'green_end': 56, 'max_ext': 8, 'max_early': 18, 'arrival': 319, 'last_granted': 8, 'cycle_index': 18, 'lockout': 3}, ['early', 18]), ({'cycle': 80, 'green_start': 26, 'green_end': 41, 'max_ext': 5, 'max_early': 11, 'arrival': 119, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['none', 0]), ({'cycle': 130, 'green_start': 17, 'green_end': 37, 'max_ext': 10, 'max_early': 17, 'arrival': 194, 'last_granted': 5, 'cycle_index': 10, 'lockout': 1}, ['early', 17]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 80, 'green_start': 10, 'green_end': 43, 'max_ext': 8, 'max_early': 17, 'arrival': 121, 'last_granted': 9, 'cycle_index': 22, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 100, 'green_start': 30, 'green_end': 74, 'max_ext': 6, 'max_early': 18, 'arrival': 212, 'last_granted': None, 'cycle_index': 2, 'lockout': 1}, ['early', 18])], [({'cycle': 90, 'green_start': 13, 'green_end': 37, 'max_ext': 13, 'max_early': 7, 'arrival': 98, 'last_granted': None, 'cycle_index': 20, 'lockout': 3}, ['early', 5]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 42, 'green_end': 79, 'max_ext': 20, 'max_early': 5, 'arrival': 49, 'last_granted': None, 'cycle_index': 21, 'lockout': 3}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 90, 'green_start': 5, 'green_end': 41, 'max_ext': 17, 'max_early': 17, 'arrival': 217, 'last_granted': None, 'cycle_index': 8, 'lockout': 3}, ['none', 0]), ({'cycle': 80, 'green_start': 22, 'green_end': 55, 'max_ext': 8, 'max_early': 9, 'arrival': 17, 'last_granted': None, 'cycle_index': 22, 'lockout': 3}, ['early', 5]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 90, 'green_start': 30, 'green_end': 69, 'max_ext': 17, 'max_early': 7, 'arrival': 146, 'last_granted': 7, 'cycle_index': 12, 'lockout': 2}, ['none', 0])], [({'cycle': 120, 'green_start': 38, 'green_end': 79, 'max_ext': 11, 'max_early': 8, 'arrival': 227, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['early', 8]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 80, 'green_start': 6, 'green_end': 32, 'max_ext': 9, 'max_early': 14, 'arrival': 35, 'last_granted': None, 'cycle_index': 15, 'lockout': 2}, ['extend', 4]), ({'cycle': 80, 'green_start': 18, 'green_end': 36, 'max_ext': 15, 'max_early': 11, 'arrival': 98, 'last_granted': 1, 'cycle_index': 3, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 80, 'green_start': 21, 'green_end': 52, 'max_ext': 17, 'max_early': 8, 'arrival': 75, 'last_granted': None, 'cycle_index': 22, 'lockout': 1}, ['early', 8]), ({'cycle': 120, 'green_start': 60, 'green_end': 90, 'max_ext': 7, 'max_early': 12, 'arrival': 323, 'last_granted': 4, 'cycle_index': 20, 'lockout': 3}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1])], [({'cycle': 100, 'green_start': 36, 'green_end': 76, 'max_ext': 14, 'max_early': 6, 'arrival': 237, 'last_granted': None, 'cycle_index': 5, 'lockout': 3}, ['none', 0]), ({'cycle': 130, 'green_start': 61, 'green_end': 107, 'max_ext': 6, 'max_early': 17, 'arrival': 254, 'last_granted': None, 'cycle_index': 20, 'lockout': 1}, ['early', 17]), ({'cycle': 120, 'green_start': 17, 'green_end': 34, 'max_ext': 18, 'max_early': 18, 'arrival': 14, 'last_granted': None, 'cycle_index': 19, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 110, 'green_start': 12, 'green_end': 40, 'max_ext': 5, 'max_early': 14, 'arrival': 128, 'last_granted': None, 'cycle_index': 12, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 140, 'green_start': 63, 'green_end': 107, 'max_ext': 8, 'max_early': 20, 'arrival': 247, 'last_granted': None, 'cycle_index': 11, 'lockout': 1}, ['extend', 1])], [({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 29, 'green_end': 67, 'max_ext': 16, 'max_early': 15, 'arrival': 158, 'last_granted': None, 'cycle_index': 9, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 100, 'green_start': 25, 'green_end': 65, 'max_ext': 12, 'max_early': 20, 'arrival': 265, 'last_granted': 9, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 16, 'green_end': 46, 'max_ext': 14, 'max_early': 12, 'arrival': 63, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['early', 12]), ({'cycle': 120, 'green_start': 1, 'green_end': 42, 'max_ext': 6, 'max_early': 11, 'arrival': 270, 'last_granted': None, 'cycle_index': 7, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 37, 'green_end': 82, 'max_ext': 20, 'max_early': 5, 'arrival': 167, 'last_granted': None, 'cycle_index': 3, 'lockout': 2}, ['none', 0])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| timing oracle 0 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 1 | ['early', 18] | ['early', 18] | Passed |
| timing oracle 2 | ['early', 11] | ['none', 0] | Failed |
| timing oracle 3 | ['early', 17] | ['early', 17] | Passed |
| timing oracle 4 | ['early', 10] | ['none', 0] | Failed |
| timing oracle 5 | ['early', 11] | ['none', 0] | Failed |
| timing oracle 6 | ['early', 2] | ['early', 2] | Passed |
| timing oracle 7 | ['early', 18] | ['early', 18] | Passed |
SHA-256 / ec8375e226497070e4b11e543ed65d7b6604d1f3466a2cdb597c472da1759164
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
C = x['cycle']
a = x['arrival'] % C
last = x['last_granted']
if last is not None and x['cycle_index'] - last <= x['lockout']:
return ['locked', 0]
gs, ge = x['green_start'], x['green_end']
if gs <= a < ge:
return ['none', 0]
d = (a - ge) % C
if d < x['max_ext']:
return ['extend', d + 1]
wait = (gs - a) % C
return ['early', min(x['max_early'], wait)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 120, 'green_start': 33, 'green_end': 56, 'max_ext': 8, 'max_early': 18, 'arrival': 319, 'last_granted': 8, 'cycle_index': 18, 'lockout': 3}, ['early', 18]), ({'cycle': 80, 'green_start': 26, 'green_end': 41, 'max_ext': 5, 'max_early': 11, 'arrival': 119, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['none', 0]), ({'cycle': 130, 'green_start': 17, 'green_end': 37, 'max_ext': 10, 'max_early': 17, 'arrival': 194, 'last_granted': 5, 'cycle_index': 10, 'lockout': 1}, ['early', 17]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 80, 'green_start': 10, 'green_end': 43, 'max_ext': 8, 'max_early': 17, 'arrival': 121, 'last_granted': 9, 'cycle_index': 22, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 100, 'green_start': 30, 'green_end': 74, 'max_ext': 6, 'max_early': 18, 'arrival': 212, 'last_granted': None, 'cycle_index': 2, 'lockout': 1}, ['early', 18])], [({'cycle': 90, 'green_start': 13, 'green_end': 37, 'max_ext': 13, 'max_early': 7, 'arrival': 98, 'last_granted': None, 'cycle_index': 20, 'lockout': 3}, ['early', 5]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 42, 'green_end': 79, 'max_ext': 20, 'max_early': 5, 'arrival': 49, 'last_granted': None, 'cycle_index': 21, 'lockout': 3}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 90, 'green_start': 5, 'green_end': 41, 'max_ext': 17, 'max_early': 17, 'arrival': 217, 'last_granted': None, 'cycle_index': 8, 'lockout': 3}, ['none', 0]), ({'cycle': 80, 'green_start': 22, 'green_end': 55, 'max_ext': 8, 'max_early': 9, 'arrival': 17, 'last_granted': None, 'cycle_index': 22, 'lockout': 3}, ['early', 5]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 90, 'green_start': 30, 'green_end': 69, 'max_ext': 17, 'max_early': 7, 'arrival': 146, 'last_granted': 7, 'cycle_index': 12, 'lockout': 2}, ['none', 0])], [({'cycle': 120, 'green_start': 38, 'green_end': 79, 'max_ext': 11, 'max_early': 8, 'arrival': 227, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['early', 8]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 80, 'green_start': 6, 'green_end': 32, 'max_ext': 9, 'max_early': 14, 'arrival': 35, 'last_granted': None, 'cycle_index': 15, 'lockout': 2}, ['extend', 4]), ({'cycle': 80, 'green_start': 18, 'green_end': 36, 'max_ext': 15, 'max_early': 11, 'arrival': 98, 'last_granted': 1, 'cycle_index': 3, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 80, 'green_start': 21, 'green_end': 52, 'max_ext': 17, 'max_early': 8, 'arrival': 75, 'last_granted': None, 'cycle_index': 22, 'lockout': 1}, ['early', 8]), ({'cycle': 120, 'green_start': 60, 'green_end': 90, 'max_ext': 7, 'max_early': 12, 'arrival': 323, 'last_granted': 4, 'cycle_index': 20, 'lockout': 3}, ['none', 0]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1])], [({'cycle': 100, 'green_start': 36, 'green_end': 76, 'max_ext': 14, 'max_early': 6, 'arrival': 237, 'last_granted': None, 'cycle_index': 5, 'lockout': 3}, ['none', 0]), ({'cycle': 130, 'green_start': 61, 'green_end': 107, 'max_ext': 6, 'max_early': 17, 'arrival': 254, 'last_granted': None, 'cycle_index': 20, 'lockout': 1}, ['early', 17]), ({'cycle': 120, 'green_start': 17, 'green_end': 34, 'max_ext': 18, 'max_early': 18, 'arrival': 14, 'last_granted': None, 'cycle_index': 19, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 110, 'green_start': 12, 'green_end': 40, 'max_ext': 5, 'max_early': 14, 'arrival': 128, 'last_granted': None, 'cycle_index': 12, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 140, 'green_start': 63, 'green_end': 107, 'max_ext': 8, 'max_early': 20, 'arrival': 247, 'last_granted': None, 'cycle_index': 11, 'lockout': 1}, ['extend', 1])], [({'cycle': 100, 'green_start': 10, 'green_end': 50, 'max_ext': 10, 'max_early': 10, 'arrival': 250, 'last_granted': 3, 'cycle_index': 5, 'lockout': 2}, ['locked', 0]), ({'cycle': 100, 'green_start': 29, 'green_end': 67, 'max_ext': 16, 'max_early': 15, 'arrival': 158, 'last_granted': None, 'cycle_index': 9, 'lockout': 3}, ['none', 0]), ({'cycle': 100, 'green_start': 30, 'green_end': 45, 'max_ext': 20, 'max_early': 10, 'arrival': 28, 'last_granted': 1, 'cycle_index': 6, 'lockout': 2}, ['early', 2]), ({'cycle': 100, 'green_start': 25, 'green_end': 65, 'max_ext': 12, 'max_early': 20, 'arrival': 265, 'last_granted': 9, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 90, 'green_start': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 100, 'green_start': 16, 'green_end': 46, 'max_ext': 14, 'max_early': 12, 'arrival': 63, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['early', 12]), ({'cycle': 120, 'green_start': 1, 'green_end': 42, 'max_ext': 6, 'max_early': 11, 'arrival': 270, 'last_granted': None, 'cycle_index': 7, 'lockout': 1}, ['none', 0]), ({'cycle': 100, 'green_start': 37, 'green_end': 82, 'max_ext': 20, 'max_early': 5, 'arrival': 167, 'last_granted': None, 'cycle_index': 3, 'lockout': 2}, ['none', 0])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| timing oracle 0 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 1 | ['early', 18] | ['early', 18] | Passed |
| timing oracle 2 | ['none', 0] | ['none', 0] | Passed |
| timing oracle 3 | ['early', 17] | ['early', 17] | Passed |
| timing oracle 4 | ['none', 0] | ['none', 0] | Passed |
| timing oracle 5 | ['none', 0] | ['none', 0] | Passed |
| timing oracle 6 | ['early', 2] | ['early', 2] | Passed |
| timing oracle 7 | ['early', 18] | ['early', 18] | Passed |
SHA-256 / 27c1cfb5112b347aade226ff60587e1fe3c4e3b1d406f6abb51e7025255bd581
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:59.869093+00:00.
Case digest / 0a00cca0078c4a337b76c6d8e2c48a789f3a7de18eb6d0b6ba22c26688d3c7e5