FA-68216 / Traffic signal timing plans / Open access
Transit signal priority decision: green is extended only up to the arrival second · case 01
Transit signal priority decision returns a wrong result when green is extended only up to the arrival second.
ROOT CAUSE
Extending by d ends green at the arrival second instead of through it.
VERIFIED REPAIR
Restore the extension amount rule so that the step reads `['extend', d + 1]`.
Unsuccessful approach: Always granting the maximum extension over-serves the priority phase.
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'] % 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]
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': 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': 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': 80, 'green_start': 38, 'green_end': 70, 'max_ext': 13, 'max_early': 9, 'arrival': 230, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 120, 'green_start': 14, 'green_end': 36, 'max_ext': 11, 'max_early': 6, 'arrival': 251, 'last_granted': None, 'cycle_index': 11, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 27, 'green_end': 52, 'max_ext': 15, 'max_early': 15, 'arrival': 108, 'last_granted': None, 'cycle_index': 0, 'lockout': 2}, ['early', 15]), ({'cycle': 80, 'green_start': 16, 'green_end': 35, 'max_ext': 15, 'max_early': 7, 'arrival': 162, 'last_granted': 15, 'cycle_index': 9, 'lockout': 1}, ['locked', 0]), ({'cycle': 90, 'green_start': 13, 'green_end': 43, 'max_ext': 20, 'max_early': 7, 'arrival': 237, 'last_granted': 0, 'cycle_index': 22, 'lockout': 3}, ['extend', 15])], [({'cycle': 80, 'green_start': 1, 'green_end': 31, 'max_ext': 6, 'max_early': 17, 'arrival': 14, 'last_granted': 10, 'cycle_index': 0, 'lockout': 1}, ['locked', 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': 120, 'green_start': 17, 'green_end': 63, 'max_ext': 7, 'max_early': 19, 'arrival': 149, 'last_granted': 18, 'cycle_index': 16, 'lockout': 1}, ['locked', 0]), ({'cycle': 140, 'green_start': 24, 'green_end': 42, 'max_ext': 18, 'max_early': 17, 'arrival': 334, 'last_granted': 8, 'cycle_index': 19, 'lockout': 2}, ['extend', 13]), ({'cycle': 90, 'green_start': 34, 'green_end': 71, 'max_ext': 14, 'max_early': 17, 'arrival': 26, 'last_granted': 19, 'cycle_index': 4, 'lockout': 1}, ['locked', 0]), ({'cycle': 130, 'green_start': 50, 'green_end': 83, 'max_ext': 16, 'max_early': 7, 'arrival': 85, 'last_granted': None, 'cycle_index': 18, 'lockout': 2}, ['extend', 3]), ({'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': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 140, 'green_start': 21, 'green_end': 71, 'max_ext': 11, 'max_early': 13, 'arrival': 64, 'last_granted': 16, 'cycle_index': 19, 'lockout': 2}, ['none', 0]), ({'cycle': 90, 'green_start': 20, 'green_end': 47, 'max_ext': 18, 'max_early': 18, 'arrival': 149, 'last_granted': 4, 'cycle_index': 12, 'lockout': 1}, ['extend', 13]), ({'cycle': 140, 'green_start': 43, 'green_end': 68, 'max_ext': 13, 'max_early': 9, 'arrival': 80, 'last_granted': None, 'cycle_index': 16, 'lockout': 2}, ['extend', 13]), ({'cycle': 110, 'green_start': 41, 'green_end': 72, 'max_ext': 6, 'max_early': 7, 'arrival': 90, 'last_granted': 19, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 17, 'green_end': 57, 'max_ext': 19, 'max_early': 17, 'arrival': 51, 'last_granted': None, 'cycle_index': 8, 'lockout': 1}, ['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': 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': 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': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 110, 'green_start': 51, 'green_end': 87, 'max_ext': 19, 'max_early': 17, 'arrival': 99, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['extend', 13]), ({'cycle': 100, 'green_start': 11, 'green_end': 43, 'max_ext': 14, 'max_early': 11, 'arrival': 226, 'last_granted': None, 'cycle_index': 4, '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': 80, 'green_start': 28, 'green_end': 66, 'max_ext': 10, 'max_early': 8, 'arrival': 195, 'last_granted': 17, 'cycle_index': 2, 'lockout': 2}, ['locked', 0]), ({'cycle': 130, 'green_start': 23, 'green_end': 63, 'max_ext': 18, 'max_early': 10, 'arrival': 202, 'last_granted': 11, 'cycle_index': 20, 'lockout': 1}, ['extend', 10]), ({'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': 110, 'green_start': 45, 'green_end': 69, 'max_ext': 14, 'max_early': 15, 'arrival': 27, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['early', 15])], [({'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': 35, 'green_end': 69, 'max_ext': 17, 'max_early': 19, 'arrival': 249, 'last_granted': 16, 'cycle_index': 11, 'lockout': 2}, ['locked', 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': 110, 'green_start': 39, 'green_end': 82, 'max_ext': 9, 'max_early': 5, 'arrival': 160, 'last_granted': 7, 'cycle_index': 18, 'lockout': 2}, ['none', 0]), ({'cycle': 110, 'green_start': 9, 'green_end': 34, 'max_ext': 20, 'max_early': 9, 'arrival': 45, 'last_granted': None, 'cycle_index': 16, 'lockout': 3}, ['extend', 12]), ({'cycle': 80, 'green_start': 35, 'green_end': 57, 'max_ext': 16, 'max_early': 11, 'arrival': 219, 'last_granted': 4, 'cycle_index': 8, 'lockout': 1}, ['extend', 3]), ({'cycle': 100, 'green_start': 7, 'green_end': 48, 'max_ext': 16, 'max_early': 14, 'arrival': 101, 'last_granted': 2, 'cycle_index': 5, 'lockout': 3}, ['locked', 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])]]
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 | ['extend', 0] | ['extend', 1] | Failed |
| timing oracle 1 | ['none', 0] | ['none', 0] | Passed |
| timing oracle 2 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 3 | ['extend', 0] | ['extend', 1] | Failed |
| timing oracle 4 | ['early', 3] | ['early', 3] | Passed |
| timing oracle 5 | ['early', 15] | ['early', 15] | Passed |
| timing oracle 6 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 7 | ['extend', 14] | ['extend', 15] | Failed |
SHA-256 / ea0afef8ca3cb525b3203b487c2aa2b369ae9e5dfc26f196b66b583914b8f7a2
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 = 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', x['max_ext']]
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': 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': 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': 80, 'green_start': 38, 'green_end': 70, 'max_ext': 13, 'max_early': 9, 'arrival': 230, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 120, 'green_start': 14, 'green_end': 36, 'max_ext': 11, 'max_early': 6, 'arrival': 251, 'last_granted': None, 'cycle_index': 11, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 27, 'green_end': 52, 'max_ext': 15, 'max_early': 15, 'arrival': 108, 'last_granted': None, 'cycle_index': 0, 'lockout': 2}, ['early', 15]), ({'cycle': 80, 'green_start': 16, 'green_end': 35, 'max_ext': 15, 'max_early': 7, 'arrival': 162, 'last_granted': 15, 'cycle_index': 9, 'lockout': 1}, ['locked', 0]), ({'cycle': 90, 'green_start': 13, 'green_end': 43, 'max_ext': 20, 'max_early': 7, 'arrival': 237, 'last_granted': 0, 'cycle_index': 22, 'lockout': 3}, ['extend', 15])], [({'cycle': 80, 'green_start': 1, 'green_end': 31, 'max_ext': 6, 'max_early': 17, 'arrival': 14, 'last_granted': 10, 'cycle_index': 0, 'lockout': 1}, ['locked', 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': 120, 'green_start': 17, 'green_end': 63, 'max_ext': 7, 'max_early': 19, 'arrival': 149, 'last_granted': 18, 'cycle_index': 16, 'lockout': 1}, ['locked', 0]), ({'cycle': 140, 'green_start': 24, 'green_end': 42, 'max_ext': 18, 'max_early': 17, 'arrival': 334, 'last_granted': 8, 'cycle_index': 19, 'lockout': 2}, ['extend', 13]), ({'cycle': 90, 'green_start': 34, 'green_end': 71, 'max_ext': 14, 'max_early': 17, 'arrival': 26, 'last_granted': 19, 'cycle_index': 4, 'lockout': 1}, ['locked', 0]), ({'cycle': 130, 'green_start': 50, 'green_end': 83, 'max_ext': 16, 'max_early': 7, 'arrival': 85, 'last_granted': None, 'cycle_index': 18, 'lockout': 2}, ['extend', 3]), ({'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': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 140, 'green_start': 21, 'green_end': 71, 'max_ext': 11, 'max_early': 13, 'arrival': 64, 'last_granted': 16, 'cycle_index': 19, 'lockout': 2}, ['none', 0]), ({'cycle': 90, 'green_start': 20, 'green_end': 47, 'max_ext': 18, 'max_early': 18, 'arrival': 149, 'last_granted': 4, 'cycle_index': 12, 'lockout': 1}, ['extend', 13]), ({'cycle': 140, 'green_start': 43, 'green_end': 68, 'max_ext': 13, 'max_early': 9, 'arrival': 80, 'last_granted': None, 'cycle_index': 16, 'lockout': 2}, ['extend', 13]), ({'cycle': 110, 'green_start': 41, 'green_end': 72, 'max_ext': 6, 'max_early': 7, 'arrival': 90, 'last_granted': 19, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 17, 'green_end': 57, 'max_ext': 19, 'max_early': 17, 'arrival': 51, 'last_granted': None, 'cycle_index': 8, 'lockout': 1}, ['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': 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': 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': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 110, 'green_start': 51, 'green_end': 87, 'max_ext': 19, 'max_early': 17, 'arrival': 99, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['extend', 13]), ({'cycle': 100, 'green_start': 11, 'green_end': 43, 'max_ext': 14, 'max_early': 11, 'arrival': 226, 'last_granted': None, 'cycle_index': 4, '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': 80, 'green_start': 28, 'green_end': 66, 'max_ext': 10, 'max_early': 8, 'arrival': 195, 'last_granted': 17, 'cycle_index': 2, 'lockout': 2}, ['locked', 0]), ({'cycle': 130, 'green_start': 23, 'green_end': 63, 'max_ext': 18, 'max_early': 10, 'arrival': 202, 'last_granted': 11, 'cycle_index': 20, 'lockout': 1}, ['extend', 10]), ({'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': 110, 'green_start': 45, 'green_end': 69, 'max_ext': 14, 'max_early': 15, 'arrival': 27, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['early', 15])], [({'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': 35, 'green_end': 69, 'max_ext': 17, 'max_early': 19, 'arrival': 249, 'last_granted': 16, 'cycle_index': 11, 'lockout': 2}, ['locked', 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': 110, 'green_start': 39, 'green_end': 82, 'max_ext': 9, 'max_early': 5, 'arrival': 160, 'last_granted': 7, 'cycle_index': 18, 'lockout': 2}, ['none', 0]), ({'cycle': 110, 'green_start': 9, 'green_end': 34, 'max_ext': 20, 'max_early': 9, 'arrival': 45, 'last_granted': None, 'cycle_index': 16, 'lockout': 3}, ['extend', 12]), ({'cycle': 80, 'green_start': 35, 'green_end': 57, 'max_ext': 16, 'max_early': 11, 'arrival': 219, 'last_granted': 4, 'cycle_index': 8, 'lockout': 1}, ['extend', 3]), ({'cycle': 100, 'green_start': 7, 'green_end': 48, 'max_ext': 16, 'max_early': 14, 'arrival': 101, 'last_granted': 2, 'cycle_index': 5, 'lockout': 3}, ['locked', 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])]]
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 | ['extend', 12] | ['extend', 1] | Failed |
| timing oracle 1 | ['none', 0] | ['none', 0] | Passed |
| timing oracle 2 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 3 | ['extend', 13] | ['extend', 1] | Failed |
| timing oracle 4 | ['early', 3] | ['early', 3] | Passed |
| timing oracle 5 | ['early', 15] | ['early', 15] | Passed |
| timing oracle 6 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 7 | ['extend', 20] | ['extend', 15] | Failed |
SHA-256 / 4c8fd593b74d15545fbcef662213ad1a0af7a40b6aaf318f64b1e59a8c66fc28
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': 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': 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': 80, 'green_start': 38, 'green_end': 70, 'max_ext': 13, 'max_early': 9, 'arrival': 230, 'last_granted': None, 'cycle_index': 17, 'lockout': 1}, ['extend', 1]), ({'cycle': 120, 'green_start': 14, 'green_end': 36, 'max_ext': 11, 'max_early': 6, 'arrival': 251, 'last_granted': None, 'cycle_index': 11, 'lockout': 2}, ['early', 3]), ({'cycle': 100, 'green_start': 27, 'green_end': 52, 'max_ext': 15, 'max_early': 15, 'arrival': 108, 'last_granted': None, 'cycle_index': 0, 'lockout': 2}, ['early', 15]), ({'cycle': 80, 'green_start': 16, 'green_end': 35, 'max_ext': 15, 'max_early': 7, 'arrival': 162, 'last_granted': 15, 'cycle_index': 9, 'lockout': 1}, ['locked', 0]), ({'cycle': 90, 'green_start': 13, 'green_end': 43, 'max_ext': 20, 'max_early': 7, 'arrival': 237, 'last_granted': 0, 'cycle_index': 22, 'lockout': 3}, ['extend', 15])], [({'cycle': 80, 'green_start': 1, 'green_end': 31, 'max_ext': 6, 'max_early': 17, 'arrival': 14, 'last_granted': 10, 'cycle_index': 0, 'lockout': 1}, ['locked', 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': 120, 'green_start': 17, 'green_end': 63, 'max_ext': 7, 'max_early': 19, 'arrival': 149, 'last_granted': 18, 'cycle_index': 16, 'lockout': 1}, ['locked', 0]), ({'cycle': 140, 'green_start': 24, 'green_end': 42, 'max_ext': 18, 'max_early': 17, 'arrival': 334, 'last_granted': 8, 'cycle_index': 19, 'lockout': 2}, ['extend', 13]), ({'cycle': 90, 'green_start': 34, 'green_end': 71, 'max_ext': 14, 'max_early': 17, 'arrival': 26, 'last_granted': 19, 'cycle_index': 4, 'lockout': 1}, ['locked', 0]), ({'cycle': 130, 'green_start': 50, 'green_end': 83, 'max_ext': 16, 'max_early': 7, 'arrival': 85, 'last_granted': None, 'cycle_index': 18, 'lockout': 2}, ['extend', 3]), ({'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': 10, 'green_end': 45, 'max_ext': 10, 'max_early': 10, 'arrival': 110, 'last_granted': None, 'cycle_index': 4, 'lockout': 1}, ['none', 0])], [({'cycle': 140, 'green_start': 21, 'green_end': 71, 'max_ext': 11, 'max_early': 13, 'arrival': 64, 'last_granted': 16, 'cycle_index': 19, 'lockout': 2}, ['none', 0]), ({'cycle': 90, 'green_start': 20, 'green_end': 47, 'max_ext': 18, 'max_early': 18, 'arrival': 149, 'last_granted': 4, 'cycle_index': 12, 'lockout': 1}, ['extend', 13]), ({'cycle': 140, 'green_start': 43, 'green_end': 68, 'max_ext': 13, 'max_early': 9, 'arrival': 80, 'last_granted': None, 'cycle_index': 16, 'lockout': 2}, ['extend', 13]), ({'cycle': 110, 'green_start': 41, 'green_end': 72, 'max_ext': 6, 'max_early': 7, 'arrival': 90, 'last_granted': 19, 'cycle_index': 11, 'lockout': 2}, ['locked', 0]), ({'cycle': 90, 'green_start': 17, 'green_end': 57, 'max_ext': 19, 'max_early': 17, 'arrival': 51, 'last_granted': None, 'cycle_index': 8, 'lockout': 1}, ['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': 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': 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': 0, 'green_end': 40, 'max_ext': 12, 'max_early': 8, 'arrival': 40, 'last_granted': None, 'cycle_index': 0, 'lockout': 1}, ['extend', 1]), ({'cycle': 110, 'green_start': 51, 'green_end': 87, 'max_ext': 19, 'max_early': 17, 'arrival': 99, 'last_granted': None, 'cycle_index': 18, 'lockout': 3}, ['extend', 13]), ({'cycle': 100, 'green_start': 11, 'green_end': 43, 'max_ext': 14, 'max_early': 11, 'arrival': 226, 'last_granted': None, 'cycle_index': 4, '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': 80, 'green_start': 28, 'green_end': 66, 'max_ext': 10, 'max_early': 8, 'arrival': 195, 'last_granted': 17, 'cycle_index': 2, 'lockout': 2}, ['locked', 0]), ({'cycle': 130, 'green_start': 23, 'green_end': 63, 'max_ext': 18, 'max_early': 10, 'arrival': 202, 'last_granted': 11, 'cycle_index': 20, 'lockout': 1}, ['extend', 10]), ({'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': 110, 'green_start': 45, 'green_end': 69, 'max_ext': 14, 'max_early': 15, 'arrival': 27, 'last_granted': None, 'cycle_index': 7, 'lockout': 2}, ['early', 15])], [({'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': 35, 'green_end': 69, 'max_ext': 17, 'max_early': 19, 'arrival': 249, 'last_granted': 16, 'cycle_index': 11, 'lockout': 2}, ['locked', 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': 110, 'green_start': 39, 'green_end': 82, 'max_ext': 9, 'max_early': 5, 'arrival': 160, 'last_granted': 7, 'cycle_index': 18, 'lockout': 2}, ['none', 0]), ({'cycle': 110, 'green_start': 9, 'green_end': 34, 'max_ext': 20, 'max_early': 9, 'arrival': 45, 'last_granted': None, 'cycle_index': 16, 'lockout': 3}, ['extend', 12]), ({'cycle': 80, 'green_start': 35, 'green_end': 57, 'max_ext': 16, 'max_early': 11, 'arrival': 219, 'last_granted': 4, 'cycle_index': 8, 'lockout': 1}, ['extend', 3]), ({'cycle': 100, 'green_start': 7, 'green_end': 48, 'max_ext': 16, 'max_early': 14, 'arrival': 101, 'last_granted': 2, 'cycle_index': 5, 'lockout': 3}, ['locked', 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])]]
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 | ['extend', 1] | ['extend', 1] | Passed |
| timing oracle 1 | ['none', 0] | ['none', 0] | Passed |
| timing oracle 2 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 3 | ['extend', 1] | ['extend', 1] | Passed |
| timing oracle 4 | ['early', 3] | ['early', 3] | Passed |
| timing oracle 5 | ['early', 15] | ['early', 15] | Passed |
| timing oracle 6 | ['locked', 0] | ['locked', 0] | Passed |
| timing oracle 7 | ['extend', 15] | ['extend', 15] | Passed |
SHA-256 / 687226525aa03d78963e9f4cef082bab33b63e44a9c38f0ae07b440a66de247f
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:48:00.195421+00:00.
Case digest / c503308ace9088839bc57165359bed41b7c22c87ae2a81af90de7933d6156d3f