FA-67981 / Traffic signal timing plans / Open access
Actuated phase gap-out and max-out: a phase that gapped out before the call ends before the call arrives · case 01
Actuated phase gap-out and max-out returns a wrong result when a phase that gapped out before the call ends before the call arrives.
ROOT CAUSE
The termination time ignores that the phase rests in green until a conflicting call exists.
VERIFIED REPAIR
Restore the resting before the call rule so that the step reads `max(gap_end, tc)`.
Unsuccessful approach: Clamping to min green does not model resting until the call time.
Case contract
Input {min_green, gap, max_green, actuations: integer seconds since green start (any order), conflict_call: seconds or null}. Each actuation at a keeps the phase eligible until a+gap; an actuation exactly at expiry extends; actuations during min green always extend. Gap-out time = max(min_green, final expiry). With no conflicting call return ['rest', gap time]. The max timer starts at the call (a call before green start counts as 0); max-out at call+max_green. If gap time <= max-out the phase ends by 'gap-out' at max(gap time, call), else by 'max-out'.
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):
m, p, M = x['min_green'], x['gap'], x['max_green']
exp = 0
for a in sorted(x['actuations']):
if a > exp and a > m:
break
exp = max(exp, a + p)
gap_end = max(m, exp)
tc = x['conflict_call']
if tc is None:
return ['rest', gap_end]
tc = max(tc, 0)
max_end = tc + M
if gap_end <= max_end:
return ['gap-out', gap_end]
return ['max-out', max_end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'min_green': 10, 'gap': 5, 'max_green': 32, 'actuations': [2, 3, 16, 24, 25, 29, 40, 41, 42, 46, 53, 56, 58], 'conflict_call': 0}, ['gap-out', 10]), ({'min_green': 6, 'gap': 2, 'max_green': 38, 'actuations': [2, 5, 6, 7, 10, 12, 13, 16, 18, 19, 25, 26, 30, 33, 35, 40, 43, 48, 50], 'conflict_call': 11}, ['gap-out', 11]), ({'min_green': 4, 'gap': 2, 'max_green': 42, 'actuations': [39, 51, 53], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 9, 'gap': 4, 'max_green': 42, 'actuations': [4, 7, 8, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 35, 38, 40, 41, 45, 46, 48, 49, 50, 53, 54, 56, 57, 59], 'conflict_call': 27}, ['gap-out', 63]), ({'min_green': 10, 'gap': 2, 'max_green': 23, 'actuations': [30, 24, 8, 40, 7, 3, 26, 39, 54, 36, 53, 49, 16, 37, 17, 15, 18, 47, 25, 57, 11, 34, 28, 58, 38, 10, 51, 1, 4], 'conflict_call': 5}, ['gap-out', 13]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 6, 'gap': 2, 'max_green': 15, 'actuations': [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38], 'conflict_call': -3}, ['max-out', 15]), ({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3])], [({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 4, 'gap': 2, 'max_green': 17, 'actuations': [2, 4, 21, 22, 42, 50, 54, 57, 59], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 4, 'gap': 5, 'max_green': 16, 'actuations': [5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 23, 25, 33, 34, 35, 36, 39, 45, 46, 47, 48, 51, 53, 54, 55, 57, 59], 'conflict_call': 29}, ['gap-out', 29]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 4, 'gap': 4, 'max_green': 22, 'actuations': [0, 6, 7, 15, 16, 31, 35, 38, 42], 'conflict_call': None}, ['rest', 4]), ({'min_green': 4, 'gap': 5, 'max_green': 19, 'actuations': [4, 5, 8, 14, 18, 21, 22, 23, 29, 32, 35, 37, 41, 43, 44, 45, 48, 56, 59], 'conflict_call': 22}, ['gap-out', 22]), ({'min_green': 5, 'gap': 4, 'max_green': 23, 'actuations': [9, 13, 14, 15, 26, 27, 31, 32, 37, 39, 45, 47, 48, 49, 50, 54, 55], 'conflict_call': 8}, ['gap-out', 8])], [({'min_green': 4, 'gap': 3, 'max_green': 27, 'actuations': [14, 0, 50, 31, 17, 52, 19, 58, 40, 28, 59, 7, 24, 12, 29, 5, 57, 18, 51, 4, 34, 32, 47, 35, 41, 54, 23, 9, 44, 36, 21, 22, 45], 'conflict_call': 27}, ['gap-out', 27]), ({'min_green': 5, 'gap': 5, 'max_green': 34, 'actuations': [0, 2, 7, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 42, 45, 46, 51, 53, 54, 55, 56, 58, 59], 'conflict_call': 16}, ['max-out', 50]), ({'min_green': 7, 'gap': 3, 'max_green': 43, 'actuations': [4, 9, 16, 26, 35, 36, 39, 44, 51], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 3, 'max_green': 27, 'actuations': [4, 7, 13, 26, 27, 28, 34, 37, 44, 45, 48, 54, 58], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 5, 'gap': 3, 'max_green': 20, 'actuations': [1, 4, 7, 10, 13], 'conflict_call': 2}, ['gap-out', 16]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 10, 'gap': 3, 'max_green': 36, 'actuations': [7, 17, 20, 30, 54, 59], 'conflict_call': 31}, ['gap-out', 31])], [({'min_green': 7, 'gap': 2, 'max_green': 29, 'actuations': [1, 3, 18, 19, 27, 31, 41, 45, 47, 54], 'conflict_call': -2}, ['gap-out', 7]), ({'min_green': 8, 'gap': 3, 'max_green': 36, 'actuations': [5, 9, 19, 21, 40, 41, 45, 48, 53, 54], 'conflict_call': None}, ['rest', 8]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 7, 'gap': 4, 'max_green': 27, 'actuations': [0, 3, 16, 20, 40, 41, 44], 'conflict_call': 26}, ['gap-out', 26]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 9, 'gap': 2, 'max_green': 15, 'actuations': [0, 1, 3, 15, 16, 21, 23, 24, 25, 28, 31, 34, 42, 49, 50, 53, 56, 58], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 10, 'gap': 4, 'max_green': 27, 'actuations': [34, 19, 18, 33, 27, 55, 13, 32, 10, 49, 41, 46, 26, 16, 37, 7, 31, 29, 48, 51, 2, 14, 21, 52, 35, 20, 38, 15, 30, 54, 44, 40], 'conflict_call': 25}, ['gap-out', 25])], [({'min_green': 6, 'gap': 2, 'max_green': 42, 'actuations': [1, 5, 7, 8, 9, 11, 13, 14, 16, 37, 38, 39, 40, 44, 47, 48, 49, 50, 52, 56, 57], 'conflict_call': 9}, ['gap-out', 18]), ({'min_green': 6, 'gap': 4, 'max_green': 37, 'actuations': [1, 2, 5, 6, 11, 14, 16, 17, 22, 23, 25, 27, 33, 36, 37, 42, 43, 47, 48, 49, 50, 56, 57, 58], 'conflict_call': 18}, ['gap-out', 18]), ({'min_green': 8, 'gap': 4, 'max_green': 19, 'actuations': [1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 16, 17, 20, 25, 30, 32, 33, 34, 35, 41, 42, 47, 48, 49, 51, 52, 53, 55, 56], 'conflict_call': 19}, ['gap-out', 24]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 6, 'gap': 3, 'max_green': 36, 'actuations': [0, 1, 4, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 24, 25, 26, 29, 30, 35, 36, 38, 40, 41, 43, 44, 45, 46, 47, 50, 52, 53, 57, 58], 'conflict_call': 17}, ['gap-out', 17]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 8, 'gap': 2, 'max_green': 22, 'actuations': [13, 43, 30, 47, 53, 33, 59, 49, 35, 26, 55], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12])]]
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 | ['gap-out', 10] | ['gap-out', 10] | Passed |
| timing oracle 1 | ['gap-out', 9] | ['gap-out', 11] | Failed |
| timing oracle 2 | ['gap-out', 4] | ['gap-out', 31] | Failed |
| timing oracle 3 | ['gap-out', 63] | ['gap-out', 63] | Passed |
| timing oracle 4 | ['gap-out', 13] | ['gap-out', 13] | Passed |
| timing oracle 5 | ['gap-out', 9] | ['gap-out', 20] | Failed |
| timing oracle 6 | ['max-out', 15] | ['max-out', 15] | Passed |
| timing oracle 7 | ['max-out', 3] | ['max-out', 3] | Passed |
SHA-256 / f4e661cf1032ff1b426dc1b04cf10fc84c416bb8e3dbd73a37d9fe0428d67c40
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
m, p, M = x['min_green'], x['gap'], x['max_green']
exp = 0
for a in sorted(x['actuations']):
if a > exp and a > m:
break
exp = max(exp, a + p)
gap_end = max(m, exp)
tc = x['conflict_call']
if tc is None:
return ['rest', gap_end]
tc = max(tc, 0)
max_end = tc + M
if gap_end <= max_end:
return ['gap-out', max(gap_end, m)]
return ['max-out', max_end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'min_green': 10, 'gap': 5, 'max_green': 32, 'actuations': [2, 3, 16, 24, 25, 29, 40, 41, 42, 46, 53, 56, 58], 'conflict_call': 0}, ['gap-out', 10]), ({'min_green': 6, 'gap': 2, 'max_green': 38, 'actuations': [2, 5, 6, 7, 10, 12, 13, 16, 18, 19, 25, 26, 30, 33, 35, 40, 43, 48, 50], 'conflict_call': 11}, ['gap-out', 11]), ({'min_green': 4, 'gap': 2, 'max_green': 42, 'actuations': [39, 51, 53], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 9, 'gap': 4, 'max_green': 42, 'actuations': [4, 7, 8, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 35, 38, 40, 41, 45, 46, 48, 49, 50, 53, 54, 56, 57, 59], 'conflict_call': 27}, ['gap-out', 63]), ({'min_green': 10, 'gap': 2, 'max_green': 23, 'actuations': [30, 24, 8, 40, 7, 3, 26, 39, 54, 36, 53, 49, 16, 37, 17, 15, 18, 47, 25, 57, 11, 34, 28, 58, 38, 10, 51, 1, 4], 'conflict_call': 5}, ['gap-out', 13]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 6, 'gap': 2, 'max_green': 15, 'actuations': [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38], 'conflict_call': -3}, ['max-out', 15]), ({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3])], [({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 4, 'gap': 2, 'max_green': 17, 'actuations': [2, 4, 21, 22, 42, 50, 54, 57, 59], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 4, 'gap': 5, 'max_green': 16, 'actuations': [5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 23, 25, 33, 34, 35, 36, 39, 45, 46, 47, 48, 51, 53, 54, 55, 57, 59], 'conflict_call': 29}, ['gap-out', 29]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 4, 'gap': 4, 'max_green': 22, 'actuations': [0, 6, 7, 15, 16, 31, 35, 38, 42], 'conflict_call': None}, ['rest', 4]), ({'min_green': 4, 'gap': 5, 'max_green': 19, 'actuations': [4, 5, 8, 14, 18, 21, 22, 23, 29, 32, 35, 37, 41, 43, 44, 45, 48, 56, 59], 'conflict_call': 22}, ['gap-out', 22]), ({'min_green': 5, 'gap': 4, 'max_green': 23, 'actuations': [9, 13, 14, 15, 26, 27, 31, 32, 37, 39, 45, 47, 48, 49, 50, 54, 55], 'conflict_call': 8}, ['gap-out', 8])], [({'min_green': 4, 'gap': 3, 'max_green': 27, 'actuations': [14, 0, 50, 31, 17, 52, 19, 58, 40, 28, 59, 7, 24, 12, 29, 5, 57, 18, 51, 4, 34, 32, 47, 35, 41, 54, 23, 9, 44, 36, 21, 22, 45], 'conflict_call': 27}, ['gap-out', 27]), ({'min_green': 5, 'gap': 5, 'max_green': 34, 'actuations': [0, 2, 7, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 42, 45, 46, 51, 53, 54, 55, 56, 58, 59], 'conflict_call': 16}, ['max-out', 50]), ({'min_green': 7, 'gap': 3, 'max_green': 43, 'actuations': [4, 9, 16, 26, 35, 36, 39, 44, 51], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 3, 'max_green': 27, 'actuations': [4, 7, 13, 26, 27, 28, 34, 37, 44, 45, 48, 54, 58], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 5, 'gap': 3, 'max_green': 20, 'actuations': [1, 4, 7, 10, 13], 'conflict_call': 2}, ['gap-out', 16]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 10, 'gap': 3, 'max_green': 36, 'actuations': [7, 17, 20, 30, 54, 59], 'conflict_call': 31}, ['gap-out', 31])], [({'min_green': 7, 'gap': 2, 'max_green': 29, 'actuations': [1, 3, 18, 19, 27, 31, 41, 45, 47, 54], 'conflict_call': -2}, ['gap-out', 7]), ({'min_green': 8, 'gap': 3, 'max_green': 36, 'actuations': [5, 9, 19, 21, 40, 41, 45, 48, 53, 54], 'conflict_call': None}, ['rest', 8]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 7, 'gap': 4, 'max_green': 27, 'actuations': [0, 3, 16, 20, 40, 41, 44], 'conflict_call': 26}, ['gap-out', 26]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 9, 'gap': 2, 'max_green': 15, 'actuations': [0, 1, 3, 15, 16, 21, 23, 24, 25, 28, 31, 34, 42, 49, 50, 53, 56, 58], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 10, 'gap': 4, 'max_green': 27, 'actuations': [34, 19, 18, 33, 27, 55, 13, 32, 10, 49, 41, 46, 26, 16, 37, 7, 31, 29, 48, 51, 2, 14, 21, 52, 35, 20, 38, 15, 30, 54, 44, 40], 'conflict_call': 25}, ['gap-out', 25])], [({'min_green': 6, 'gap': 2, 'max_green': 42, 'actuations': [1, 5, 7, 8, 9, 11, 13, 14, 16, 37, 38, 39, 40, 44, 47, 48, 49, 50, 52, 56, 57], 'conflict_call': 9}, ['gap-out', 18]), ({'min_green': 6, 'gap': 4, 'max_green': 37, 'actuations': [1, 2, 5, 6, 11, 14, 16, 17, 22, 23, 25, 27, 33, 36, 37, 42, 43, 47, 48, 49, 50, 56, 57, 58], 'conflict_call': 18}, ['gap-out', 18]), ({'min_green': 8, 'gap': 4, 'max_green': 19, 'actuations': [1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 16, 17, 20, 25, 30, 32, 33, 34, 35, 41, 42, 47, 48, 49, 51, 52, 53, 55, 56], 'conflict_call': 19}, ['gap-out', 24]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 6, 'gap': 3, 'max_green': 36, 'actuations': [0, 1, 4, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 24, 25, 26, 29, 30, 35, 36, 38, 40, 41, 43, 44, 45, 46, 47, 50, 52, 53, 57, 58], 'conflict_call': 17}, ['gap-out', 17]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 8, 'gap': 2, 'max_green': 22, 'actuations': [13, 43, 30, 47, 53, 33, 59, 49, 35, 26, 55], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12])]]
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 | ['gap-out', 10] | ['gap-out', 10] | Passed |
| timing oracle 1 | ['gap-out', 9] | ['gap-out', 11] | Failed |
| timing oracle 2 | ['gap-out', 4] | ['gap-out', 31] | Failed |
| timing oracle 3 | ['gap-out', 63] | ['gap-out', 63] | Passed |
| timing oracle 4 | ['gap-out', 13] | ['gap-out', 13] | Passed |
| timing oracle 5 | ['gap-out', 9] | ['gap-out', 20] | Failed |
| timing oracle 6 | ['max-out', 15] | ['max-out', 15] | Passed |
| timing oracle 7 | ['max-out', 3] | ['max-out', 3] | Passed |
SHA-256 / 7f9f551ffc56bd177af8d599d7b990b84aaee34d5c7cbf8f8c35c6e5781e23e4
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
m, p, M = x['min_green'], x['gap'], x['max_green']
exp = 0
for a in sorted(x['actuations']):
if a > exp and a > m:
break
exp = max(exp, a + p)
gap_end = max(m, exp)
tc = x['conflict_call']
if tc is None:
return ['rest', gap_end]
tc = max(tc, 0)
max_end = tc + M
if gap_end <= max_end:
return ['gap-out', max(gap_end, tc)]
return ['max-out', max_end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'min_green': 10, 'gap': 5, 'max_green': 32, 'actuations': [2, 3, 16, 24, 25, 29, 40, 41, 42, 46, 53, 56, 58], 'conflict_call': 0}, ['gap-out', 10]), ({'min_green': 6, 'gap': 2, 'max_green': 38, 'actuations': [2, 5, 6, 7, 10, 12, 13, 16, 18, 19, 25, 26, 30, 33, 35, 40, 43, 48, 50], 'conflict_call': 11}, ['gap-out', 11]), ({'min_green': 4, 'gap': 2, 'max_green': 42, 'actuations': [39, 51, 53], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 9, 'gap': 4, 'max_green': 42, 'actuations': [4, 7, 8, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 35, 38, 40, 41, 45, 46, 48, 49, 50, 53, 54, 56, 57, 59], 'conflict_call': 27}, ['gap-out', 63]), ({'min_green': 10, 'gap': 2, 'max_green': 23, 'actuations': [30, 24, 8, 40, 7, 3, 26, 39, 54, 36, 53, 49, 16, 37, 17, 15, 18, 47, 25, 57, 11, 34, 28, 58, 38, 10, 51, 1, 4], 'conflict_call': 5}, ['gap-out', 13]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 6, 'gap': 2, 'max_green': 15, 'actuations': [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38], 'conflict_call': -3}, ['max-out', 15]), ({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3])], [({'min_green': 10, 'gap': 2, 'max_green': 3, 'actuations': [], 'conflict_call': 0}, ['max-out', 3]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 4, 'gap': 2, 'max_green': 17, 'actuations': [2, 4, 21, 22, 42, 50, 54, 57, 59], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 4, 'gap': 5, 'max_green': 16, 'actuations': [5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 18, 23, 25, 33, 34, 35, 36, 39, 45, 46, 47, 48, 51, 53, 54, 55, 57, 59], 'conflict_call': 29}, ['gap-out', 29]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 4, 'gap': 4, 'max_green': 22, 'actuations': [0, 6, 7, 15, 16, 31, 35, 38, 42], 'conflict_call': None}, ['rest', 4]), ({'min_green': 4, 'gap': 5, 'max_green': 19, 'actuations': [4, 5, 8, 14, 18, 21, 22, 23, 29, 32, 35, 37, 41, 43, 44, 45, 48, 56, 59], 'conflict_call': 22}, ['gap-out', 22]), ({'min_green': 5, 'gap': 4, 'max_green': 23, 'actuations': [9, 13, 14, 15, 26, 27, 31, 32, 37, 39, 45, 47, 48, 49, 50, 54, 55], 'conflict_call': 8}, ['gap-out', 8])], [({'min_green': 4, 'gap': 3, 'max_green': 27, 'actuations': [14, 0, 50, 31, 17, 52, 19, 58, 40, 28, 59, 7, 24, 12, 29, 5, 57, 18, 51, 4, 34, 32, 47, 35, 41, 54, 23, 9, 44, 36, 21, 22, 45], 'conflict_call': 27}, ['gap-out', 27]), ({'min_green': 5, 'gap': 5, 'max_green': 34, 'actuations': [0, 2, 7, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 42, 45, 46, 51, 53, 54, 55, 56, 58, 59], 'conflict_call': 16}, ['max-out', 50]), ({'min_green': 7, 'gap': 3, 'max_green': 43, 'actuations': [4, 9, 16, 26, 35, 36, 39, 44, 51], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 3, 'max_green': 27, 'actuations': [4, 7, 13, 26, 27, 28, 34, 37, 44, 45, 48, 54, 58], 'conflict_call': 14}, ['gap-out', 14]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 5, 'gap': 3, 'max_green': 20, 'actuations': [1, 4, 7, 10, 13], 'conflict_call': 2}, ['gap-out', 16]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 10, 'gap': 3, 'max_green': 36, 'actuations': [7, 17, 20, 30, 54, 59], 'conflict_call': 31}, ['gap-out', 31])], [({'min_green': 7, 'gap': 2, 'max_green': 29, 'actuations': [1, 3, 18, 19, 27, 31, 41, 45, 47, 54], 'conflict_call': -2}, ['gap-out', 7]), ({'min_green': 8, 'gap': 3, 'max_green': 36, 'actuations': [5, 9, 19, 21, 40, 41, 45, 48, 53, 54], 'conflict_call': None}, ['rest', 8]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 7, 'gap': 4, 'max_green': 27, 'actuations': [0, 3, 16, 20, 40, 41, 44], 'conflict_call': 26}, ['gap-out', 26]), ({'min_green': 8, 'gap': 3, 'max_green': 30, 'actuations': [2, 6], 'conflict_call': 20}, ['gap-out', 20]), ({'min_green': 9, 'gap': 2, 'max_green': 15, 'actuations': [0, 1, 3, 15, 16, 21, 23, 24, 25, 28, 31, 34, 42, 49, 50, 53, 56, 58], 'conflict_call': 31}, ['gap-out', 31]), ({'min_green': 10, 'gap': 4, 'max_green': 27, 'actuations': [34, 19, 18, 33, 27, 55, 13, 32, 10, 49, 41, 46, 26, 16, 37, 7, 31, 29, 48, 51, 2, 14, 21, 52, 35, 20, 38, 15, 30, 54, 44, 40], 'conflict_call': 25}, ['gap-out', 25])], [({'min_green': 6, 'gap': 2, 'max_green': 42, 'actuations': [1, 5, 7, 8, 9, 11, 13, 14, 16, 37, 38, 39, 40, 44, 47, 48, 49, 50, 52, 56, 57], 'conflict_call': 9}, ['gap-out', 18]), ({'min_green': 6, 'gap': 4, 'max_green': 37, 'actuations': [1, 2, 5, 6, 11, 14, 16, 17, 22, 23, 25, 27, 33, 36, 37, 42, 43, 47, 48, 49, 50, 56, 57, 58], 'conflict_call': 18}, ['gap-out', 18]), ({'min_green': 8, 'gap': 4, 'max_green': 19, 'actuations': [1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 16, 17, 20, 25, 30, 32, 33, 34, 35, 41, 42, 47, 48, 49, 51, 52, 53, 55, 56], 'conflict_call': 19}, ['gap-out', 24]), ({'min_green': 6, 'gap': 2, 'max_green': 12, 'actuations': [1, 3, 5, 7, 9, 11, 13], 'conflict_call': 3}, ['gap-out', 15]), ({'min_green': 6, 'gap': 3, 'max_green': 36, 'actuations': [0, 1, 4, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 24, 25, 26, 29, 30, 35, 36, 38, 40, 41, 43, 44, 45, 46, 47, 50, 52, 53, 57, 58], 'conflict_call': 17}, ['gap-out', 17]), ({'min_green': 12, 'gap': 3, 'max_green': 5, 'actuations': [1], 'conflict_call': 2}, ['max-out', 7]), ({'min_green': 8, 'gap': 2, 'max_green': 22, 'actuations': [13, 43, 30, 47, 53, 33, 59, 49, 35, 26, 55], 'conflict_call': 23}, ['gap-out', 23]), ({'min_green': 5, 'gap': 3, 'max_green': 25, 'actuations': [9, 3, 6], 'conflict_call': None}, ['rest', 12])]]
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 | ['gap-out', 10] | ['gap-out', 10] | Passed |
| timing oracle 1 | ['gap-out', 11] | ['gap-out', 11] | Passed |
| timing oracle 2 | ['gap-out', 31] | ['gap-out', 31] | Passed |
| timing oracle 3 | ['gap-out', 63] | ['gap-out', 63] | Passed |
| timing oracle 4 | ['gap-out', 13] | ['gap-out', 13] | Passed |
| timing oracle 5 | ['gap-out', 20] | ['gap-out', 20] | Passed |
| timing oracle 6 | ['max-out', 15] | ['max-out', 15] | Passed |
| timing oracle 7 | ['max-out', 3] | ['max-out', 3] | Passed |
SHA-256 / 4e6e3d5d0fd4ec7ad8bd0a0f316f2fed9a032b101c09efaefec2809111b2e363
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.887084+00:00.
Case digest / e3b7268f65793d4038fa2adcbeaa43771c84c8ba8ecf0e0331c76af282acb384