FAILURE MAP
← Case archive

FA-78476 / Broadcast timecode arithmetic / Open access

Field-wise non-drop timecode addition: seconds carry-in · case 01

Sums whose frames overflow lose a whole second.

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

ROOT CAUSE

The frame carry is not added into the seconds.

VERIFIED REPAIR

Add the frame carry into the seconds sum.

Unsuccessful approach: Recomputing the carry from the already reduced frame field always yields zero.

Case contract

Add two valid non-drop labels at integer fps field by field with carries (frames into seconds at fps, seconds into minutes at 60, minutes into hours at 60) and wrap hours modulo 24.

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(a, b, fps):
    x=[int(v) for v in a.split(':')]
    y=[int(v) for v in b.split(':')]
    f=x[3]+y[3]
    c=f//fps
    f%=fps
    s=x[2]+y[2]
    c=s//60
    s%=60
    m=x[1]+y[1]+c
    c=m//60
    m%=60
    h=(x[0]+y[0]+c)%24
    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: seconds carry-in', ['00:00:00:12', '00:00:00:13', 25], '00:00:01:00'), ('regression variant: seconds carry-in', ['00:59:59:15', '23:30:00:29', 30], '00:30:00:14'), ('partial repair probe: seconds carry-in', ['23:59:59:29', '00:00:00:01', 30], '00:00:00:00'), ('partial repair variant: seconds carry-in', ['12:59:01:15', '12:59:30:15', 30], '01:58:32:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['00:59:01:00', '01:00:30:12', 25], '01:59:31:12'), ('normal control', ['00:59:30:00', '00:00:59:01', 30], '01:00:29:01'), ('normal control', ['23:00:01:24', '23:00:00:00', 25], '22:00:01:24')], [('regression: seconds carry-in', ['00:00:59:24', '00:00:00:01', 25], '00:01:00:00'), ('regression variant: seconds carry-in', ['12:00:59:12', '00:59:59:24', 25], '13:00:59:11'), ('partial repair probe: seconds carry-in', ['01:30:30:15', '01:59:30:15', 30], '03:30:01:00'), ('partial repair variant: seconds carry-in', ['12:59:00:29', '00:00:00:15', 30], '12:59:01:14'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['00:00:59:12', '00:01:01:12', 25], '00:02:00:24'), ('normal control', ['01:59:30:24', '12:01:00:00', 25], '14:00:30:24'), ('normal control', ['00:59:59:01', '23:01:59:00', 25], '00:01:58:01')], [('regression: seconds carry-in', ['23:59:59:29', '00:00:00:01', 30], '00:00:00:00'), ('regression variant: seconds carry-in', ['01:00:00:29', '00:30:00:15', 30], '01:30:01:14'), ('partial repair probe: seconds carry-in', ['12:00:00:12', '12:00:01:24', 25], '00:00:02:11'), ('partial repair variant: seconds carry-in', ['01:01:00:15', '01:59:00:15', 30], '03:00:01:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['12:01:01:15', '12:01:00:00', 30], '00:02:01:15'), ('normal control', ['12:30:01:00', '01:30:59:00', 24], '14:01:00:00'), ('normal control', ['00:00:00:12', '23:00:01:01', 25], '23:00:01:13')], [('regression: seconds carry-in', ['01:30:30:15', '01:59:30:15', 30], '03:30:01:00'), ('regression variant: seconds carry-in', ['12:00:30:23', '01:00:30:01', 24], '13:01:01:00'), ('partial repair probe: seconds carry-in', ['00:59:59:15', '23:30:00:29', 30], '00:30:00:14'), ('partial repair variant: seconds carry-in', ['00:30:00:15', '23:01:59:15', 30], '23:32:00:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['23:30:00:00', '23:01:30:00', 24], '22:31:30:00'), ('normal control', ['00:30:59:00', '12:59:01:15', 30], '13:30:00:15'), ('normal control', ['23:01:59:12', '23:01:30:00', 25], '22:03:29:12')], [('regression: seconds carry-in', ['12:00:00:12', '12:00:01:24', 25], '00:00:02:11'), ('regression variant: seconds carry-in', ['12:59:01:15', '12:59:30:15', 30], '01:58:32:00'), ('partial repair probe: seconds carry-in', ['12:00:59:12', '00:59:59:24', 25], '13:00:59:11'), ('partial repair variant: seconds carry-in', ['23:30:59:12', '12:59:30:12', 24], '12:30:30:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['01:59:01:12', '12:01:01:01', 25], '14:00:02:13'), ('normal control', ['23:30:01:12', '00:01:59:12', 25], '23:32:00:24'), ('normal control', ['00:00:01:00', '01:01:30:00', 24], '01:01:31: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 fixtureActualExpectedOutcome
regression: seconds carry-in00:00:00:0000:00:01:00Failed
regression variant: seconds carry-in00:29:59:1400:30:00:14Failed
partial repair probe: seconds carry-in23:59:59:0000:00:00:00Failed
partial repair variant: seconds carry-in01:58:31:0001:58:32:00Failed
boundary control00:00:00:0000:00:00:00Passed
normal control01:59:31:1201:59:31:12Passed
normal control01:00:29:0101:00:29:01Passed
normal control22:00:01:2422:00:01:24Passed

SHA-256 / ced26ac873e36e0d0aae6601ede31668fefa1ef5e463cc30b5f7a8b941a29f75

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(a, b, fps):
    x=[int(v) for v in a.split(':')]
    y=[int(v) for v in b.split(':')]
    f=x[3]+y[3]
    c=f//fps
    f%=fps
    s=x[2]+y[2]+f//fps
    c=s//60
    s%=60
    m=x[1]+y[1]+c
    c=m//60
    m%=60
    h=(x[0]+y[0]+c)%24
    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: seconds carry-in', ['00:00:00:12', '00:00:00:13', 25], '00:00:01:00'), ('regression variant: seconds carry-in', ['00:59:59:15', '23:30:00:29', 30], '00:30:00:14'), ('partial repair probe: seconds carry-in', ['23:59:59:29', '00:00:00:01', 30], '00:00:00:00'), ('partial repair variant: seconds carry-in', ['12:59:01:15', '12:59:30:15', 30], '01:58:32:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['00:59:01:00', '01:00:30:12', 25], '01:59:31:12'), ('normal control', ['00:59:30:00', '00:00:59:01', 30], '01:00:29:01'), ('normal control', ['23:00:01:24', '23:00:00:00', 25], '22:00:01:24')], [('regression: seconds carry-in', ['00:00:59:24', '00:00:00:01', 25], '00:01:00:00'), ('regression variant: seconds carry-in', ['12:00:59:12', '00:59:59:24', 25], '13:00:59:11'), ('partial repair probe: seconds carry-in', ['01:30:30:15', '01:59:30:15', 30], '03:30:01:00'), ('partial repair variant: seconds carry-in', ['12:59:00:29', '00:00:00:15', 30], '12:59:01:14'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['00:00:59:12', '00:01:01:12', 25], '00:02:00:24'), ('normal control', ['01:59:30:24', '12:01:00:00', 25], '14:00:30:24'), ('normal control', ['00:59:59:01', '23:01:59:00', 25], '00:01:58:01')], [('regression: seconds carry-in', ['23:59:59:29', '00:00:00:01', 30], '00:00:00:00'), ('regression variant: seconds carry-in', ['01:00:00:29', '00:30:00:15', 30], '01:30:01:14'), ('partial repair probe: seconds carry-in', ['12:00:00:12', '12:00:01:24', 25], '00:00:02:11'), ('partial repair variant: seconds carry-in', ['01:01:00:15', '01:59:00:15', 30], '03:00:01:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['12:01:01:15', '12:01:00:00', 30], '00:02:01:15'), ('normal control', ['12:30:01:00', '01:30:59:00', 24], '14:01:00:00'), ('normal control', ['00:00:00:12', '23:00:01:01', 25], '23:00:01:13')], [('regression: seconds carry-in', ['01:30:30:15', '01:59:30:15', 30], '03:30:01:00'), ('regression variant: seconds carry-in', ['12:00:30:23', '01:00:30:01', 24], '13:01:01:00'), ('partial repair probe: seconds carry-in', ['00:59:59:15', '23:30:00:29', 30], '00:30:00:14'), ('partial repair variant: seconds carry-in', ['00:30:00:15', '23:01:59:15', 30], '23:32:00:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['23:30:00:00', '23:01:30:00', 24], '22:31:30:00'), ('normal control', ['00:30:59:00', '12:59:01:15', 30], '13:30:00:15'), ('normal control', ['23:01:59:12', '23:01:30:00', 25], '22:03:29:12')], [('regression: seconds carry-in', ['12:00:00:12', '12:00:01:24', 25], '00:00:02:11'), ('regression variant: seconds carry-in', ['12:59:01:15', '12:59:30:15', 30], '01:58:32:00'), ('partial repair probe: seconds carry-in', ['12:00:59:12', '00:59:59:24', 25], '13:00:59:11'), ('partial repair variant: seconds carry-in', ['23:30:59:12', '12:59:30:12', 24], '12:30:30:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['01:59:01:12', '12:01:01:01', 25], '14:00:02:13'), ('normal control', ['23:30:01:12', '00:01:59:12', 25], '23:32:00:24'), ('normal control', ['00:00:01:00', '01:01:30:00', 24], '01:01:31: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 fixtureActualExpectedOutcome
regression: seconds carry-in00:00:00:0000:00:01:00Failed
regression variant: seconds carry-in00:29:59:1400:30:00:14Failed
partial repair probe: seconds carry-in23:59:59:0000:00:00:00Failed
partial repair variant: seconds carry-in01:58:31:0001:58:32:00Failed
boundary control00:00:00:0000:00:00:00Passed
normal control01:59:31:1201:59:31:12Passed
normal control01:00:29:0101:00:29:01Passed
normal control22:00:01:2422:00:01:24Passed

SHA-256 / 1ecfd2d7c69192746d89c993b5e9532bff3ff26a28943e37032dd6e2273f7c8b

3 / The verified repair

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

N = 1
observations = []
def solve(a, b, fps):
    x=[int(v) for v in a.split(':')]
    y=[int(v) for v in b.split(':')]
    f=x[3]+y[3]
    c=f//fps
    f%=fps
    s=x[2]+y[2]+c
    c=s//60
    s%=60
    m=x[1]+y[1]+c
    c=m//60
    m%=60
    h=(x[0]+y[0]+c)%24
    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: seconds carry-in', ['00:00:00:12', '00:00:00:13', 25], '00:00:01:00'), ('regression variant: seconds carry-in', ['00:59:59:15', '23:30:00:29', 30], '00:30:00:14'), ('partial repair probe: seconds carry-in', ['23:59:59:29', '00:00:00:01', 30], '00:00:00:00'), ('partial repair variant: seconds carry-in', ['12:59:01:15', '12:59:30:15', 30], '01:58:32:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['00:59:01:00', '01:00:30:12', 25], '01:59:31:12'), ('normal control', ['00:59:30:00', '00:00:59:01', 30], '01:00:29:01'), ('normal control', ['23:00:01:24', '23:00:00:00', 25], '22:00:01:24')], [('regression: seconds carry-in', ['00:00:59:24', '00:00:00:01', 25], '00:01:00:00'), ('regression variant: seconds carry-in', ['12:00:59:12', '00:59:59:24', 25], '13:00:59:11'), ('partial repair probe: seconds carry-in', ['01:30:30:15', '01:59:30:15', 30], '03:30:01:00'), ('partial repair variant: seconds carry-in', ['12:59:00:29', '00:00:00:15', 30], '12:59:01:14'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['00:00:59:12', '00:01:01:12', 25], '00:02:00:24'), ('normal control', ['01:59:30:24', '12:01:00:00', 25], '14:00:30:24'), ('normal control', ['00:59:59:01', '23:01:59:00', 25], '00:01:58:01')], [('regression: seconds carry-in', ['23:59:59:29', '00:00:00:01', 30], '00:00:00:00'), ('regression variant: seconds carry-in', ['01:00:00:29', '00:30:00:15', 30], '01:30:01:14'), ('partial repair probe: seconds carry-in', ['12:00:00:12', '12:00:01:24', 25], '00:00:02:11'), ('partial repair variant: seconds carry-in', ['01:01:00:15', '01:59:00:15', 30], '03:00:01:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['12:01:01:15', '12:01:00:00', 30], '00:02:01:15'), ('normal control', ['12:30:01:00', '01:30:59:00', 24], '14:01:00:00'), ('normal control', ['00:00:00:12', '23:00:01:01', 25], '23:00:01:13')], [('regression: seconds carry-in', ['01:30:30:15', '01:59:30:15', 30], '03:30:01:00'), ('regression variant: seconds carry-in', ['12:00:30:23', '01:00:30:01', 24], '13:01:01:00'), ('partial repair probe: seconds carry-in', ['00:59:59:15', '23:30:00:29', 30], '00:30:00:14'), ('partial repair variant: seconds carry-in', ['00:30:00:15', '23:01:59:15', 30], '23:32:00:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['23:30:00:00', '23:01:30:00', 24], '22:31:30:00'), ('normal control', ['00:30:59:00', '12:59:01:15', 30], '13:30:00:15'), ('normal control', ['23:01:59:12', '23:01:30:00', 25], '22:03:29:12')], [('regression: seconds carry-in', ['12:00:00:12', '12:00:01:24', 25], '00:00:02:11'), ('regression variant: seconds carry-in', ['12:59:01:15', '12:59:30:15', 30], '01:58:32:00'), ('partial repair probe: seconds carry-in', ['12:00:59:12', '00:59:59:24', 25], '13:00:59:11'), ('partial repair variant: seconds carry-in', ['23:30:59:12', '12:59:30:12', 24], '12:30:30:00'), ('boundary control', ['00:00:00:00', '00:00:00:00', 24], '00:00:00:00'), ('normal control', ['01:59:01:12', '12:01:01:01', 25], '14:00:02:13'), ('normal control', ['23:30:01:12', '00:01:59:12', 25], '23:32:00:24'), ('normal control', ['00:00:01:00', '01:01:30:00', 24], '01:01:31: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 fixtureActualExpectedOutcome
regression: seconds carry-in00:00:01:0000:00:01:00Passed
regression variant: seconds carry-in00:30:00:1400:30:00:14Passed
partial repair probe: seconds carry-in00:00:00:0000:00:00:00Passed
partial repair variant: seconds carry-in01:58:32:0001:58:32:00Passed
boundary control00:00:00:0000:00:00:00Passed
normal control01:59:31:1201:59:31:12Passed
normal control01:00:29:0101:00:29:01Passed
normal control22:00:01:2422:00:01:24Passed

SHA-256 / 493314532526e9b6d41d6b55541f675c0844e86d0d071a2e620ba1f697d2bc8c

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.664919+00:00.

Case digest / d21e6208f6380144dbc80f5b0c12f784f3a0e9fadce4698f4c756589659e2074