FA-77886 / Subtitle cue timing / Open access
SRT and WebVTT timestamp formatting: vtt short separator · case 01
Short WebVTT timestamps contain a comma and are rejected by players.
ROOT CAUSE
The short WebVTT branch reuses the SRT comma before the milliseconds.
THE FAILURE
The short WebVTT branch reuses the SRT comma before the milliseconds.
Unsuccessful approach: Switching to a period but dropping the minute padding writes 5:03.000, which the contract forbids.
Case contract
Format integer milliseconds as a cue timestamp. Negative values clamp to 0. style "srt" gives HH:MM:SS,mmm (hours at least two digits, never wrapped); style "vtt" gives MM:SS.mmm when the hour field is zero and HH:MM:SS.mmm otherwise.
Why this case matters
Subtitle timing defects shift, hide or overlap captions that viewers depend on for comprehension and accessibility.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ms, style):
if ms<0: ms=0
h=ms//3600000
m=(ms-h*3600000)//60000
s=ms//1000%60
f=ms%1000
if style=='srt':
return '%02d:%02d:%02d,%03d'%(h,m,s,f)
if h==0:
return '%02d:%02d,%03d'%(m,s,f)
return '%02d:%02d:%02d.%03d'%(h,m,s,f)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: vtt short separator', [0, 'vtt'], '00:00.000'), ('regression variant: vtt short separator', [353272, 'vtt'], '05:53.272'), ('partial repair probe: vtt short separator', [-999, 'vtt'], '00:00.000'), ('partial repair variant: vtt short separator', [110, 'vtt'], '00:00.110'), ('boundary control', [0, 'srt'], '00:00:00,000'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('normal control', [3600000, 'vtt'], '01:00:00.000'), ('normal control', [7834, 'srt'], '00:00:07,834'), ('normal control', [4082731, 'srt'], '01:08:02,731')], [('regression: vtt short separator', [3599999, 'vtt'], '59:59.999'), ('regression variant: vtt short separator', [60000, 'vtt'], '01:00.000'), ('partial repair probe: vtt short separator', [353272, 'vtt'], '05:53.272'), ('partial repair variant: vtt short separator', [61977, 'vtt'], '01:01.977'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('boundary control', [3600000, 'vtt'], '01:00:00.000'), ('normal control', [274754132, 'srt'], '76:19:14,132'), ('normal control', [334598, 'srt'], '00:05:34,598'), ('normal control', [60000, 'srt'], '00:01:00,000')], [('regression: vtt short separator', [61001, 'vtt'], '01:01.001'), ('regression variant: vtt short separator', [55880, 'vtt'], '00:55.880'), ('partial repair probe: vtt short separator', [60000, 'vtt'], '01:00.000'), ('partial repair variant: vtt short separator', [153727, 'vtt'], '02:33.727'), ('boundary control', [3600000, 'vtt'], '01:00:00.000'), ('boundary control', [0, 'srt'], '00:00:00,000'), ('normal control', [5, 'srt'], '00:00:00,005'), ('normal control', [360000000, 'srt'], '100:00:00,000'), ('normal control', [-1000, 'srt'], '00:00:00,000')], [('regression: vtt short separator', [3192469, 'vtt'], '53:12.469'), ('regression variant: vtt short separator', [11761, 'vtt'], '00:11.761'), ('partial repair probe: vtt short separator', [55880, 'vtt'], '00:55.880'), ('partial repair variant: vtt short separator', [37938, 'vtt'], '00:37.938'), ('boundary control', [0, 'srt'], '00:00:00,000'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('normal control', [3509491, 'srt'], '00:58:29,491'), ('normal control', [3441818, 'srt'], '00:57:21,818'), ('normal control', [22968, 'srt'], '00:00:22,968')], [('regression: vtt short separator', [-999, 'vtt'], '00:00.000'), ('regression variant: vtt short separator', [-5000, 'vtt'], '00:00.000'), ('partial repair probe: vtt short separator', [11761, 'vtt'], '00:11.761'), ('partial repair variant: vtt short separator', [37617, 'vtt'], '00:37.617'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('boundary control', [3600000, 'vtt'], '01:00:00.000'), ('normal control', [3673366, 'srt'], '01:01:13,366'), ('normal control', [3854981, 'srt'], '01:04:14,981'), ('normal control', [65993, 'srt'], '00:01:05,993')]]
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: vtt short separator | 00:00,000 | 00:00.000 | Failed |
| regression variant: vtt short separator | 05:53,272 | 05:53.272 | Failed |
| partial repair probe: vtt short separator | 00:00,000 | 00:00.000 | Failed |
| partial repair variant: vtt short separator | 00:00,110 | 00:00.110 | Failed |
| boundary control | 00:00:00,000 | 00:00:00,000 | Passed |
| boundary control | 00:00:00,000 | 00:00:00,000 | Passed |
| normal control | 01:00:00.000 | 01:00:00.000 | Passed |
| normal control | 00:00:07,834 | 00:00:07,834 | Passed |
| normal control | 01:08:02,731 | 01:08:02,731 | Passed |
SHA-256 / 45217aa5f3966d4d67716f0f9faab62ff6bf8442efdcec11417d221fe58a9286
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ms, style):
if ms<0: ms=0
h=ms//3600000
m=(ms-h*3600000)//60000
s=ms//1000%60
f=ms%1000
if style=='srt':
return '%02d:%02d:%02d,%03d'%(h,m,s,f)
if h==0:
return '%d:%02d.%03d'%(m,s,f)
return '%02d:%02d:%02d.%03d'%(h,m,s,f)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: vtt short separator', [0, 'vtt'], '00:00.000'), ('regression variant: vtt short separator', [353272, 'vtt'], '05:53.272'), ('partial repair probe: vtt short separator', [-999, 'vtt'], '00:00.000'), ('partial repair variant: vtt short separator', [110, 'vtt'], '00:00.110'), ('boundary control', [0, 'srt'], '00:00:00,000'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('normal control', [3600000, 'vtt'], '01:00:00.000'), ('normal control', [7834, 'srt'], '00:00:07,834'), ('normal control', [4082731, 'srt'], '01:08:02,731')], [('regression: vtt short separator', [3599999, 'vtt'], '59:59.999'), ('regression variant: vtt short separator', [60000, 'vtt'], '01:00.000'), ('partial repair probe: vtt short separator', [353272, 'vtt'], '05:53.272'), ('partial repair variant: vtt short separator', [61977, 'vtt'], '01:01.977'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('boundary control', [3600000, 'vtt'], '01:00:00.000'), ('normal control', [274754132, 'srt'], '76:19:14,132'), ('normal control', [334598, 'srt'], '00:05:34,598'), ('normal control', [60000, 'srt'], '00:01:00,000')], [('regression: vtt short separator', [61001, 'vtt'], '01:01.001'), ('regression variant: vtt short separator', [55880, 'vtt'], '00:55.880'), ('partial repair probe: vtt short separator', [60000, 'vtt'], '01:00.000'), ('partial repair variant: vtt short separator', [153727, 'vtt'], '02:33.727'), ('boundary control', [3600000, 'vtt'], '01:00:00.000'), ('boundary control', [0, 'srt'], '00:00:00,000'), ('normal control', [5, 'srt'], '00:00:00,005'), ('normal control', [360000000, 'srt'], '100:00:00,000'), ('normal control', [-1000, 'srt'], '00:00:00,000')], [('regression: vtt short separator', [3192469, 'vtt'], '53:12.469'), ('regression variant: vtt short separator', [11761, 'vtt'], '00:11.761'), ('partial repair probe: vtt short separator', [55880, 'vtt'], '00:55.880'), ('partial repair variant: vtt short separator', [37938, 'vtt'], '00:37.938'), ('boundary control', [0, 'srt'], '00:00:00,000'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('normal control', [3509491, 'srt'], '00:58:29,491'), ('normal control', [3441818, 'srt'], '00:57:21,818'), ('normal control', [22968, 'srt'], '00:00:22,968')], [('regression: vtt short separator', [-999, 'vtt'], '00:00.000'), ('regression variant: vtt short separator', [-5000, 'vtt'], '00:00.000'), ('partial repair probe: vtt short separator', [11761, 'vtt'], '00:11.761'), ('partial repair variant: vtt short separator', [37617, 'vtt'], '00:37.617'), ('boundary control', [-1, 'srt'], '00:00:00,000'), ('boundary control', [3600000, 'vtt'], '01:00:00.000'), ('normal control', [3673366, 'srt'], '01:01:13,366'), ('normal control', [3854981, 'srt'], '01:04:14,981'), ('normal control', [65993, 'srt'], '00:01:05,993')]]
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: vtt short separator | 0:00.000 | 00:00.000 | Failed |
| regression variant: vtt short separator | 5:53.272 | 05:53.272 | Failed |
| partial repair probe: vtt short separator | 0:00.000 | 00:00.000 | Failed |
| partial repair variant: vtt short separator | 0:00.110 | 00:00.110 | Failed |
| boundary control | 00:00:00,000 | 00:00:00,000 | Passed |
| boundary control | 00:00:00,000 | 00:00:00,000 | Passed |
| normal control | 01:00:00.000 | 01:00:00.000 | Passed |
| normal control | 00:00:07,834 | 00:00:07,834 | Passed |
| normal control | 01:08:02,731 | 01:08:02,731 | Passed |
SHA-256 / 314435d758ef3437e37bf1383af12abb2eb6b9a59d67ab75bae353b682fd21aa
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 any subtitle 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:30.060036+00:00.
Case digest / f28b5e51fe996247191d186fc65acba1758d3ac578b83540e64507bcffefc994