FA-78391 / Broadcast timecode arithmetic / Open access
Drop-frame 29.97 label to frame count: drop separator set · case 01
Labels using the period or comma drop-frame spelling are rejected.
ROOT CAUSE
Only the semicolon is accepted as the drop-frame separator.
THE FAILURE
Only the semicolon is accepted as the drop-frame separator.
Unsuccessful approach: Accepting a colon instead admits non-drop labels while still refusing the period and comma forms.
Case contract
Parse HH:MM:SS;FF drop-frame 29.97 labels (the last separator may be ";", "," or "."). Labels ;00 and ;01 at second 00 of minutes not divisible by 10 do not exist and return None, as do out-of-range fields (hours 0-23, frames 0-29). Frame count = nominal 30 fps count minus 2 per elapsed minute except every tenth minute.
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):
m=re.fullmatch(r'(\d{2}):(\d{2}):(\d{2});(\d{2})',tc)
if not m:
return None
h,mi,s,f=map(int,m.groups())
if h>23 or mi>59 or s>59:
return None
if f>29:
return None
if s==0 and f<2 and mi%10!=0:
return None
tm=h*60+mi
return (tm*60+s)*30+f-2*(tm-tm//10)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: drop separator set', ['23:00:00.02'], 2481518), ('regression variant: drop separator set', ['23:20:00,00'], 2517480), ('partial repair probe: drop separator set', ['09:59:01.03'], 1077153), ('partial repair variant: drop separator set', ['01:01:00,02'], 109692), ('boundary control', ['00:01:00;02'], 1800), ('boundary control', ['01:00:00;00'], 107892), ('normal control', ['00:01:00;00'], None), ('normal control', ['00:00:59;29'], 1799), ('normal control', ['23:59:59;29'], 2589407)], [('regression: drop separator set', ['09:59:01.03'], 1077153), ('regression variant: drop separator set', ['01:01:00,02'], 109692), ('partial repair probe: drop separator set', ['23:10:01.01'], 2499529), ('partial repair variant: drop separator set', ['09:00:01,29'], 971087), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['24:00:00:31'], None), ('normal control', ['09:11:60.03'], None), ('normal control', ['24:20:59,31'], None)], [('regression: drop separator set', ['23:10:01.01'], 2499529), ('regression variant: drop separator set', ['09:00:01,29'], 971087), ('partial repair probe: drop separator set', ['00:11:00.03'], 19783), ('partial repair variant: drop separator set', ['23:09:00,15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['23:59:59;29'], 2589407), ('normal control', ['00:01:01;03'], 1831), ('normal control', ['01:60:00,02'], None), ('normal control', ['23:59:60,00'], None)], [('regression: drop separator set', ['00:11:00.03'], 19783), ('regression variant: drop separator set', ['23:09:00,15'], 2497713), ('partial repair probe: drop separator set', ['09:00:01.02'], 971060), ('partial repair variant: drop separator set', ['00:01:00.15'], 1813), ('boundary control', ['01:00:00;00'], 107892), ('boundary control', ['00:01:00;02'], 1800), ('normal control', ['23:11:59;00'], 2503066), ('normal control', ['01:20:60;00'], None), ('normal control', ['09:60:00:31'], None)], [('regression: drop separator set', ['09:00:01.02'], 971060), ('regression variant: drop separator set', ['00:01:00.15'], 1813), ('partial repair probe: drop separator set', ['23:00:01:29'], None), ('partial repair variant: drop separator set', ['09:10:00,02'], 989012), ('boundary control', ['00:00:59;29'], 1799), ('boundary control', ['00:01:00;00'], None), ('normal control', ['01:11:01;30'], None), ('normal control', ['24:60:01:02'], None), ('normal control', ['01:59:60;30'], None)]]
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: drop separator set | None | 2481518 | Failed |
| regression variant: drop separator set | None | 2517480 | Failed |
| partial repair probe: drop separator set | None | 1077153 | Failed |
| partial repair variant: drop separator set | None | 109692 | Failed |
| boundary control | 1800 | 1800 | Passed |
| boundary control | 107892 | 107892 | Passed |
| normal control | None | None | Passed |
| normal control | 1799 | 1799 | Passed |
| normal control | 2589407 | 2589407 | Passed |
SHA-256 / 7349c0fa202b48353cb6b29460f93967af56235f81e4d26e4c7ec7428bc1b839
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc):
m=re.fullmatch(r'(\d{2}):(\d{2}):(\d{2})[;:](\d{2})',tc)
if not m:
return None
h,mi,s,f=map(int,m.groups())
if h>23 or mi>59 or s>59:
return None
if f>29:
return None
if s==0 and f<2 and mi%10!=0:
return None
tm=h*60+mi
return (tm*60+s)*30+f-2*(tm-tm//10)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: drop separator set', ['23:00:00.02'], 2481518), ('regression variant: drop separator set', ['23:20:00,00'], 2517480), ('partial repair probe: drop separator set', ['09:59:01.03'], 1077153), ('partial repair variant: drop separator set', ['01:01:00,02'], 109692), ('boundary control', ['00:01:00;02'], 1800), ('boundary control', ['01:00:00;00'], 107892), ('normal control', ['00:01:00;00'], None), ('normal control', ['00:00:59;29'], 1799), ('normal control', ['23:59:59;29'], 2589407)], [('regression: drop separator set', ['09:59:01.03'], 1077153), ('regression variant: drop separator set', ['01:01:00,02'], 109692), ('partial repair probe: drop separator set', ['23:10:01.01'], 2499529), ('partial repair variant: drop separator set', ['09:00:01,29'], 971087), ('boundary control', ['00:01:00;00'], None), ('boundary control', ['00:00:59;29'], 1799), ('normal control', ['24:00:00:31'], None), ('normal control', ['09:11:60.03'], None), ('normal control', ['24:20:59,31'], None)], [('regression: drop separator set', ['23:10:01.01'], 2499529), ('regression variant: drop separator set', ['09:00:01,29'], 971087), ('partial repair probe: drop separator set', ['00:11:00.03'], 19783), ('partial repair variant: drop separator set', ['23:09:00,15'], 2497713), ('boundary control', ['00:10:00;00'], 17982), ('boundary control', ['23:59:59;29'], 2589407), ('normal control', ['00:01:01;03'], 1831), ('normal control', ['01:60:00,02'], None), ('normal control', ['23:59:60,00'], None)], [('regression: drop separator set', ['00:11:00.03'], 19783), ('regression variant: drop separator set', ['23:09:00,15'], 2497713), ('partial repair probe: drop separator set', ['09:00:01.02'], 971060), ('partial repair variant: drop separator set', ['00:01:00.15'], 1813), ('boundary control', ['01:00:00;00'], 107892), ('boundary control', ['00:01:00;02'], 1800), ('normal control', ['23:11:59;00'], 2503066), ('normal control', ['01:20:60;00'], None), ('normal control', ['09:60:00:31'], None)], [('regression: drop separator set', ['09:00:01.02'], 971060), ('regression variant: drop separator set', ['00:01:00.15'], 1813), ('partial repair probe: drop separator set', ['23:00:01:29'], None), ('partial repair variant: drop separator set', ['09:10:00,02'], 989012), ('boundary control', ['00:00:59;29'], 1799), ('boundary control', ['00:01:00;00'], None), ('normal control', ['01:11:01;30'], None), ('normal control', ['24:60:01:02'], None), ('normal control', ['01:59:60;30'], None)]]
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: drop separator set | None | 2481518 | Failed |
| regression variant: drop separator set | None | 2517480 | Failed |
| partial repair probe: drop separator set | None | 1077153 | Failed |
| partial repair variant: drop separator set | None | 109692 | Failed |
| boundary control | 1800 | 1800 | Passed |
| boundary control | 107892 | 107892 | Passed |
| normal control | None | None | Passed |
| normal control | 1799 | 1799 | Passed |
| normal control | 2589407 | 2589407 | Passed |
SHA-256 / 960c390e8a5ae4202ae21f93ae5b6048ec4e8360d666133c031620c1b5ce7444
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:34.726784+00:00.
Case digest / 33ac84ec72a5d7f5eba9d6a8605992696c7b5fb44d16ab3d9733a92c0cf37c3e