FA-78731 / Broadcast timecode arithmetic / Open access
Playout schedule on-air times: on-air label after black · case 01
Listed on-air times point at the start of the black rather than the first picture frame.
ROOT CAUSE
The on-air label subtracts the inserted gap again.
VERIFIED REPAIR
Label each clip after the gap has been inserted.
Unsuccessful approach: Adding another gap to the label pushes every on-air time past the real start.
Case contract
Clips [SOM, EOM] use non-drop labels at fps with EOM inclusive; a clip may cross midnight on tape. Clips air back to back from start with gap black frames between consecutive clips. Return the on-air label of each clip followed by the exclusive end label of the schedule, wrapping at 24 hours.
Why this case matters
Timecode arithmetic errors misplace edits, commercial breaks and captions against the broadcast clock.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, clips, gap, fps):
def fr(t):
h,m,s,f=map(int,t.split(':'))
return ((h*60+m)*60+s)*fps+f
def lab(n):
n%=86400*fps
return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
t=fr(start)
out=[]
for i,(som,eom) in enumerate(clips):
if i:
t+=gap
out.append(lab(t-gap if i else t))
d=(fr(eom)-fr(som))%(86400*fps)
t+=d+1
out.append(lab(t))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: on-air label after black', ['23:59:59:00', [['00:00:00:00', '00:00:01:00'], ['00:00:00:00', '00:00:00:00']], 5, 25], ['23:59:59:00', '00:00:00:06', '00:00:00:07']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:01:00'], ['10:00:00:00', '00:00:00:10']], 1, 30], ['00:00:00:00', '14:00:01:02', '04:00:01:13']), ('partial repair probe: on-air label after black', ['18:00:00:00', [['23:59:59:00', '01:00:30:00']], 5, 30], ['18:00:00:00', '19:00:31:01']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['01:00:00:00', '10:00:29:24'], ['01:00:00:00', '00:00:01:00'], ['23:59:59:00', '01:00:30:00']], 1, 30], ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['00:00:00:00', [], 25, 25], ['00:00:00:00']), ('normal control', ['23:59:50:00', [], 1, 30], ['23:59:50:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '00:00:01:00'], ['01:00:00:00', '10:00:29:24'], ['23:59:59:00', '00:00:01:00']], 0, 25], ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'])], [('regression: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:10'], ['00:00:00:00', '10:00:29:24'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '13:59:51:06', '00:00:21:26', '01:00:51:27']), ('regression variant: on-air label after black', ['00:00:00:00', [['01:00:00:00', '10:00:29:24'], ['01:00:00:00', '00:00:01:00'], ['23:59:59:00', '01:00:30:00']], 1, 30], ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29']), ('partial repair probe: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '13:59:50:01']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:00:10'], ['23:59:59:00', '00:00:00:00'], ['00:00:00:00', '10:00:10:00']], 25, 25], ['00:00:00:00', '14:00:01:11', '14:00:03:12', '00:00:13:13']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '10:00:29:24'], ['00:00:00:00', '10:00:10:00']], 0, 30], ['18:00:00:00', '04:00:29:25', '14:00:39:26']), ('normal control', ['00:00:00:00', [['00:00:00:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['10:00:00:00', '00:00:01:00'], ['00:00:00:00', '10:00:29:24']], 0, 25], ['00:00:00:00', '00:00:00:11', '15:00:30:12', '05:00:31:13', '15:01:01:13']), ('normal control', ['18:00:00:00', [], 0, 30], ['18:00:00:00'])], [('regression: on-air label after black', ['18:00:00:00', [['01:00:00:00', '00:00:01:00'], ['01:00:00:00', '10:00:10:00'], ['23:59:59:00', '00:00:00:10'], ['00:00:00:00', '00:00:00:10']], 25, 25], ['18:00:00:00', '17:00:02:01', '02:00:13:02', '02:00:15:13', '02:00:15:24']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:00:10'], ['23:59:59:00', '00:00:00:00'], ['00:00:00:00', '10:00:10:00']], 25, 25], ['00:00:00:00', '14:00:01:11', '14:00:03:12', '00:00:13:13']), ('partial repair probe: on-air label after black', ['23:59:50:00', [['10:00:00:00', '01:00:30:00'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '15:00:20:26', '16:00:50:27']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '00:00:00:10']], 5, 30], ['00:00:00:00', '00:00:10:06', '23:00:10:17']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [], 1, 30], ['18:00:00:00']), ('normal control', ['18:00:00:00', [], 25, 25], ['18:00:00:00']), ('normal control', ['00:00:00:00', [['23:59:59:00', '10:00:29:24']], 0, 30], ['00:00:00:00', '10:00:30:25'])], [('regression: on-air label after black', ['23:59:50:00', [['10:00:00:00', '01:00:30:00'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '15:00:20:26', '16:00:50:27']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '00:00:00:10']], 5, 30], ['00:00:00:00', '00:00:10:06', '23:00:10:17']), ('partial repair probe: on-air label after black', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['23:59:59:00', '00:00:01:00']], 5, 25], ['18:00:00:00', '18:00:01:16', '18:00:03:17']), ('partial repair variant: on-air label after black', ['23:59:50:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['23:59:59:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '23:59:52:06', '15:00:23:02', '15:00:24:03']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['10:00:00:00', '00:00:01:00'], ['23:59:59:00', '10:00:29:24'], ['23:59:59:00', '10:00:29:24']], 0, 25], ['00:00:00:00', '00:00:10:01', '14:00:11:02', '00:00:42:02', '10:01:13:02']), ('normal control', ['18:00:00:00', [], 1, 25], ['18:00:00:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '00:00:00:00'], ['23:59:59:00', '10:00:10:00'], ['00:00:00:00', '10:00:29:24']], 0, 25], ['18:00:00:00', '18:00:00:01', '04:00:11:02', '14:00:41:02'])], [('regression: on-air label after black', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['23:59:59:00', '00:00:01:00']], 5, 25], ['18:00:00:00', '18:00:01:16', '18:00:03:17']), ('regression variant: on-air label after black', ['23:59:50:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['23:59:59:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '23:59:52:06', '15:00:23:02', '15:00:24:03']), ('partial repair probe: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:01:00'], ['10:00:00:00', '00:00:00:10']], 1, 30], ['00:00:00:00', '14:00:01:02', '04:00:01:13']), ('partial repair variant: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:10']], 5, 25], ['23:59:50:00', '13:59:50:11']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '01:00:30:00']], 0, 25], ['18:00:00:00', '18:00:01:11', '18:00:11:12', '18:00:41:13']), ('normal control', ['00:00:00:00', [], 0, 25], ['00:00:00:00']), ('normal control', ['18:00:00:00', [], 5, 25], ['18:00:00:00'])]]
for label, args, expected in fixtures[N-1]:
check(label, 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 |
|---|---|---|---|
| regression: on-air label after black | ['23:59:59:00', '00:00:00:01', '00:00:00:07'] | ['23:59:59:00', '00:00:00:06', '00:00:00:07'] | Failed |
| regression variant: on-air label after black | ['00:00:00:00', '14:00:01:01', '04:00:01:13'] | ['00:00:00:00', '14:00:01:02', '04:00:01:13'] | Failed |
| partial repair probe: on-air label after black | ['18:00:00:00', '19:00:31:01'] | ['18:00:00:00', '19:00:31:01'] | Passed |
| partial repair variant: on-air label after black | ['00:00:00:00', '09:00:29:25', '08:00:30:27', '09:01:01:29'] | ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29'] | Failed |
| boundary control | ['18:00:00:00', '18:00:01:00'] | ['18:00:00:00', '18:00:01:00'] | Passed |
| normal control | ['00:00:00:00'] | ['00:00:00:00'] | Passed |
| normal control | ['23:59:50:00'] | ['23:59:50:00'] | Passed |
| normal control | ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'] | ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'] | Passed |
SHA-256 / d1acd39011fed6a98a940ba5547779fe34ef51fa9af4e8b6dd8456731b8827b8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, clips, gap, fps):
def fr(t):
h,m,s,f=map(int,t.split(':'))
return ((h*60+m)*60+s)*fps+f
def lab(n):
n%=86400*fps
return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
t=fr(start)
out=[]
for i,(som,eom) in enumerate(clips):
if i:
t+=gap
out.append(lab(t+gap))
d=(fr(eom)-fr(som))%(86400*fps)
t+=d+1
out.append(lab(t))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: on-air label after black', ['23:59:59:00', [['00:00:00:00', '00:00:01:00'], ['00:00:00:00', '00:00:00:00']], 5, 25], ['23:59:59:00', '00:00:00:06', '00:00:00:07']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:01:00'], ['10:00:00:00', '00:00:00:10']], 1, 30], ['00:00:00:00', '14:00:01:02', '04:00:01:13']), ('partial repair probe: on-air label after black', ['18:00:00:00', [['23:59:59:00', '01:00:30:00']], 5, 30], ['18:00:00:00', '19:00:31:01']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['01:00:00:00', '10:00:29:24'], ['01:00:00:00', '00:00:01:00'], ['23:59:59:00', '01:00:30:00']], 1, 30], ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['00:00:00:00', [], 25, 25], ['00:00:00:00']), ('normal control', ['23:59:50:00', [], 1, 30], ['23:59:50:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '00:00:01:00'], ['01:00:00:00', '10:00:29:24'], ['23:59:59:00', '00:00:01:00']], 0, 25], ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'])], [('regression: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:10'], ['00:00:00:00', '10:00:29:24'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '13:59:51:06', '00:00:21:26', '01:00:51:27']), ('regression variant: on-air label after black', ['00:00:00:00', [['01:00:00:00', '10:00:29:24'], ['01:00:00:00', '00:00:01:00'], ['23:59:59:00', '01:00:30:00']], 1, 30], ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29']), ('partial repair probe: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '13:59:50:01']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:00:10'], ['23:59:59:00', '00:00:00:00'], ['00:00:00:00', '10:00:10:00']], 25, 25], ['00:00:00:00', '14:00:01:11', '14:00:03:12', '00:00:13:13']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '10:00:29:24'], ['00:00:00:00', '10:00:10:00']], 0, 30], ['18:00:00:00', '04:00:29:25', '14:00:39:26']), ('normal control', ['00:00:00:00', [['00:00:00:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['10:00:00:00', '00:00:01:00'], ['00:00:00:00', '10:00:29:24']], 0, 25], ['00:00:00:00', '00:00:00:11', '15:00:30:12', '05:00:31:13', '15:01:01:13']), ('normal control', ['18:00:00:00', [], 0, 30], ['18:00:00:00'])], [('regression: on-air label after black', ['18:00:00:00', [['01:00:00:00', '00:00:01:00'], ['01:00:00:00', '10:00:10:00'], ['23:59:59:00', '00:00:00:10'], ['00:00:00:00', '00:00:00:10']], 25, 25], ['18:00:00:00', '17:00:02:01', '02:00:13:02', '02:00:15:13', '02:00:15:24']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:00:10'], ['23:59:59:00', '00:00:00:00'], ['00:00:00:00', '10:00:10:00']], 25, 25], ['00:00:00:00', '14:00:01:11', '14:00:03:12', '00:00:13:13']), ('partial repair probe: on-air label after black', ['23:59:50:00', [['10:00:00:00', '01:00:30:00'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '15:00:20:26', '16:00:50:27']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '00:00:00:10']], 5, 30], ['00:00:00:00', '00:00:10:06', '23:00:10:17']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [], 1, 30], ['18:00:00:00']), ('normal control', ['18:00:00:00', [], 25, 25], ['18:00:00:00']), ('normal control', ['00:00:00:00', [['23:59:59:00', '10:00:29:24']], 0, 30], ['00:00:00:00', '10:00:30:25'])], [('regression: on-air label after black', ['23:59:50:00', [['10:00:00:00', '01:00:30:00'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '15:00:20:26', '16:00:50:27']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '00:00:00:10']], 5, 30], ['00:00:00:00', '00:00:10:06', '23:00:10:17']), ('partial repair probe: on-air label after black', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['23:59:59:00', '00:00:01:00']], 5, 25], ['18:00:00:00', '18:00:01:16', '18:00:03:17']), ('partial repair variant: on-air label after black', ['23:59:50:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['23:59:59:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '23:59:52:06', '15:00:23:02', '15:00:24:03']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['10:00:00:00', '00:00:01:00'], ['23:59:59:00', '10:00:29:24'], ['23:59:59:00', '10:00:29:24']], 0, 25], ['00:00:00:00', '00:00:10:01', '14:00:11:02', '00:00:42:02', '10:01:13:02']), ('normal control', ['18:00:00:00', [], 1, 25], ['18:00:00:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '00:00:00:00'], ['23:59:59:00', '10:00:10:00'], ['00:00:00:00', '10:00:29:24']], 0, 25], ['18:00:00:00', '18:00:00:01', '04:00:11:02', '14:00:41:02'])], [('regression: on-air label after black', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['23:59:59:00', '00:00:01:00']], 5, 25], ['18:00:00:00', '18:00:01:16', '18:00:03:17']), ('regression variant: on-air label after black', ['23:59:50:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['23:59:59:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '23:59:52:06', '15:00:23:02', '15:00:24:03']), ('partial repair probe: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:01:00'], ['10:00:00:00', '00:00:00:10']], 1, 30], ['00:00:00:00', '14:00:01:02', '04:00:01:13']), ('partial repair variant: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:10']], 5, 25], ['23:59:50:00', '13:59:50:11']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '01:00:30:00']], 0, 25], ['18:00:00:00', '18:00:01:11', '18:00:11:12', '18:00:41:13']), ('normal control', ['00:00:00:00', [], 0, 25], ['00:00:00:00']), ('normal control', ['18:00:00:00', [], 5, 25], ['18:00:00:00'])]]
for label, args, expected in fixtures[N-1]:
check(label, 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 |
|---|---|---|---|
| regression: on-air label after black | ['23:59:59:05', '00:00:00:11', '00:00:00:07'] | ['23:59:59:00', '00:00:00:06', '00:00:00:07'] | Failed |
| regression variant: on-air label after black | ['00:00:00:01', '14:00:01:03', '04:00:01:13'] | ['00:00:00:00', '14:00:01:02', '04:00:01:13'] | Failed |
| partial repair probe: on-air label after black | ['18:00:00:05', '19:00:31:01'] | ['18:00:00:00', '19:00:31:01'] | Failed |
| partial repair variant: on-air label after black | ['00:00:00:01', '09:00:29:27', '08:00:30:29', '09:01:01:29'] | ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29'] | Failed |
| boundary control | ['18:00:00:00', '18:00:01:00'] | ['18:00:00:00', '18:00:01:00'] | Passed |
| normal control | ['00:00:00:00'] | ['00:00:00:00'] | Passed |
| normal control | ['23:59:50:00'] | ['23:59:50:00'] | Passed |
| normal control | ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'] | ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'] | Passed |
SHA-256 / 3b0ada426dfd8043cb275a2c42655aaedda16a789467db3db9a860299a0c2105
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(start, clips, gap, fps):
def fr(t):
h,m,s,f=map(int,t.split(':'))
return ((h*60+m)*60+s)*fps+f
def lab(n):
n%=86400*fps
return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
t=fr(start)
out=[]
for i,(som,eom) in enumerate(clips):
if i:
t+=gap
out.append(lab(t))
d=(fr(eom)-fr(som))%(86400*fps)
t+=d+1
out.append(lab(t))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: on-air label after black', ['23:59:59:00', [['00:00:00:00', '00:00:01:00'], ['00:00:00:00', '00:00:00:00']], 5, 25], ['23:59:59:00', '00:00:00:06', '00:00:00:07']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:01:00'], ['10:00:00:00', '00:00:00:10']], 1, 30], ['00:00:00:00', '14:00:01:02', '04:00:01:13']), ('partial repair probe: on-air label after black', ['18:00:00:00', [['23:59:59:00', '01:00:30:00']], 5, 30], ['18:00:00:00', '19:00:31:01']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['01:00:00:00', '10:00:29:24'], ['01:00:00:00', '00:00:01:00'], ['23:59:59:00', '01:00:30:00']], 1, 30], ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['00:00:00:00', [], 25, 25], ['00:00:00:00']), ('normal control', ['23:59:50:00', [], 1, 30], ['23:59:50:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '00:00:01:00'], ['01:00:00:00', '10:00:29:24'], ['23:59:59:00', '00:00:01:00']], 0, 25], ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'])], [('regression: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:10'], ['00:00:00:00', '10:00:29:24'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '13:59:51:06', '00:00:21:26', '01:00:51:27']), ('regression variant: on-air label after black', ['00:00:00:00', [['01:00:00:00', '10:00:29:24'], ['01:00:00:00', '00:00:01:00'], ['23:59:59:00', '01:00:30:00']], 1, 30], ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29']), ('partial repair probe: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '13:59:50:01']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:00:10'], ['23:59:59:00', '00:00:00:00'], ['00:00:00:00', '10:00:10:00']], 25, 25], ['00:00:00:00', '14:00:01:11', '14:00:03:12', '00:00:13:13']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '10:00:29:24'], ['00:00:00:00', '10:00:10:00']], 0, 30], ['18:00:00:00', '04:00:29:25', '14:00:39:26']), ('normal control', ['00:00:00:00', [['00:00:00:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['10:00:00:00', '00:00:01:00'], ['00:00:00:00', '10:00:29:24']], 0, 25], ['00:00:00:00', '00:00:00:11', '15:00:30:12', '05:00:31:13', '15:01:01:13']), ('normal control', ['18:00:00:00', [], 0, 30], ['18:00:00:00'])], [('regression: on-air label after black', ['18:00:00:00', [['01:00:00:00', '00:00:01:00'], ['01:00:00:00', '10:00:10:00'], ['23:59:59:00', '00:00:00:10'], ['00:00:00:00', '00:00:00:10']], 25, 25], ['18:00:00:00', '17:00:02:01', '02:00:13:02', '02:00:15:13', '02:00:15:24']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:00:10'], ['23:59:59:00', '00:00:00:00'], ['00:00:00:00', '10:00:10:00']], 25, 25], ['00:00:00:00', '14:00:01:11', '14:00:03:12', '00:00:13:13']), ('partial repair probe: on-air label after black', ['23:59:50:00', [['10:00:00:00', '01:00:30:00'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '15:00:20:26', '16:00:50:27']), ('partial repair variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '00:00:00:10']], 5, 30], ['00:00:00:00', '00:00:10:06', '23:00:10:17']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [], 1, 30], ['18:00:00:00']), ('normal control', ['18:00:00:00', [], 25, 25], ['18:00:00:00']), ('normal control', ['00:00:00:00', [['23:59:59:00', '10:00:29:24']], 0, 30], ['00:00:00:00', '10:00:30:25'])], [('regression: on-air label after black', ['23:59:50:00', [['10:00:00:00', '01:00:30:00'], ['00:00:00:00', '01:00:30:00']], 25, 30], ['23:59:50:00', '15:00:20:26', '16:00:50:27']), ('regression variant: on-air label after black', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '00:00:00:10']], 5, 30], ['00:00:00:00', '00:00:10:06', '23:00:10:17']), ('partial repair probe: on-air label after black', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['23:59:59:00', '00:00:01:00']], 5, 25], ['18:00:00:00', '18:00:01:16', '18:00:03:17']), ('partial repair variant: on-air label after black', ['23:59:50:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['23:59:59:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '23:59:52:06', '15:00:23:02', '15:00:24:03']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['00:00:00:00', [['10:00:00:00', '10:00:10:00'], ['10:00:00:00', '00:00:01:00'], ['23:59:59:00', '10:00:29:24'], ['23:59:59:00', '10:00:29:24']], 0, 25], ['00:00:00:00', '00:00:10:01', '14:00:11:02', '00:00:42:02', '10:01:13:02']), ('normal control', ['18:00:00:00', [], 1, 25], ['18:00:00:00']), ('normal control', ['18:00:00:00', [['00:00:00:00', '00:00:00:00'], ['23:59:59:00', '10:00:10:00'], ['00:00:00:00', '10:00:29:24']], 0, 25], ['18:00:00:00', '18:00:00:01', '04:00:11:02', '14:00:41:02'])], [('regression: on-air label after black', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['23:59:59:00', '00:00:01:00']], 5, 25], ['18:00:00:00', '18:00:01:16', '18:00:03:17']), ('regression variant: on-air label after black', ['23:59:50:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '01:00:30:00'], ['23:59:59:00', '00:00:00:00']], 25, 30], ['23:59:50:00', '23:59:52:06', '15:00:23:02', '15:00:24:03']), ('partial repair probe: on-air label after black', ['00:00:00:00', [['10:00:00:00', '00:00:01:00'], ['10:00:00:00', '00:00:00:10']], 1, 30], ['00:00:00:00', '14:00:01:02', '04:00:01:13']), ('partial repair variant: on-air label after black', ['23:59:50:00', [['10:00:00:00', '00:00:00:10']], 5, 25], ['23:59:50:00', '13:59:50:11']), ('boundary control', ['18:00:00:00', [['10:00:00:00', '10:00:00:24']], 0, 25], ['18:00:00:00', '18:00:01:00']), ('normal control', ['18:00:00:00', [['23:59:59:00', '00:00:00:10'], ['10:00:00:00', '10:00:10:00'], ['01:00:00:00', '01:00:30:00']], 0, 25], ['18:00:00:00', '18:00:01:11', '18:00:11:12', '18:00:41:13']), ('normal control', ['00:00:00:00', [], 0, 25], ['00:00:00:00']), ('normal control', ['18:00:00:00', [], 5, 25], ['18:00:00:00'])]]
for label, args, expected in fixtures[N-1]:
check(label, 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 |
|---|---|---|---|
| regression: on-air label after black | ['23:59:59:00', '00:00:00:06', '00:00:00:07'] | ['23:59:59:00', '00:00:00:06', '00:00:00:07'] | Passed |
| regression variant: on-air label after black | ['00:00:00:00', '14:00:01:02', '04:00:01:13'] | ['00:00:00:00', '14:00:01:02', '04:00:01:13'] | Passed |
| partial repair probe: on-air label after black | ['18:00:00:00', '19:00:31:01'] | ['18:00:00:00', '19:00:31:01'] | Passed |
| partial repair variant: on-air label after black | ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29'] | ['00:00:00:00', '09:00:29:26', '08:00:30:28', '09:01:01:29'] | Passed |
| boundary control | ['18:00:00:00', '18:00:01:00'] | ['18:00:00:00', '18:00:01:00'] | Passed |
| normal control | ['00:00:00:00'] | ['00:00:00:00'] | Passed |
| normal control | ['23:59:50:00'] | ['23:59:50:00'] | Passed |
| normal control | ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'] | ['18:00:00:00', '18:00:01:01', '03:00:31:01', '03:00:33:02'] | Passed |
SHA-256 / a2785be7341e15c138998eb84bd9b962f03f93952751df9ac56f9f69aca504a5
Verification & scope
A deterministic bounded teaching model with a stipulated toy contract; it does not claim conformance to SMPTE or any broadcast 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:49:37.970584+00:00.
Case digest / 5f93aa0e1bfc7f2054a7fb1422b6543cde5d091df9c8c4b94a2cf69933f5555c