{"abstract":"Split pieces show stray leading and trailing spaces.","category":"Subtitle cue timing","checks":9,"contract":"Split cue [start,end] into len(parts) consecutive cues. Each part weighs max(1, len(part.strip())). Boundary after part k is start + floor(dur * cumulative_weight_k / total_weight); pieces are contiguous and the last ends at end. Output [s,e,part.strip()].","evaluation_group":"w2-subtitle-cue-timing-cue-split","failed_approach":"Trimming only the left side leaves trailing spaces in the piece text.","family":"w2-subtitle-cue-timing-cue-split-piece-text-trim","id":"FA-78136","implementations":{"attempt":{"sha256":"4b48137bf385800043f35655980005aaa8d76468a850e1aa42a5e9ce0ebd4300","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cue, parts):\n    start,end=cue\n    w=[max(1,len(p.strip())) for p in parts]\n    total=sum(w)\n    dur=end-start\n    out=[]\n    acc=0\n    prev=start\n    for p,x in zip(parts,w):\n        acc+=x\n        b=start+dur*acc//total\n        out.append([prev,b,p.lstrip()])\n        prev=b\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: piece text trim', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('regression variant: piece text trim', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair probe: piece text trim', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('partial repair variant: piece text trim', [[1000, 4001], ['friend', 'a', ' there ', 'a']], [[1000, 2385, 'friend'], [2385, 2615, 'a'], [2615, 3770, 'there'], [3770, 4001, 'a']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('normal control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[0, 2500], ['xyz']], [[0, 2500, 'xyz']]), ('normal control', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']])], [('regression: piece text trim', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('regression variant: piece text trim', [[1000, 1999], ['ok ', '  ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('partial repair probe: piece text trim', [[0, 7], [' there ']], [[0, 7, 'there']]), ('partial repair variant: piece text trim', [[0, 7], ['  ', 'ok ', '  ', 'ok ']], [[0, 1, ''], [1, 3, 'ok'], [3, 4, ''], [4, 7, 'ok']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[1000, 1999], ['a']], [[1000, 1999, 'a']]), ('normal control', [[12345, 15346], ['a', '']], [[12345, 13845, 'a'], [13845, 15346, '']]), ('normal control', [[12345, 13345], ['']], [[12345, 13345, '']])], [('regression: piece text trim', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('regression variant: piece text trim', [[12345, 12352], ['  ']], [[12345, 12352, '']]), ('partial repair probe: piece text trim', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('partial repair variant: piece text trim', [[1000, 2000], ['ok ', '', '']], [[1000, 1500, 'ok'], [1500, 1750, ''], [1750, 2000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('normal control', [[12345, 12352], ['xyz', '']], [[12345, 12350, 'xyz'], [12350, 12352, '']]), ('normal control', [[12345, 13345], ['Hello', 'friend', 'Hello']], [[12345, 12657, 'Hello'], [12657, 13032, 'friend'], [13032, 13345, 'Hello']]), ('normal control', [[1000, 1007], ['Longer chunk of text', 'Hello']], [[1000, 1005, 'Longer chunk of text'], [1005, 1007, 'Hello']])], [('regression: piece text trim', [[0, 7], [' there ']], [[0, 7, 'there']]), ('regression variant: piece text trim', [[12345, 13344], ['ok ', 'ok ', '  ']], [[12345, 12744, 'ok'], [12744, 13144, 'ok'], [13144, 13344, '']]), ('partial repair probe: piece text trim', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair variant: piece text trim', [[12345, 12352], [' there ', ' there ', 'xyz', '  ']], [[12345, 12347, 'there'], [12347, 12350, 'there'], [12350, 12351, 'xyz'], [12351, 12352, '']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('normal control', [[1000, 3500], ['xyz', 'a']], [[1000, 2875, 'xyz'], [2875, 3500, 'a']]), ('normal control', [[12345, 12352], ['']], [[12345, 12352, '']]), ('normal control', [[12345, 13345], ['', 'friend', 'a']], [[12345, 12470, ''], [12470, 13220, 'friend'], [13220, 13345, 'a']])], [('regression: piece text trim', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('regression variant: piece text trim', [[1000, 1100], [' there ', 'ok ', 'Longer chunk of text']], [[1000, 1018, 'there'], [1018, 1025, 'ok'], [1025, 1100, 'Longer chunk of text']]), ('partial repair probe: piece text trim', [[1000, 1999], ['ok ', '  ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('partial repair variant: piece text trim', [[1000, 1100], [' there ', 'friend']], [[1000, 1045, 'there'], [1045, 1100, 'friend']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[12345, 13345], ['xyz']], [[12345, 13345, 'xyz']]), ('normal control', [[1000, 2000], ['Longer chunk of text', 'Longer chunk of text', 'Hello', '']], [[1000, 1434, 'Longer chunk of text'], [1434, 1869, 'Longer chunk of text'], [1869, 1978, 'Hello'], [1978, 2000, '']]), ('normal control', [[12345, 13344], ['Hello', 'friend', 'a']], [[12345, 12761, 'Hello'], [12761, 13260, 'friend'], [13260, 13344, 'a']])]]\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":"f8831dc43e3e35ca59def64afd3a2ff1360fd11f330ca421e01029284da4b7c2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cue, parts):\n    start,end=cue\n    w=[max(1,len(p.strip())) for p in parts]\n    total=sum(w)\n    dur=end-start\n    out=[]\n    acc=0\n    prev=start\n    for p,x in zip(parts,w):\n        acc+=x\n        b=start+dur*acc//total\n        out.append([prev,b,p])\n        prev=b\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: piece text trim', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('regression variant: piece text trim', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair probe: piece text trim', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('partial repair variant: piece text trim', [[1000, 4001], ['friend', 'a', ' there ', 'a']], [[1000, 2385, 'friend'], [2385, 2615, 'a'], [2615, 3770, 'there'], [3770, 4001, 'a']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('normal control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[0, 2500], ['xyz']], [[0, 2500, 'xyz']]), ('normal control', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']])], [('regression: piece text trim', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('regression variant: piece text trim', [[1000, 1999], ['ok ', '  ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('partial repair probe: piece text trim', [[0, 7], [' there ']], [[0, 7, 'there']]), ('partial repair variant: piece text trim', [[0, 7], ['  ', 'ok ', '  ', 'ok ']], [[0, 1, ''], [1, 3, 'ok'], [3, 4, ''], [4, 7, 'ok']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[1000, 1999], ['a']], [[1000, 1999, 'a']]), ('normal control', [[12345, 15346], ['a', '']], [[12345, 13845, 'a'], [13845, 15346, '']]), ('normal control', [[12345, 13345], ['']], [[12345, 13345, '']])], [('regression: piece text trim', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('regression variant: piece text trim', [[12345, 12352], ['  ']], [[12345, 12352, '']]), ('partial repair probe: piece text trim', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('partial repair variant: piece text trim', [[1000, 2000], ['ok ', '', '']], [[1000, 1500, 'ok'], [1500, 1750, ''], [1750, 2000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('normal control', [[12345, 12352], ['xyz', '']], [[12345, 12350, 'xyz'], [12350, 12352, '']]), ('normal control', [[12345, 13345], ['Hello', 'friend', 'Hello']], [[12345, 12657, 'Hello'], [12657, 13032, 'friend'], [13032, 13345, 'Hello']]), ('normal control', [[1000, 1007], ['Longer chunk of text', 'Hello']], [[1000, 1005, 'Longer chunk of text'], [1005, 1007, 'Hello']])], [('regression: piece text trim', [[0, 7], [' there ']], [[0, 7, 'there']]), ('regression variant: piece text trim', [[12345, 13344], ['ok ', 'ok ', '  ']], [[12345, 12744, 'ok'], [12744, 13144, 'ok'], [13144, 13344, '']]), ('partial repair probe: piece text trim', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair variant: piece text trim', [[12345, 12352], [' there ', ' there ', 'xyz', '  ']], [[12345, 12347, 'there'], [12347, 12350, 'there'], [12350, 12351, 'xyz'], [12351, 12352, '']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('normal control', [[1000, 3500], ['xyz', 'a']], [[1000, 2875, 'xyz'], [2875, 3500, 'a']]), ('normal control', [[12345, 12352], ['']], [[12345, 12352, '']]), ('normal control', [[12345, 13345], ['', 'friend', 'a']], [[12345, 12470, ''], [12470, 13220, 'friend'], [13220, 13345, 'a']])], [('regression: piece text trim', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('regression variant: piece text trim', [[1000, 1100], [' there ', 'ok ', 'Longer chunk of text']], [[1000, 1018, 'there'], [1018, 1025, 'ok'], [1025, 1100, 'Longer chunk of text']]), ('partial repair probe: piece text trim', [[1000, 1999], ['ok ', '  ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('partial repair variant: piece text trim', [[1000, 1100], [' there ', 'friend']], [[1000, 1045, 'there'], [1045, 1100, 'friend']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[12345, 13345], ['xyz']], [[12345, 13345, 'xyz']]), ('normal control', [[1000, 2000], ['Longer chunk of text', 'Longer chunk of text', 'Hello', '']], [[1000, 1434, 'Longer chunk of text'], [1434, 1869, 'Longer chunk of text'], [1869, 1978, 'Hello'], [1978, 2000, '']]), ('normal control', [[12345, 13344], ['Hello', 'friend', 'a']], [[12345, 12761, 'Hello'], [12761, 13260, 'friend'], [13260, 13344, 'a']])]]\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":"f9a9ac5820863092b3d2743cef259f99ad8a6acd5df7cda235470356a371b9cb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cue, parts):\n    start,end=cue\n    w=[max(1,len(p.strip())) for p in parts]\n    total=sum(w)\n    dur=end-start\n    out=[]\n    acc=0\n    prev=start\n    for p,x in zip(parts,w):\n        acc+=x\n        b=start+dur*acc//total\n        out.append([prev,b,p.strip()])\n        prev=b\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: piece text trim', [[100, 1100], [' x ', 'y']], [[100, 600, 'x'], [600, 1100, 'y']]), ('regression variant: piece text trim', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair probe: piece text trim', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('partial repair variant: piece text trim', [[1000, 4001], ['friend', 'a', ' there ', 'a']], [[1000, 2385, 'friend'], [2385, 2615, 'a'], [2615, 3770, 'there'], [3770, 4001, 'a']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('normal control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[0, 2500], ['xyz']], [[0, 2500, 'xyz']]), ('normal control', [[1000, 1007], ['a', 'xyz', 'friend', 'a']], [[1000, 1000, 'a'], [1000, 1002, 'xyz'], [1002, 1006, 'friend'], [1006, 1007, 'a']])], [('regression: piece text trim', [[0, 7], ['friend', 'Hello', 'ok ']], [[0, 3, 'friend'], [3, 5, 'Hello'], [5, 7, 'ok']]), ('regression variant: piece text trim', [[1000, 1999], ['ok ', '  ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('partial repair probe: piece text trim', [[0, 7], [' there ']], [[0, 7, 'there']]), ('partial repair variant: piece text trim', [[0, 7], ['  ', 'ok ', '  ', 'ok ']], [[0, 1, ''], [1, 3, 'ok'], [3, 4, ''], [4, 7, 'ok']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[1000, 1999], ['a']], [[1000, 1999, 'a']]), ('normal control', [[12345, 15346], ['a', '']], [[12345, 13845, 'a'], [13845, 15346, '']]), ('normal control', [[12345, 13345], ['']], [[12345, 13345, '']])], [('regression: piece text trim', [[0, 100], ['friend', 'ok ', 'ok ']], [[0, 60, 'friend'], [60, 80, 'ok'], [80, 100, 'ok']]), ('regression variant: piece text trim', [[12345, 12352], ['  ']], [[12345, 12352, '']]), ('partial repair probe: piece text trim', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('partial repair variant: piece text trim', [[1000, 2000], ['ok ', '', '']], [[1000, 1500, 'ok'], [1500, 1750, ''], [1750, 2000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('normal control', [[12345, 12352], ['xyz', '']], [[12345, 12350, 'xyz'], [12350, 12352, '']]), ('normal control', [[12345, 13345], ['Hello', 'friend', 'Hello']], [[12345, 12657, 'Hello'], [12657, 13032, 'friend'], [13032, 13345, 'Hello']]), ('normal control', [[1000, 1007], ['Longer chunk of text', 'Hello']], [[1000, 1005, 'Longer chunk of text'], [1005, 1007, 'Hello']])], [('regression: piece text trim', [[0, 7], [' there ']], [[0, 7, 'there']]), ('regression variant: piece text trim', [[12345, 13344], ['ok ', 'ok ', '  ']], [[12345, 12744, 'ok'], [12744, 13144, 'ok'], [13144, 13344, '']]), ('partial repair probe: piece text trim', [[1000, 1999], ['ok ', 'Hello']], [[1000, 1285, 'ok'], [1285, 1999, 'Hello']]), ('partial repair variant: piece text trim', [[12345, 12352], [' there ', ' there ', 'xyz', '  ']], [[12345, 12347, 'there'], [12347, 12350, 'there'], [12350, 12351, 'xyz'], [12351, 12352, '']]), ('boundary control', [[0, 1000], ['ab', 'cd']], [[0, 500, 'ab'], [500, 1000, 'cd']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('normal control', [[1000, 3500], ['xyz', 'a']], [[1000, 2875, 'xyz'], [2875, 3500, 'a']]), ('normal control', [[12345, 12352], ['']], [[12345, 12352, '']]), ('normal control', [[12345, 13345], ['', 'friend', 'a']], [[12345, 12470, ''], [12470, 13220, 'friend'], [13220, 13345, 'a']])], [('regression: piece text trim', [[0, 3001], ['ok ', ' there ']], [[0, 857, 'ok'], [857, 3001, 'there']]), ('regression variant: piece text trim', [[1000, 1100], [' there ', 'ok ', 'Longer chunk of text']], [[1000, 1018, 'there'], [1018, 1025, 'ok'], [1025, 1100, 'Longer chunk of text']]), ('partial repair probe: piece text trim', [[1000, 1999], ['ok ', '  ', 'friend', 'ok ']], [[1000, 1181, 'ok'], [1181, 1272, ''], [1272, 1817, 'friend'], [1817, 1999, 'ok']]), ('partial repair variant: piece text trim', [[1000, 1100], [' there ', 'friend']], [[1000, 1045, 'there'], [1045, 1100, 'friend']]), ('boundary control', [[0, 1000], ['a', '']], [[0, 500, 'a'], [500, 1000, '']]), ('boundary control', [[0, 7], ['abc', 'de', 'f']], [[0, 3, 'abc'], [3, 5, 'de'], [5, 7, 'f']]), ('normal control', [[12345, 13345], ['xyz']], [[12345, 13345, 'xyz']]), ('normal control', [[1000, 2000], ['Longer chunk of text', 'Longer chunk of text', 'Hello', '']], [[1000, 1434, 'Longer chunk of text'], [1434, 1869, 'Longer chunk of text'], [1869, 1978, 'Hello'], [1978, 2000, '']]), ('normal control', [[12345, 13344], ['Hello', 'friend', 'a']], [[12345, 12761, 'Hello'], [12761, 13260, 'friend'], [13260, 13344, 'a']])]]\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-cue-split-piece-text-trim","generated_at":"2026-09-29T14:49:32.620895+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":"Emit the trimmed fragment.","root_cause":"The emitted text is the raw fragment.","sha256":"d072fc0aa6146b3a1a6c3ae490b3a430eaed3dcbbfc867c8b4fea7329cdcacec","title":"Proportional cue splitting: piece text trim · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.991,"exit_code":1,"observations":[{"actual":[[100,600,"x "],[600,1100,"y"]],"check":"regression: piece text trim","expected":[[100,600,"x"],[600,1100,"y"]],"passed":false},{"actual":[[1000,1285,"ok "],[1285,1999,"Hello"]],"check":"regression variant: piece text trim","expected":[[1000,1285,"ok"],[1285,1999,"Hello"]],"passed":false},{"actual":[[0,60,"friend"],[60,80,"ok "],[80,100,"ok "]],"check":"partial repair probe: piece text trim","expected":[[0,60,"friend"],[60,80,"ok"],[80,100,"ok"]],"passed":false},{"actual":[[1000,2385,"friend"],[2385,2615,"a"],[2615,3770,"there "],[3770,4001,"a"]],"check":"partial repair variant: piece text trim","expected":[[1000,2385,"friend"],[2385,2615,"a"],[2615,3770,"there"],[3770,4001,"a"]],"passed":false},{"actual":[[0,500,"ab"],[500,1000,"cd"]],"check":"boundary control","expected":[[0,500,"ab"],[500,1000,"cd"]],"passed":true},{"actual":[[0,500,"a"],[500,1000,""]],"check":"boundary control","expected":[[0,500,"a"],[500,1000,""]],"passed":true},{"actual":[[0,3,"abc"],[3,5,"de"],[5,7,"f"]],"check":"normal control","expected":[[0,3,"abc"],[3,5,"de"],[5,7,"f"]],"passed":true},{"actual":[[0,2500,"xyz"]],"check":"normal control","expected":[[0,2500,"xyz"]],"passed":true},{"actual":[[1000,1000,"a"],[1000,1002,"xyz"],[1002,1006,"friend"],[1006,1007,"a"]],"check":"normal control","expected":[[1000,1000,"a"],[1000,1002,"xyz"],[1002,1006,"friend"],[1006,1007,"a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: piece text trim\", \"actual\": [[100, 600, \"x \"], [600, 1100, \"y\"]], \"expected\": [[100, 600, \"x\"], [600, 1100, \"y\"]], \"passed\": false}, {\"check\": \"regression variant: piece text trim\", \"actual\": [[1000, 1285, \"ok \"], [1285, 1999, \"Hello\"]], \"expected\": [[1000, 1285, \"ok\"], [1285, 1999, \"Hello\"]], \"passed\": false}, {\"check\": \"partial repair probe: piece text trim\", \"actual\": [[0, 60, \"friend\"], [60, 80, \"ok \"], [80, 100, \"ok \"]], \"expected\": [[0, 60, \"friend\"], [60, 80, \"ok\"], [80, 100, \"ok\"]], \"passed\": false}, {\"check\": \"partial repair variant: piece text trim\", \"actual\": [[1000, 2385, \"friend\"], [2385, 2615, \"a\"], [2615, 3770, \"there \"], [3770, 4001, \"a\"]], \"expected\": [[1000, 2385, \"friend\"], [2385, 2615, \"a\"], [2615, 3770, \"there\"], [3770, 4001, \"a\"]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 500, \"ab\"], [500, 1000, \"cd\"]], \"expected\": [[0, 500, \"ab\"], [500, 1000, \"cd\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 500, \"a\"], [500, 1000, \"\"]], \"expected\": [[0, 500, \"a\"], [500, 1000, \"\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[0, 3, \"abc\"], [3, 5, \"de\"], [5, 7, \"f\"]], \"expected\": [[0, 3, \"abc\"], [3, 5, \"de\"], [5, 7, \"f\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[0, 2500, \"xyz\"]], \"expected\": [[0, 2500, \"xyz\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 1000, \"a\"], [1000, 1002, \"xyz\"], [1002, 1006, \"friend\"], [1006, 1007, \"a\"]], \"expected\": [[1000, 1000, \"a\"], [1000, 1002, \"xyz\"], [1002, 1006, \"friend\"], [1006, 1007, \"a\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.612,"exit_code":1,"observations":[{"actual":[[100,600," x "],[600,1100,"y"]],"check":"regression: piece text trim","expected":[[100,600,"x"],[600,1100,"y"]],"passed":false},{"actual":[[1000,1285,"ok "],[1285,1999,"Hello"]],"check":"regression variant: piece text trim","expected":[[1000,1285,"ok"],[1285,1999,"Hello"]],"passed":false},{"actual":[[0,60,"friend"],[60,80,"ok "],[80,100,"ok "]],"check":"partial repair probe: piece text trim","expected":[[0,60,"friend"],[60,80,"ok"],[80,100,"ok"]],"passed":false},{"actual":[[1000,2385,"friend"],[2385,2615,"a"],[2615,3770," there "],[3770,4001,"a"]],"check":"partial repair variant: piece text trim","expected":[[1000,2385,"friend"],[2385,2615,"a"],[2615,3770,"there"],[3770,4001,"a"]],"passed":false},{"actual":[[0,500,"ab"],[500,1000,"cd"]],"check":"boundary control","expected":[[0,500,"ab"],[500,1000,"cd"]],"passed":true},{"actual":[[0,500,"a"],[500,1000,""]],"check":"boundary control","expected":[[0,500,"a"],[500,1000,""]],"passed":true},{"actual":[[0,3,"abc"],[3,5,"de"],[5,7,"f"]],"check":"normal control","expected":[[0,3,"abc"],[3,5,"de"],[5,7,"f"]],"passed":true},{"actual":[[0,2500,"xyz"]],"check":"normal control","expected":[[0,2500,"xyz"]],"passed":true},{"actual":[[1000,1000,"a"],[1000,1002,"xyz"],[1002,1006,"friend"],[1006,1007,"a"]],"check":"normal control","expected":[[1000,1000,"a"],[1000,1002,"xyz"],[1002,1006,"friend"],[1006,1007,"a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: piece text trim\", \"actual\": [[100, 600, \" x \"], [600, 1100, \"y\"]], \"expected\": [[100, 600, \"x\"], [600, 1100, \"y\"]], \"passed\": false}, {\"check\": \"regression variant: piece text trim\", \"actual\": [[1000, 1285, \"ok \"], [1285, 1999, \"Hello\"]], \"expected\": [[1000, 1285, \"ok\"], [1285, 1999, \"Hello\"]], \"passed\": false}, {\"check\": \"partial repair probe: piece text trim\", \"actual\": [[0, 60, \"friend\"], [60, 80, \"ok \"], [80, 100, \"ok \"]], \"expected\": [[0, 60, \"friend\"], [60, 80, \"ok\"], [80, 100, \"ok\"]], \"passed\": false}, {\"check\": \"partial repair variant: piece text trim\", \"actual\": [[1000, 2385, \"friend\"], [2385, 2615, \"a\"], [2615, 3770, \" there \"], [3770, 4001, \"a\"]], \"expected\": [[1000, 2385, \"friend\"], [2385, 2615, \"a\"], [2615, 3770, \"there\"], [3770, 4001, \"a\"]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[0, 500, \"ab\"], [500, 1000, \"cd\"]], \"expected\": [[0, 500, \"ab\"], [500, 1000, \"cd\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 500, \"a\"], [500, 1000, \"\"]], \"expected\": [[0, 500, \"a\"], [500, 1000, \"\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[0, 3, \"abc\"], [3, 5, \"de\"], [5, 7, \"f\"]], \"expected\": [[0, 3, \"abc\"], [3, 5, \"de\"], [5, 7, \"f\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[0, 2500, \"xyz\"]], \"expected\": [[0, 2500, \"xyz\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 1000, \"a\"], [1000, 1002, \"xyz\"], [1002, 1006, \"friend\"], [1006, 1007, \"a\"]], \"expected\": [[1000, 1000, \"a\"], [1000, 1002, \"xyz\"], [1002, 1006, \"friend\"], [1006, 1007, \"a\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.876,"exit_code":0,"observations":[{"actual":[[100,600,"x"],[600,1100,"y"]],"check":"regression: piece text trim","expected":[[100,600,"x"],[600,1100,"y"]],"passed":true},{"actual":[[1000,1285,"ok"],[1285,1999,"Hello"]],"check":"regression variant: piece text trim","expected":[[1000,1285,"ok"],[1285,1999,"Hello"]],"passed":true},{"actual":[[0,60,"friend"],[60,80,"ok"],[80,100,"ok"]],"check":"partial repair probe: piece text trim","expected":[[0,60,"friend"],[60,80,"ok"],[80,100,"ok"]],"passed":true},{"actual":[[1000,2385,"friend"],[2385,2615,"a"],[2615,3770,"there"],[3770,4001,"a"]],"check":"partial repair variant: piece text trim","expected":[[1000,2385,"friend"],[2385,2615,"a"],[2615,3770,"there"],[3770,4001,"a"]],"passed":true},{"actual":[[0,500,"ab"],[500,1000,"cd"]],"check":"boundary control","expected":[[0,500,"ab"],[500,1000,"cd"]],"passed":true},{"actual":[[0,500,"a"],[500,1000,""]],"check":"boundary control","expected":[[0,500,"a"],[500,1000,""]],"passed":true},{"actual":[[0,3,"abc"],[3,5,"de"],[5,7,"f"]],"check":"normal control","expected":[[0,3,"abc"],[3,5,"de"],[5,7,"f"]],"passed":true},{"actual":[[0,2500,"xyz"]],"check":"normal control","expected":[[0,2500,"xyz"]],"passed":true},{"actual":[[1000,1000,"a"],[1000,1002,"xyz"],[1002,1006,"friend"],[1006,1007,"a"]],"check":"normal control","expected":[[1000,1000,"a"],[1000,1002,"xyz"],[1002,1006,"friend"],[1006,1007,"a"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: piece text trim\", \"actual\": [[100, 600, \"x\"], [600, 1100, \"y\"]], \"expected\": [[100, 600, \"x\"], [600, 1100, \"y\"]], \"passed\": true}, {\"check\": \"regression variant: piece text trim\", \"actual\": [[1000, 1285, \"ok\"], [1285, 1999, \"Hello\"]], \"expected\": [[1000, 1285, \"ok\"], [1285, 1999, \"Hello\"]], \"passed\": true}, {\"check\": \"partial repair probe: piece text trim\", \"actual\": [[0, 60, \"friend\"], [60, 80, \"ok\"], [80, 100, \"ok\"]], \"expected\": [[0, 60, \"friend\"], [60, 80, \"ok\"], [80, 100, \"ok\"]], \"passed\": true}, {\"check\": \"partial repair variant: piece text trim\", \"actual\": [[1000, 2385, \"friend\"], [2385, 2615, \"a\"], [2615, 3770, \"there\"], [3770, 4001, \"a\"]], \"expected\": [[1000, 2385, \"friend\"], [2385, 2615, \"a\"], [2615, 3770, \"there\"], [3770, 4001, \"a\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 500, \"ab\"], [500, 1000, \"cd\"]], \"expected\": [[0, 500, \"ab\"], [500, 1000, \"cd\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[0, 500, \"a\"], [500, 1000, \"\"]], \"expected\": [[0, 500, \"a\"], [500, 1000, \"\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[0, 3, \"abc\"], [3, 5, \"de\"], [5, 7, \"f\"]], \"expected\": [[0, 3, \"abc\"], [3, 5, \"de\"], [5, 7, \"f\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[0, 2500, \"xyz\"]], \"expected\": [[0, 2500, \"xyz\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[1000, 1000, \"a\"], [1000, 1002, \"xyz\"], [1002, 1006, \"friend\"], [1006, 1007, \"a\"]], \"expected\": [[1000, 1000, \"a\"], [1000, 1002, \"xyz\"], [1002, 1006, \"friend\"], [1006, 1007, \"a\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}