FAILURE MAP
← Case archive

FA-78511 / Broadcast timecode arithmetic / Open access

EDL speed-change record out: record out exclusivity · case 01

Record out labels are one frame early, colliding with the next event.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The record out is reported as the inclusive last frame.

THE FAILURE

The record out is reported as the inclusive last frame.

Unsuccessful approach: Using the source duration ignores the speed change on the record side.

Case contract

event [src_in, src_out, rec_in, speed_percent] with non-drop labels at fps; src_out is exclusive and may cross midnight. Record duration = source frames * 100 / |speed| rounded half up (reverse speeds use the magnitude; speed 0 returns None). Return [record_out label (exclusive, wrapped at 24 h), record duration].

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(event, fps):
    def fr(t):
        h,m,s,f=map(int,t.split(':'))
        return ((h*60+m)*60+s)*fps+f
    def tc(n):
        n%=86400*fps
        return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
    src_in,src_out,rec_in,speed=event
    if speed==0:
        return None
    sp=abs(speed)
    dur=(fr(src_out)-fr(src_in))%(86400*fps)
    rec=(dur*200+sp)//(2*sp)
    return [tc(fr(rec_in)+rec-1),rec]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: record out exclusivity', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('regression variant: record out exclusivity', [['00:29:01:12', '10:00:59:01', '23:00:59:01', -100], 24], ['08:32:56:14', 823621]), ('partial repair probe: record out exclusivity', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('partial repair variant: record out exclusivity', [['10:59:00:23', '00:00:30:00', '23:00:30:00', -50], 24], ['01:03:28:02', 2250674]), ('normal control', [['10:29:00:24', '23:01:59:00', '00:59:59:00', 0], 25], None), ('normal control', [['23:01:00:23', '23:29:01:00', '00:59:59:00', 0], 24], None), ('normal control', [['10:29:00:29', '10:59:01:29', '01:29:00:00', 0], 30], None)], [('regression: record out exclusivity', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('regression variant: record out exclusivity', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('partial repair probe: record out exclusivity', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('partial repair variant: record out exclusivity', [['23:00:30:01', '00:29:59:29', '00:29:59:29', 75], 30], ['02:29:19:26', 214797]), ('normal control', [['00:01:30:00', '23:59:30:24', '01:29:00:00', 0], 25], None), ('normal control', [['10:59:30:12', '23:59:00:23', '23:29:01:00', 0], 24], None), ('normal control', [['00:29:59:01', '10:01:30:01', '00:01:01:29', 0], 30], None)], [('regression: record out exclusivity', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('regression variant: record out exclusivity', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('partial repair probe: record out exclusivity', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('partial repair variant: record out exclusivity', [['23:59:30:01', '00:00:01:01', '00:59:01:00', 75], 24], ['00:59:42:08', 992]), ('normal control', [['23:01:01:23', '01:59:00:00', '00:29:59:12', 0], 24], None), ('normal control', [['01:01:01:00', '00:01:01:01', '00:29:59:12', 0], 25], None), ('normal control', [['01:00:00:15', '23:01:59:29', '23:29:00:01', 0], 30], None)], [('regression: record out exclusivity', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('regression variant: record out exclusivity', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('partial repair probe: record out exclusivity', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('partial repair variant: record out exclusivity', [['01:59:00:00', '23:59:01:00', '00:59:01:01', 200], 24], ['11:59:01:13', 950412]), ('normal control', [['00:01:01:00', '01:29:01:00', '01:59:59:29', 0], 30], None), ('normal control', [['00:01:30:00', '23:59:01:23', '01:00:30:12', 0], 24], None), ('normal control', [['23:59:30:12', '10:59:01:24', '00:00:01:01', 0], 25], None)], [('regression: record out exclusivity', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('regression variant: record out exclusivity', [['01:59:30:12', '23:00:01:24', '23:00:30:01', 100], 25], ['20:01:01:13', 1890787]), ('partial repair probe: record out exclusivity', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('partial repair variant: record out exclusivity', [['00:01:00:01', '00:29:01:23', '23:00:01:00', 250], 24], ['23:11:13:18', 16146]), ('normal control', [['00:00:59:00', '00:01:00:01', '23:59:01:15', 0], 30], None), ('normal control', [['01:00:30:24', '00:00:00:12', '00:01:01:01', 0], 25], None), ('normal control', [['01:00:00:12', '10:29:59:01', '01:01:59:00', 0], 25], 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 fixtureActualExpectedOutcome
regression: record out exclusivity['10:00:01:24', 50]['10:00:02:00', 50]Failed
regression variant: record out exclusivity['08:32:56:13', 823621]['08:32:56:14', 823621]Failed
partial repair probe: record out exclusivity['20:35:49:20', 6263709]['20:35:49:21', 6263709]Failed
partial repair variant: record out exclusivity['01:03:28:01', 2250674]['01:03:28:02', 2250674]Failed
normal controlNoneNonePassed
normal controlNoneNonePassed
normal controlNoneNonePassed

SHA-256 / 258790c4f85ba9c044dc743fa12e7a5f62c32d68096ead834b52b25cd28e35cd

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, fps):
    def fr(t):
        h,m,s,f=map(int,t.split(':'))
        return ((h*60+m)*60+s)*fps+f
    def tc(n):
        n%=86400*fps
        return '%02d:%02d:%02d:%02d'%(n//(3600*fps),n//(60*fps)%60,n//fps%60,n%fps)
    src_in,src_out,rec_in,speed=event
    if speed==0:
        return None
    sp=abs(speed)
    dur=(fr(src_out)-fr(src_in))%(86400*fps)
    rec=(dur*200+sp)//(2*sp)
    return [tc(fr(rec_in)+dur),rec]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: record out exclusivity', [['01:00:00:00', '01:00:01:00', '10:00:00:00', 50], 25], ['10:00:02:00', 50]), ('regression variant: record out exclusivity', [['00:29:01:12', '10:00:59:01', '23:00:59:01', -100], 24], ['08:32:56:14', 823621]), ('partial repair probe: record out exclusivity', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('partial repair variant: record out exclusivity', [['10:59:00:23', '00:00:30:00', '23:00:30:00', -50], 24], ['01:03:28:02', 2250674]), ('normal control', [['10:29:00:24', '23:01:59:00', '00:59:59:00', 0], 25], None), ('normal control', [['23:01:00:23', '23:29:01:00', '00:59:59:00', 0], 24], None), ('normal control', [['10:29:00:29', '10:59:01:29', '01:29:00:00', 0], 30], None)], [('regression: record out exclusivity', [['23:59:59:00', '00:00:01:00', '00:00:00:00', 100], 25], ['00:00:02:00', 50]), ('regression variant: record out exclusivity', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('partial repair probe: record out exclusivity', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('partial repair variant: record out exclusivity', [['23:00:30:01', '00:29:59:29', '00:29:59:29', 75], 30], ['02:29:19:26', 214797]), ('normal control', [['00:01:30:00', '23:59:30:24', '01:29:00:00', 0], 25], None), ('normal control', [['10:59:30:12', '23:59:00:23', '23:29:01:00', 0], 24], None), ('normal control', [['00:29:59:01', '10:01:30:01', '00:01:01:29', 0], 30], None)], [('regression: record out exclusivity', [['00:00:00:00', '00:00:00:03', '00:00:00:00', 200], 30], ['00:00:00:02', 2]), ('regression variant: record out exclusivity', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('partial repair probe: record out exclusivity', [['23:01:00:00', '01:01:00:23', '01:00:30:12', 75], 24], ['03:40:31:19', 230431]), ('partial repair variant: record out exclusivity', [['23:59:30:01', '00:00:01:01', '00:59:01:00', 75], 24], ['00:59:42:08', 992]), ('normal control', [['23:01:01:23', '01:59:00:00', '00:29:59:12', 0], 24], None), ('normal control', [['01:01:01:00', '00:01:01:01', '00:29:59:12', 0], 25], None), ('normal control', [['01:00:00:15', '23:01:59:29', '23:29:00:01', 0], 30], None)], [('regression: record out exclusivity', [['00:01:59:01', '23:00:00:00', '23:00:01:12', 33], 25], ['20:35:49:21', 6263709]), ('regression variant: record out exclusivity', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('partial repair probe: record out exclusivity', [['01:59:30:00', '00:59:01:01', '23:29:59:00', 200], 30], ['10:59:44:16', 1241566]), ('partial repair variant: record out exclusivity', [['01:59:00:00', '23:59:01:00', '00:59:01:01', 200], 24], ['11:59:01:13', 950412]), ('normal control', [['00:01:01:00', '01:29:01:00', '01:59:59:29', 0], 30], None), ('normal control', [['00:01:30:00', '23:59:01:23', '01:00:30:12', 0], 24], None), ('normal control', [['23:59:30:12', '10:59:01:24', '00:00:01:01', 0], 25], None)], [('regression: record out exclusivity', [['10:01:00:12', '00:00:01:00', '23:29:30:24', 200], 25], ['06:29:01:06', 629257]), ('regression variant: record out exclusivity', [['01:59:30:12', '23:00:01:24', '23:00:30:01', 100], 25], ['20:01:01:13', 1890787]), ('partial repair probe: record out exclusivity', [['01:00:59:00', '00:01:30:01', '23:29:01:12', 250], 24], ['08:41:13:22', 795178]), ('partial repair variant: record out exclusivity', [['00:01:00:01', '00:29:01:23', '23:00:01:00', 250], 24], ['23:11:13:18', 16146]), ('normal control', [['00:00:59:00', '00:01:00:01', '23:59:01:15', 0], 30], None), ('normal control', [['01:00:30:24', '00:00:00:12', '00:01:01:01', 0], 25], None), ('normal control', [['01:00:00:12', '10:29:59:01', '01:01:59:00', 0], 25], 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 fixtureActualExpectedOutcome
regression: record out exclusivity['10:00:01:00', 50]['10:00:02:00', 50]Failed
regression variant: record out exclusivity['08:32:56:14', 823621]['08:32:56:14', 823621]Passed
partial repair probe: record out exclusivity['21:58:02:11', 6263709]['20:35:49:21', 6263709]Failed
partial repair variant: record out exclusivity['12:01:59:01', 2250674]['01:03:28:02', 2250674]Failed
normal controlNoneNonePassed
normal controlNoneNonePassed
normal controlNoneNonePassed

SHA-256 / 8ce7e2741bfc964ed41c05e00217ab915a975a6fba11630f9fcde7265a7631de

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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:35.942628+00:00.

Case digest / 1e794c6ba5fe9ae9ec10f25092fdf89bbbeaca84301c5d674554a1f69f82b6ac