FA-78446 / Broadcast timecode arithmetic / Open access
Drop-frame label increment: second carry · case 01
Labels with a seconds field of 60 appear.
ROOT CAUSE
Seconds carry only after exceeding 60.
VERIFIED REPAIR
Carry into the minute when seconds reach 60.
Unsuccessful approach: Carrying at 59 drops the last second of every minute.
Case contract
Given a valid drop-frame label at rate "29.97" (nominal 30, drop 2) or "59.94" (nominal 60, drop 4), return the next label: frames carry into seconds at the nominal rate, seconds into minutes, minutes into hours (wrapping at 24); on entering a new minute not divisible by 10 the first drop labels are skipped.
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
import re
N = 1
observations = []
def solve(tc, rate):
n=30 if rate=='29.97' else 60
drop=2 if n==30 else 4
h,m,s,f=map(int,re.split('[:;]',tc))
f+=1
if f==n:
f=0
s+=1
if s>60:
s=0
m+=1
if m==60:
m=0
h=(h+1)%24
if m%10!=0:
f=drop
return '%02d:%02d:%02d;%02d'%(h,m,s,f)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: second carry', ['00:00:59;29', '29.97'], '00:01:00;02'), ('regression variant: second carry', ['09:10:59;29', '29.97'], '09:11:00;02'), ('partial repair probe: second carry', ['00:00:59;59', '59.94'], '00:01:00;04'), ('partial repair variant: second carry', ['01:10:58;29', '29.97'], '01:10:59;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['01:01:01;02', '29.97'], '01:01:01;03'), ('normal control', ['09:19:58;05', '59.94'], '09:19:58;06'), ('normal control', ['09:19:59;58', '59.94'], '09:19:59;59')], [('regression: second carry', ['00:09:59;29', '29.97'], '00:10:00;00'), ('regression variant: second carry', ['09:00:59;29', '29.97'], '09:01:00;02'), ('partial repair probe: second carry', ['23:59:59;29', '29.97'], '00:00:00;00'), ('partial repair variant: second carry', ['23:09:59;29', '29.97'], '23:10:00;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['01:00:59;02', '29.97'], '01:00:59;03'), ('normal control', ['09:01:01;00', '29.97'], '09:01:01;01'), ('normal control', ['01:29:58;58', '59.94'], '01:29:58;59')], [('regression: second carry', ['00:00:59;59', '59.94'], '00:01:00;04'), ('regression variant: second carry', ['23:59:59;59', '59.94'], '00:00:00;00'), ('partial repair probe: second carry', ['09:01:59;29', '29.97'], '09:02:00;02'), ('partial repair variant: second carry', ['00:59:59;59', '59.94'], '01:00:00;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['23:00:00;00', '59.94'], '23:00:00;01'), ('normal control', ['23:59:59;03', '59.94'], '23:59:59;04'), ('normal control', ['23:01:58;03', '29.97'], '23:01:58;04')], [('regression: second carry', ['23:59:59;29', '29.97'], '00:00:00;00'), ('regression variant: second carry', ['23:09:59;59', '59.94'], '23:10:00;00'), ('partial repair probe: second carry', ['09:10:59;29', '29.97'], '09:11:00;02'), ('partial repair variant: second carry', ['01:00:59;29', '29.97'], '01:01:00;02'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['00:09:01;00', '59.94'], '00:09:01;01'), ('normal control', ['23:19:59;05', '59.94'], '23:19:59;06'), ('normal control', ['09:59:59;30', '59.94'], '09:59:59;31')], [('regression: second carry', ['09:01:59;29', '29.97'], '09:02:00;02'), ('regression variant: second carry', ['23:09:59;29', '29.97'], '23:10:00;00'), ('partial repair probe: second carry', ['09:00:59;29', '29.97'], '09:01:00;02'), ('partial repair variant: second carry', ['01:01:59;59', '59.94'], '01:02:00;04'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['00:10:01;59', '59.94'], '00:10:02;00'), ('normal control', ['23:00:59;58', '59.94'], '23:00:59;59'), ('normal control', ['00:29:58;00', '29.97'], '00:29:58;01')]]
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: second carry | 00:00:60;00 | 00:01:00;02 | Failed |
| regression variant: second carry | 09:10:60;00 | 09:11:00;02 | Failed |
| partial repair probe: second carry | 00:00:60;00 | 00:01:00;04 | Failed |
| partial repair variant: second carry | 01:10:59;00 | 01:10:59;00 | Passed |
| boundary control | 00:01:00;03 | 00:01:00;03 | Passed |
| normal control | 01:01:01;03 | 01:01:01;03 | Passed |
| normal control | 09:19:58;06 | 09:19:58;06 | Passed |
| normal control | 09:19:59;59 | 09:19:59;59 | Passed |
SHA-256 / ad5bb594e3641512f33e2b2404500edf5a216f6723465ab6d9217ba5b55e8559
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc, rate):
n=30 if rate=='29.97' else 60
drop=2 if n==30 else 4
h,m,s,f=map(int,re.split('[:;]',tc))
f+=1
if f==n:
f=0
s+=1
if s==59:
s=0
m+=1
if m==60:
m=0
h=(h+1)%24
if m%10!=0:
f=drop
return '%02d:%02d:%02d;%02d'%(h,m,s,f)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: second carry', ['00:00:59;29', '29.97'], '00:01:00;02'), ('regression variant: second carry', ['09:10:59;29', '29.97'], '09:11:00;02'), ('partial repair probe: second carry', ['00:00:59;59', '59.94'], '00:01:00;04'), ('partial repair variant: second carry', ['01:10:58;29', '29.97'], '01:10:59;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['01:01:01;02', '29.97'], '01:01:01;03'), ('normal control', ['09:19:58;05', '59.94'], '09:19:58;06'), ('normal control', ['09:19:59;58', '59.94'], '09:19:59;59')], [('regression: second carry', ['00:09:59;29', '29.97'], '00:10:00;00'), ('regression variant: second carry', ['09:00:59;29', '29.97'], '09:01:00;02'), ('partial repair probe: second carry', ['23:59:59;29', '29.97'], '00:00:00;00'), ('partial repair variant: second carry', ['23:09:59;29', '29.97'], '23:10:00;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['01:00:59;02', '29.97'], '01:00:59;03'), ('normal control', ['09:01:01;00', '29.97'], '09:01:01;01'), ('normal control', ['01:29:58;58', '59.94'], '01:29:58;59')], [('regression: second carry', ['00:00:59;59', '59.94'], '00:01:00;04'), ('regression variant: second carry', ['23:59:59;59', '59.94'], '00:00:00;00'), ('partial repair probe: second carry', ['09:01:59;29', '29.97'], '09:02:00;02'), ('partial repair variant: second carry', ['00:59:59;59', '59.94'], '01:00:00;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['23:00:00;00', '59.94'], '23:00:00;01'), ('normal control', ['23:59:59;03', '59.94'], '23:59:59;04'), ('normal control', ['23:01:58;03', '29.97'], '23:01:58;04')], [('regression: second carry', ['23:59:59;29', '29.97'], '00:00:00;00'), ('regression variant: second carry', ['23:09:59;59', '59.94'], '23:10:00;00'), ('partial repair probe: second carry', ['09:10:59;29', '29.97'], '09:11:00;02'), ('partial repair variant: second carry', ['01:00:59;29', '29.97'], '01:01:00;02'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['00:09:01;00', '59.94'], '00:09:01;01'), ('normal control', ['23:19:59;05', '59.94'], '23:19:59;06'), ('normal control', ['09:59:59;30', '59.94'], '09:59:59;31')], [('regression: second carry', ['09:01:59;29', '29.97'], '09:02:00;02'), ('regression variant: second carry', ['23:09:59;29', '29.97'], '23:10:00;00'), ('partial repair probe: second carry', ['09:00:59;29', '29.97'], '09:01:00;02'), ('partial repair variant: second carry', ['01:01:59;59', '59.94'], '01:02:00;04'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['00:10:01;59', '59.94'], '00:10:02;00'), ('normal control', ['23:00:59;58', '59.94'], '23:00:59;59'), ('normal control', ['00:29:58;00', '29.97'], '00:29:58;01')]]
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: second carry | 00:00:60;00 | 00:01:00;02 | Failed |
| regression variant: second carry | 09:10:60;00 | 09:11:00;02 | Failed |
| partial repair probe: second carry | 00:00:60;00 | 00:01:00;04 | Failed |
| partial repair variant: second carry | 01:11:00;02 | 01:10:59;00 | Failed |
| boundary control | 00:01:00;03 | 00:01:00;03 | Passed |
| normal control | 01:01:01;03 | 01:01:01;03 | Passed |
| normal control | 09:19:58;06 | 09:19:58;06 | Passed |
| normal control | 09:19:59;59 | 09:19:59;59 | Passed |
SHA-256 / f4daf0cc8979ae2130c14de197b5740334b1daccfd074e613980faf6b0b1c2a8
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc, rate):
n=30 if rate=='29.97' else 60
drop=2 if n==30 else 4
h,m,s,f=map(int,re.split('[:;]',tc))
f+=1
if f==n:
f=0
s+=1
if s==60:
s=0
m+=1
if m==60:
m=0
h=(h+1)%24
if m%10!=0:
f=drop
return '%02d:%02d:%02d;%02d'%(h,m,s,f)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: second carry', ['00:00:59;29', '29.97'], '00:01:00;02'), ('regression variant: second carry', ['09:10:59;29', '29.97'], '09:11:00;02'), ('partial repair probe: second carry', ['00:00:59;59', '59.94'], '00:01:00;04'), ('partial repair variant: second carry', ['01:10:58;29', '29.97'], '01:10:59;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['01:01:01;02', '29.97'], '01:01:01;03'), ('normal control', ['09:19:58;05', '59.94'], '09:19:58;06'), ('normal control', ['09:19:59;58', '59.94'], '09:19:59;59')], [('regression: second carry', ['00:09:59;29', '29.97'], '00:10:00;00'), ('regression variant: second carry', ['09:00:59;29', '29.97'], '09:01:00;02'), ('partial repair probe: second carry', ['23:59:59;29', '29.97'], '00:00:00;00'), ('partial repair variant: second carry', ['23:09:59;29', '29.97'], '23:10:00;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['01:00:59;02', '29.97'], '01:00:59;03'), ('normal control', ['09:01:01;00', '29.97'], '09:01:01;01'), ('normal control', ['01:29:58;58', '59.94'], '01:29:58;59')], [('regression: second carry', ['00:00:59;59', '59.94'], '00:01:00;04'), ('regression variant: second carry', ['23:59:59;59', '59.94'], '00:00:00;00'), ('partial repair probe: second carry', ['09:01:59;29', '29.97'], '09:02:00;02'), ('partial repair variant: second carry', ['00:59:59;59', '59.94'], '01:00:00;00'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['23:00:00;00', '59.94'], '23:00:00;01'), ('normal control', ['23:59:59;03', '59.94'], '23:59:59;04'), ('normal control', ['23:01:58;03', '29.97'], '23:01:58;04')], [('regression: second carry', ['23:59:59;29', '29.97'], '00:00:00;00'), ('regression variant: second carry', ['23:09:59;59', '59.94'], '23:10:00;00'), ('partial repair probe: second carry', ['09:10:59;29', '29.97'], '09:11:00;02'), ('partial repair variant: second carry', ['01:00:59;29', '29.97'], '01:01:00;02'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['00:09:01;00', '59.94'], '00:09:01;01'), ('normal control', ['23:19:59;05', '59.94'], '23:19:59;06'), ('normal control', ['09:59:59;30', '59.94'], '09:59:59;31')], [('regression: second carry', ['09:01:59;29', '29.97'], '09:02:00;02'), ('regression variant: second carry', ['23:09:59;29', '29.97'], '23:10:00;00'), ('partial repair probe: second carry', ['09:00:59;29', '29.97'], '09:01:00;02'), ('partial repair variant: second carry', ['01:01:59;59', '59.94'], '01:02:00;04'), ('boundary control', ['00:01:00;02', '29.97'], '00:01:00;03'), ('normal control', ['00:10:01;59', '59.94'], '00:10:02;00'), ('normal control', ['23:00:59;58', '59.94'], '23:00:59;59'), ('normal control', ['00:29:58;00', '29.97'], '00:29:58;01')]]
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: second carry | 00:01:00;02 | 00:01:00;02 | Passed |
| regression variant: second carry | 09:11:00;02 | 09:11:00;02 | Passed |
| partial repair probe: second carry | 00:01:00;04 | 00:01:00;04 | Passed |
| partial repair variant: second carry | 01:10:59;00 | 01:10:59;00 | Passed |
| boundary control | 00:01:00;03 | 00:01:00;03 | Passed |
| normal control | 01:01:01;03 | 01:01:01;03 | Passed |
| normal control | 09:19:58;06 | 09:19:58;06 | Passed |
| normal control | 09:19:59;59 | 09:19:59;59 | Passed |
SHA-256 / 4ab2b4954aac388cc9d9d4d4cfd524253ce07f25e9015e440c7ce71c62e5d5ff
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:35.323493+00:00.
Case digest / ec3955fac3b42b3a6cf03896d690ea20e8694532589b0b7df4d010f3a067c631