{"abstract":"A malformed timestamp such as 00:60:00,000 is accepted and silently becomes one hour.","category":"Subtitle cue timing","checks":9,"contract":"Parse an SRT timestamp HH:MM:SS,mmm to integer milliseconds. Hours have 2 or more digits, minutes and seconds are below 60, the fraction has 1 to 3 digits and is right-padded (\",5\" means 500 ms), \".\" is accepted as the separator, surrounding whitespace (including a CR from CRLF files) is ignored; invalid text returns None.","evaluation_group":"w2-subtitle-cue-timing-srt-parse","failed_approach":"Fixing only the minute bound still lets a seconds field of exactly 60 roll into the next minute.","family":"w2-subtitle-cue-timing-srt-parse-minute-and-second-range","id":"FA-77851","implementations":{"attempt":{"sha256":"b568922ad63f04221173b08dae00d009d9cf522fb3c3fc0968eeef0a07507dce","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    s=s.strip()\n    parts=s.replace('.',',').split(',')\n    if len(parts)!=2: return None\n    hms,frac=parts\n    fields=hms.split(':')\n    if len(fields)!=3: return None\n    if not all(p.isdigit() for p in fields) or not frac.isdigit(): return None\n    if len(frac)>3: return None\n    h,mi,se=int(fields[0]),int(fields[1]),int(fields[2])\n    if mi>=60 or se>60: return None\n    ms=int(frac.ljust(3,'0'))\n    return h*3600000+mi*60000+se*1000+ms\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: minute and second range', ['00:60:00,000'], None), ('regression variant: minute and second range', ['10:60:60,07 '], None), ('partial repair probe: minute and second range', ['00:00:60,07'], None), ('partial repair variant: minute and second range', ['02:00:60,12\\r'], None), ('boundary control', ['00:00:00,000'], 0), ('boundary control', ['00:59:59,999\\r'], 3599999), ('normal control', ['00:00:01,5'], 1500), ('normal control', ['100:00:00,000'], 360000000), ('normal control', ['00:61:00;5 \\r'], None)], [('regression: minute and second range', ['123:60:59,5'], None), ('regression variant: minute and second range', ['00:00:60,07'], None), ('partial repair probe: minute and second range', [' 02:30:60.500 '], None), ('partial repair variant: minute and second range', ['01:05:60,999 '], None), ('boundary control', ['00:00:01,5'], 1500), ('boundary control', ['100:00:00,000'], 360000000), ('normal control', [' 10:60:42;50\\r'], None), ('normal control', ['99:00:59,001 \\r'], 356459001), ('normal control', ['00:00:60.1234 '], None)], [('regression: minute and second range', [' 00:30:60,500'], None), ('regression variant: minute and second range', [' 99:60:00.000'], None), ('partial repair probe: minute and second range', ['99:30:60.000'], None), ('partial repair variant: minute and second range', ['99:30:60,001 '], None), ('boundary control', ['01:02:03.004'], 3723004), ('boundary control', ['00:00:00,000'], 0), ('normal control', [' 10:00:61.001\\r'], None), ('normal control', ['99:30:00,'], None), ('normal control', [' 00:61:42,000'], None)], [('regression: minute and second range', [' 00:00:60,12 '], None), ('regression variant: minute and second range', ['99:60:59,12 \\r'], None), ('partial repair probe: minute and second range', [' 10:30:60,5\\r'], None), ('partial repair variant: minute and second range', ['00:59:60,07 '], None), ('boundary control', ['00:59:59,999\\r'], 3599999), ('boundary control', ['00:00:01,5'], 1500), ('normal control', [' 10:05:00.000'], 36300000), ('normal control', [' 00:05:00.5 '], 300500), ('normal control', ['123:05:01,001\\t'], 443101001)], [('regression: minute and second range', ['123:60:42,999'], None), ('regression variant: minute and second range', ['100:60:60,999 '], None), ('partial repair probe: minute and second range', ['123:00:60.07\\t'], None), ('partial repair variant: minute and second range', ['100:05:60,001\\t'], None), ('boundary control', ['100:00:00,000'], 360000000), ('boundary control', ['01:02:03.004'], 3723004), ('normal control', ['123:00:61,001 \\r'], None), ('normal control', ['100:59:42.001\\r'], 363582001), ('normal control', [' 10:30:61;001 '], None)]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"11a09d9cd248dc289157ba5e0d20d22c8c60b0bb7cb3b91d00ec8256e0959cc3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    s=s.strip()\n    parts=s.replace('.',',').split(',')\n    if len(parts)!=2: return None\n    hms,frac=parts\n    fields=hms.split(':')\n    if len(fields)!=3: return None\n    if not all(p.isdigit() for p in fields) or not frac.isdigit(): return None\n    if len(frac)>3: return None\n    h,mi,se=int(fields[0]),int(fields[1]),int(fields[2])\n    if mi>60 or se>60: return None\n    ms=int(frac.ljust(3,'0'))\n    return h*3600000+mi*60000+se*1000+ms\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: minute and second range', ['00:60:00,000'], None), ('regression variant: minute and second range', ['10:60:60,07 '], None), ('partial repair probe: minute and second range', ['00:00:60,07'], None), ('partial repair variant: minute and second range', ['02:00:60,12\\r'], None), ('boundary control', ['00:00:00,000'], 0), ('boundary control', ['00:59:59,999\\r'], 3599999), ('normal control', ['00:00:01,5'], 1500), ('normal control', ['100:00:00,000'], 360000000), ('normal control', ['00:61:00;5 \\r'], None)], [('regression: minute and second range', ['123:60:59,5'], None), ('regression variant: minute and second range', ['00:00:60,07'], None), ('partial repair probe: minute and second range', [' 02:30:60.500 '], None), ('partial repair variant: minute and second range', ['01:05:60,999 '], None), ('boundary control', ['00:00:01,5'], 1500), ('boundary control', ['100:00:00,000'], 360000000), ('normal control', [' 10:60:42;50\\r'], None), ('normal control', ['99:00:59,001 \\r'], 356459001), ('normal control', ['00:00:60.1234 '], None)], [('regression: minute and second range', [' 00:30:60,500'], None), ('regression variant: minute and second range', [' 99:60:00.000'], None), ('partial repair probe: minute and second range', ['99:30:60.000'], None), ('partial repair variant: minute and second range', ['99:30:60,001 '], None), ('boundary control', ['01:02:03.004'], 3723004), ('boundary control', ['00:00:00,000'], 0), ('normal control', [' 10:00:61.001\\r'], None), ('normal control', ['99:30:00,'], None), ('normal control', [' 00:61:42,000'], None)], [('regression: minute and second range', [' 00:00:60,12 '], None), ('regression variant: minute and second range', ['99:60:59,12 \\r'], None), ('partial repair probe: minute and second range', [' 10:30:60,5\\r'], None), ('partial repair variant: minute and second range', ['00:59:60,07 '], None), ('boundary control', ['00:59:59,999\\r'], 3599999), ('boundary control', ['00:00:01,5'], 1500), ('normal control', [' 10:05:00.000'], 36300000), ('normal control', [' 00:05:00.5 '], 300500), ('normal control', ['123:05:01,001\\t'], 443101001)], [('regression: minute and second range', ['123:60:42,999'], None), ('regression variant: minute and second range', ['100:60:60,999 '], None), ('partial repair probe: minute and second range', ['123:00:60.07\\t'], None), ('partial repair variant: minute and second range', ['100:05:60,001\\t'], None), ('boundary control', ['100:00:00,000'], 360000000), ('boundary control', ['01:02:03.004'], 3723004), ('normal control', ['123:00:61,001 \\r'], None), ('normal control', ['100:59:42.001\\r'], 363582001), ('normal control', [' 10:30:61;001 '], None)]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"b320c3ddf333d2d4b97233ac5121c4d0406a4aef4db3b9d6c696d4603f9474ab","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    s=s.strip()\n    parts=s.replace('.',',').split(',')\n    if len(parts)!=2: return None\n    hms,frac=parts\n    fields=hms.split(':')\n    if len(fields)!=3: return None\n    if not all(p.isdigit() for p in fields) or not frac.isdigit(): return None\n    if len(frac)>3: return None\n    h,mi,se=int(fields[0]),int(fields[1]),int(fields[2])\n    if mi>=60 or se>=60: return None\n    ms=int(frac.ljust(3,'0'))\n    return h*3600000+mi*60000+se*1000+ms\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: minute and second range', ['00:60:00,000'], None), ('regression variant: minute and second range', ['10:60:60,07 '], None), ('partial repair probe: minute and second range', ['00:00:60,07'], None), ('partial repair variant: minute and second range', ['02:00:60,12\\r'], None), ('boundary control', ['00:00:00,000'], 0), ('boundary control', ['00:59:59,999\\r'], 3599999), ('normal control', ['00:00:01,5'], 1500), ('normal control', ['100:00:00,000'], 360000000), ('normal control', ['00:61:00;5 \\r'], None)], [('regression: minute and second range', ['123:60:59,5'], None), ('regression variant: minute and second range', ['00:00:60,07'], None), ('partial repair probe: minute and second range', [' 02:30:60.500 '], None), ('partial repair variant: minute and second range', ['01:05:60,999 '], None), ('boundary control', ['00:00:01,5'], 1500), ('boundary control', ['100:00:00,000'], 360000000), ('normal control', [' 10:60:42;50\\r'], None), ('normal control', ['99:00:59,001 \\r'], 356459001), ('normal control', ['00:00:60.1234 '], None)], [('regression: minute and second range', [' 00:30:60,500'], None), ('regression variant: minute and second range', [' 99:60:00.000'], None), ('partial repair probe: minute and second range', ['99:30:60.000'], None), ('partial repair variant: minute and second range', ['99:30:60,001 '], None), ('boundary control', ['01:02:03.004'], 3723004), ('boundary control', ['00:00:00,000'], 0), ('normal control', [' 10:00:61.001\\r'], None), ('normal control', ['99:30:00,'], None), ('normal control', [' 00:61:42,000'], None)], [('regression: minute and second range', [' 00:00:60,12 '], None), ('regression variant: minute and second range', ['99:60:59,12 \\r'], None), ('partial repair probe: minute and second range', [' 10:30:60,5\\r'], None), ('partial repair variant: minute and second range', ['00:59:60,07 '], None), ('boundary control', ['00:59:59,999\\r'], 3599999), ('boundary control', ['00:00:01,5'], 1500), ('normal control', [' 10:05:00.000'], 36300000), ('normal control', [' 00:05:00.5 '], 300500), ('normal control', ['123:05:01,001\\t'], 443101001)], [('regression: minute and second range', ['123:60:42,999'], None), ('regression variant: minute and second range', ['100:60:60,999 '], None), ('partial repair probe: minute and second range', ['123:00:60.07\\t'], None), ('partial repair variant: minute and second range', ['100:05:60,001\\t'], None), ('boundary control', ['100:00:00,000'], 360000000), ('boundary control', ['01:02:03.004'], 3723004), ('normal control', ['123:00:61,001 \\r'], None), ('normal control', ['100:59:42.001\\r'], 363582001), ('normal control', [' 10:30:61;001 '], None)]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-subtitle-cue-timing-srt-parse-minute-and-second-range","generated_at":"2026-09-29T14:49:29.792053+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Subtitle timing defects shift, hide or overlap captions that viewers depend on for comprehension and accessibility.","repair":"Reject minutes or seconds equal to or above 60.","root_cause":"The sexagesimal range check uses a strict > 60 bound, admitting the value 60 itself.","sha256":"b43fecf033de21ccb49de3e3d87834413a65984dc5e8ea447c8df912ad167af3","title":"SRT timestamp parsing: minute and second range · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.614,"exit_code":1,"observations":[{"actual":null,"check":"regression: minute and second range","expected":null,"passed":true},{"actual":null,"check":"regression variant: minute and second range","expected":null,"passed":true},{"actual":60070,"check":"partial repair probe: minute and second range","expected":null,"passed":false},{"actual":7260120,"check":"partial repair variant: minute and second range","expected":null,"passed":false},{"actual":0,"check":"boundary control","expected":0,"passed":true},{"actual":3599999,"check":"boundary control","expected":3599999,"passed":true},{"actual":1500,"check":"normal control","expected":1500,"passed":true},{"actual":360000000,"check":"normal control","expected":360000000,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: minute and second range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression variant: minute and second range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"partial repair probe: minute and second range\", \"actual\": 60070, \"expected\": null, \"passed\": false}, {\"check\": \"partial repair variant: minute and second range\", \"actual\": 7260120, \"expected\": null, \"passed\": false}, {\"check\": \"boundary control\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 3599999, \"expected\": 3599999, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 1500, \"expected\": 1500, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 360000000, \"expected\": 360000000, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.044,"exit_code":1,"observations":[{"actual":3600000,"check":"regression: minute and second range","expected":null,"passed":false},{"actual":39660070,"check":"regression variant: minute and second range","expected":null,"passed":false},{"actual":60070,"check":"partial repair probe: minute and second range","expected":null,"passed":false},{"actual":7260120,"check":"partial repair variant: minute and second range","expected":null,"passed":false},{"actual":0,"check":"boundary control","expected":0,"passed":true},{"actual":3599999,"check":"boundary control","expected":3599999,"passed":true},{"actual":1500,"check":"normal control","expected":1500,"passed":true},{"actual":360000000,"check":"normal control","expected":360000000,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: minute and second range\", \"actual\": 3600000, \"expected\": null, \"passed\": false}, {\"check\": \"regression variant: minute and second range\", \"actual\": 39660070, \"expected\": null, \"passed\": false}, {\"check\": \"partial repair probe: minute and second range\", \"actual\": 60070, \"expected\": null, \"passed\": false}, {\"check\": \"partial repair variant: minute and second range\", \"actual\": 7260120, \"expected\": null, \"passed\": false}, {\"check\": \"boundary control\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 3599999, \"expected\": 3599999, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 1500, \"expected\": 1500, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 360000000, \"expected\": 360000000, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.582,"exit_code":0,"observations":[{"actual":null,"check":"regression: minute and second range","expected":null,"passed":true},{"actual":null,"check":"regression variant: minute and second range","expected":null,"passed":true},{"actual":null,"check":"partial repair probe: minute and second range","expected":null,"passed":true},{"actual":null,"check":"partial repair variant: minute and second range","expected":null,"passed":true},{"actual":0,"check":"boundary control","expected":0,"passed":true},{"actual":3599999,"check":"boundary control","expected":3599999,"passed":true},{"actual":1500,"check":"normal control","expected":1500,"passed":true},{"actual":360000000,"check":"normal control","expected":360000000,"passed":true},{"actual":null,"check":"normal control","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: minute and second range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression variant: minute and second range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"partial repair probe: minute and second range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"partial repair variant: minute and second range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary control\", \"actual\": 3599999, \"expected\": 3599999, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 1500, \"expected\": 1500, \"passed\": true}, {\"check\": \"normal control\", \"actual\": 360000000, \"expected\": 360000000, \"passed\": true}, {\"check\": \"normal control\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}