{"abstract":"Unordered cut lists produce wrong shifts after the first cut.","category":"Subtitle cue timing","checks":9,"contract":"Cuts [a,b) are removed from the programme (they may overlap or be unsorted and are merged first). A time after a cut shifts left by the removed length; a time inside a cut maps to the cut point. Cues [start,end,text] are mapped and dropped when the mapped end is not after the mapped start.","evaluation_group":"w2-subtitle-cue-timing-cut-list-conform","failed_approach":"Sorting in descending order breaks both merging and the cumulative walk.","family":"w2-subtitle-cue-timing-cut-list-conform-cut-ordering","id":"FA-78326","implementations":{"attempt":{"sha256":"b1d0183ed9576477d58a2ac3df92bf661e14218c0f1c730ba5af7e70073b3cbe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, cuts):\n    merged=[]\n    for a,b in sorted(cuts,reverse=True):\n        if merged and a<=merged[-1][1]:\n            merged[-1][1]=max(merged[-1][1],b)\n        else:\n            merged.append([a,b])\n    def mapt(t):\n        shift=0\n        for a,b in merged:\n            if t>=b:\n                shift+=b-a\n            elif t>a:\n                return a-shift\n        return t-shift\n    out=[]\n    for s,e,txt in cues:\n        ns,ne=mapt(s),mapt(e)\n        if ne>ns:\n            out.append([ns,ne,txt])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: cut ordering', [[[0, 800, 'c0'], [4000, 4300, 'c1'], [0, 800, 'c2']], [[3000, 3100], [3000, 4500], [0, 1500]]], []), ('regression variant: cut ordering', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('partial repair probe: cut ordering', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('partial repair variant: cut ordering', [[[1600, 1700, 'c0'], [4000, 4300, 'c1'], [900, 1700, 'c2'], [1600, 1900, 'c3']], [[1000, 2500], [3000, 4500]]], [[900, 1000, 'c2']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[600, 2600, 'c0'], [2500, 3300, 'c1'], [0, 2000, 'c2']], [[1000, 1100]]], [[600, 2500, 'c0'], [2400, 3200, 'c1'], [0, 1900, 'c2']]), ('normal control', [[[200, 1000, 'c0'], [200, 2200, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']], [[2000, 2500]]], [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']]), ('normal control', [[[2500, 4500, 'c0'], [4000, 6000, 'c1'], [900, 2900, 'c2'], [200, 2200, 'c3']], [[500, 600], [500, 1000]]], [[2000, 4000, 'c0'], [3500, 5500, 'c1'], [500, 2400, 'c2'], [200, 1700, 'c3']])], [('regression: cut ordering', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('regression variant: cut ordering', [[[200, 500, 'c0']], [[1500, 1600], [0, 100]]], [[100, 400, 'c0']]), ('partial repair probe: cut ordering', [[[3200, 5200, 'c0'], [1200, 1300, 'c1']], [[500, 2000], [2000, 2100], [1500, 1600]]], [[1600, 3600, 'c0']]), ('partial repair variant: cut ordering', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('normal control', [[[600, 700, 'c0'], [900, 1000, 'c1'], [4000, 6000, 'c2']], [[500, 600]]], [[500, 600, 'c0'], [800, 900, 'c1'], [3900, 5900, 'c2']]), ('normal control', [[[0, 2000, 'c0'], [0, 300, 'c1']], []], [[0, 2000, 'c0'], [0, 300, 'c1']]), ('normal control', [[[600, 700, 'c0'], [3200, 3500, 'c1'], [600, 1400, 'c2'], [200, 2200, 'c3']], [[1500, 2500]]], [[600, 700, 'c0'], [2200, 2500, 'c1'], [600, 1400, 'c2'], [200, 1500, 'c3']])], [('regression: cut ordering', [[[600, 2600, 'c0'], [1200, 2000, 'c1'], [200, 2200, 'c2'], [1200, 3200, 'c3']], [[3000, 4000], [1500, 2500], [2000, 3500]]], [[600, 1500, 'c0'], [1200, 1500, 'c1'], [200, 1500, 'c2'], [1200, 1500, 'c3']]), ('regression variant: cut ordering', [[[200, 300, 'c0'], [600, 900, 'c1'], [4000, 4300, 'c2'], [2500, 3300, 'c3']], [[2000, 2500], [2000, 3000], [1500, 2500]]], [[200, 300, 'c0'], [600, 900, 'c1'], [2500, 2800, 'c2'], [1500, 1800, 'c3']]), ('partial repair probe: cut ordering', [[[0, 800, 'c0'], [4000, 4300, 'c1'], [0, 800, 'c2']], [[3000, 3100], [3000, 4500], [0, 1500]]], []), ('partial repair variant: cut ordering', [[[1200, 1500, 'c0'], [1200, 2000, 'c1'], [600, 2600, 'c2']], [[1000, 2500], [1500, 2500], [1000, 1100]]], [[600, 1100, 'c2']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2800, 'c0'], [600, 1400, 'c1']], []], [[2500, 2800, 'c0'], [600, 1400, 'c1']]), ('normal control', [[[2500, 3300, 'c0']], []], [[2500, 3300, 'c0']]), ('normal control', [[[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']], []], [[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']])], [('regression: cut ordering', [[[1600, 1900, 'c0'], [2500, 3300, 'c1'], [1600, 1900, 'c2'], [4000, 6000, 'c3']], [[500, 2000], [0, 1000]]], [[500, 1300, 'c1'], [2000, 4000, 'c3']]), ('regression variant: cut ordering', [[[1200, 1500, 'c0']], [[1500, 2500], [2000, 2100], [500, 1000]]], [[700, 1000, 'c0']]), ('partial repair probe: cut ordering', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('partial repair variant: cut ordering', [[[200, 500, 'c0']], [[1500, 1600], [0, 100]]], [[100, 400, 'c0']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('normal control', [[[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']], []], [[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']]), ('normal control', [[[600, 1400, 'c0'], [0, 300, 'c1']], [[3000, 4000]]], [[600, 1400, 'c0'], [0, 300, 'c1']]), ('normal control', [[[200, 500, 'c0'], [1200, 2000, 'c1']], [[2000, 2500], [2000, 3000]]], [[200, 500, 'c0'], [1200, 2000, 'c1']])], [('regression: cut ordering', [[[1200, 2000, 'c0'], [4000, 4300, 'c1'], [200, 2200, 'c2'], [3200, 4000, 'c3']], [[1000, 2000], [0, 1500], [1500, 2500]]], [[1500, 1800, 'c1'], [700, 1500, 'c3']]), ('regression variant: cut ordering', [[[4000, 4300, 'c0'], [1200, 3200, 'c1']], [[1500, 2000], [0, 100]]], [[3400, 3700, 'c0'], [1100, 2600, 'c1']]), ('partial repair probe: cut ordering', [[[600, 2600, 'c0'], [1200, 2000, 'c1'], [200, 2200, 'c2'], [1200, 3200, 'c3']], [[3000, 4000], [1500, 2500], [2000, 3500]]], [[600, 1500, 'c0'], [1200, 1500, 'c1'], [200, 1500, 'c2'], [1200, 1500, 'c3']]), ('partial repair variant: cut ordering', [[[4000, 6000, 'c0'], [200, 1000, 'c1']], [[0, 500], [500, 600]]], [[3400, 5400, 'c0'], [0, 400, 'c1']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2600, 'c0']], []], [[2500, 2600, 'c0']]), ('normal control', [[[2500, 4500, 'c0'], [1600, 3600, 'c1']], [[0, 1500]]], [[1000, 3000, 'c0'], [100, 2100, 'c1']]), ('normal control', [[[900, 1200, 'c0'], [200, 1000, 'c1'], [1200, 2000, 'c2']], []], [[900, 1200, 'c0'], [200, 1000, 'c1'], [1200, 2000, 'c2']])]]\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":"0a44571cd084d74962aad77cae8414a5b419185f318be89a7d71313b7895865b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, cuts):\n    merged=[]\n    for a,b in cuts:\n        if merged and a<=merged[-1][1]:\n            merged[-1][1]=max(merged[-1][1],b)\n        else:\n            merged.append([a,b])\n    def mapt(t):\n        shift=0\n        for a,b in merged:\n            if t>=b:\n                shift+=b-a\n            elif t>a:\n                return a-shift\n        return t-shift\n    out=[]\n    for s,e,txt in cues:\n        ns,ne=mapt(s),mapt(e)\n        if ne>ns:\n            out.append([ns,ne,txt])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: cut ordering', [[[0, 800, 'c0'], [4000, 4300, 'c1'], [0, 800, 'c2']], [[3000, 3100], [3000, 4500], [0, 1500]]], []), ('regression variant: cut ordering', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('partial repair probe: cut ordering', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('partial repair variant: cut ordering', [[[1600, 1700, 'c0'], [4000, 4300, 'c1'], [900, 1700, 'c2'], [1600, 1900, 'c3']], [[1000, 2500], [3000, 4500]]], [[900, 1000, 'c2']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[600, 2600, 'c0'], [2500, 3300, 'c1'], [0, 2000, 'c2']], [[1000, 1100]]], [[600, 2500, 'c0'], [2400, 3200, 'c1'], [0, 1900, 'c2']]), ('normal control', [[[200, 1000, 'c0'], [200, 2200, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']], [[2000, 2500]]], [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']]), ('normal control', [[[2500, 4500, 'c0'], [4000, 6000, 'c1'], [900, 2900, 'c2'], [200, 2200, 'c3']], [[500, 600], [500, 1000]]], [[2000, 4000, 'c0'], [3500, 5500, 'c1'], [500, 2400, 'c2'], [200, 1700, 'c3']])], [('regression: cut ordering', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('regression variant: cut ordering', [[[200, 500, 'c0']], [[1500, 1600], [0, 100]]], [[100, 400, 'c0']]), ('partial repair probe: cut ordering', [[[3200, 5200, 'c0'], [1200, 1300, 'c1']], [[500, 2000], [2000, 2100], [1500, 1600]]], [[1600, 3600, 'c0']]), ('partial repair variant: cut ordering', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('normal control', [[[600, 700, 'c0'], [900, 1000, 'c1'], [4000, 6000, 'c2']], [[500, 600]]], [[500, 600, 'c0'], [800, 900, 'c1'], [3900, 5900, 'c2']]), ('normal control', [[[0, 2000, 'c0'], [0, 300, 'c1']], []], [[0, 2000, 'c0'], [0, 300, 'c1']]), ('normal control', [[[600, 700, 'c0'], [3200, 3500, 'c1'], [600, 1400, 'c2'], [200, 2200, 'c3']], [[1500, 2500]]], [[600, 700, 'c0'], [2200, 2500, 'c1'], [600, 1400, 'c2'], [200, 1500, 'c3']])], [('regression: cut ordering', [[[600, 2600, 'c0'], [1200, 2000, 'c1'], [200, 2200, 'c2'], [1200, 3200, 'c3']], [[3000, 4000], [1500, 2500], [2000, 3500]]], [[600, 1500, 'c0'], [1200, 1500, 'c1'], [200, 1500, 'c2'], [1200, 1500, 'c3']]), ('regression variant: cut ordering', [[[200, 300, 'c0'], [600, 900, 'c1'], [4000, 4300, 'c2'], [2500, 3300, 'c3']], [[2000, 2500], [2000, 3000], [1500, 2500]]], [[200, 300, 'c0'], [600, 900, 'c1'], [2500, 2800, 'c2'], [1500, 1800, 'c3']]), ('partial repair probe: cut ordering', [[[0, 800, 'c0'], [4000, 4300, 'c1'], [0, 800, 'c2']], [[3000, 3100], [3000, 4500], [0, 1500]]], []), ('partial repair variant: cut ordering', [[[1200, 1500, 'c0'], [1200, 2000, 'c1'], [600, 2600, 'c2']], [[1000, 2500], [1500, 2500], [1000, 1100]]], [[600, 1100, 'c2']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2800, 'c0'], [600, 1400, 'c1']], []], [[2500, 2800, 'c0'], [600, 1400, 'c1']]), ('normal control', [[[2500, 3300, 'c0']], []], [[2500, 3300, 'c0']]), ('normal control', [[[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']], []], [[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']])], [('regression: cut ordering', [[[1600, 1900, 'c0'], [2500, 3300, 'c1'], [1600, 1900, 'c2'], [4000, 6000, 'c3']], [[500, 2000], [0, 1000]]], [[500, 1300, 'c1'], [2000, 4000, 'c3']]), ('regression variant: cut ordering', [[[1200, 1500, 'c0']], [[1500, 2500], [2000, 2100], [500, 1000]]], [[700, 1000, 'c0']]), ('partial repair probe: cut ordering', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('partial repair variant: cut ordering', [[[200, 500, 'c0']], [[1500, 1600], [0, 100]]], [[100, 400, 'c0']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('normal control', [[[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']], []], [[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']]), ('normal control', [[[600, 1400, 'c0'], [0, 300, 'c1']], [[3000, 4000]]], [[600, 1400, 'c0'], [0, 300, 'c1']]), ('normal control', [[[200, 500, 'c0'], [1200, 2000, 'c1']], [[2000, 2500], [2000, 3000]]], [[200, 500, 'c0'], [1200, 2000, 'c1']])], [('regression: cut ordering', [[[1200, 2000, 'c0'], [4000, 4300, 'c1'], [200, 2200, 'c2'], [3200, 4000, 'c3']], [[1000, 2000], [0, 1500], [1500, 2500]]], [[1500, 1800, 'c1'], [700, 1500, 'c3']]), ('regression variant: cut ordering', [[[4000, 4300, 'c0'], [1200, 3200, 'c1']], [[1500, 2000], [0, 100]]], [[3400, 3700, 'c0'], [1100, 2600, 'c1']]), ('partial repair probe: cut ordering', [[[600, 2600, 'c0'], [1200, 2000, 'c1'], [200, 2200, 'c2'], [1200, 3200, 'c3']], [[3000, 4000], [1500, 2500], [2000, 3500]]], [[600, 1500, 'c0'], [1200, 1500, 'c1'], [200, 1500, 'c2'], [1200, 1500, 'c3']]), ('partial repair variant: cut ordering', [[[4000, 6000, 'c0'], [200, 1000, 'c1']], [[0, 500], [500, 600]]], [[3400, 5400, 'c0'], [0, 400, 'c1']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2600, 'c0']], []], [[2500, 2600, 'c0']]), ('normal control', [[[2500, 4500, 'c0'], [1600, 3600, 'c1']], [[0, 1500]]], [[1000, 3000, 'c0'], [100, 2100, 'c1']]), ('normal control', [[[900, 1200, 'c0'], [200, 1000, 'c1'], [1200, 2000, 'c2']], []], [[900, 1200, 'c0'], [200, 1000, 'c1'], [1200, 2000, 'c2']])]]\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":"e92fc64410c14f7b23837692dfccb96530a6f6e776e7eb42058432d1c0afd739","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cues, cuts):\n    merged=[]\n    for a,b in sorted(cuts):\n        if merged and a<=merged[-1][1]:\n            merged[-1][1]=max(merged[-1][1],b)\n        else:\n            merged.append([a,b])\n    def mapt(t):\n        shift=0\n        for a,b in merged:\n            if t>=b:\n                shift+=b-a\n            elif t>a:\n                return a-shift\n        return t-shift\n    out=[]\n    for s,e,txt in cues:\n        ns,ne=mapt(s),mapt(e)\n        if ne>ns:\n            out.append([ns,ne,txt])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: cut ordering', [[[0, 800, 'c0'], [4000, 4300, 'c1'], [0, 800, 'c2']], [[3000, 3100], [3000, 4500], [0, 1500]]], []), ('regression variant: cut ordering', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('partial repair probe: cut ordering', [[[2500, 2800, 'c0']], [[500, 600], [1000, 2500], [2000, 2500]]], [[900, 1200, 'c0']]), ('partial repair variant: cut ordering', [[[1600, 1700, 'c0'], [4000, 4300, 'c1'], [900, 1700, 'c2'], [1600, 1900, 'c3']], [[1000, 2500], [3000, 4500]]], [[900, 1000, 'c2']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[600, 2600, 'c0'], [2500, 3300, 'c1'], [0, 2000, 'c2']], [[1000, 1100]]], [[600, 2500, 'c0'], [2400, 3200, 'c1'], [0, 1900, 'c2']]), ('normal control', [[[200, 1000, 'c0'], [200, 2200, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']], [[2000, 2500]]], [[200, 1000, 'c0'], [200, 2000, 'c1'], [0, 100, 'c2'], [200, 300, 'c3']]), ('normal control', [[[2500, 4500, 'c0'], [4000, 6000, 'c1'], [900, 2900, 'c2'], [200, 2200, 'c3']], [[500, 600], [500, 1000]]], [[2000, 4000, 'c0'], [3500, 5500, 'c1'], [500, 2400, 'c2'], [200, 1700, 'c3']])], [('regression: cut ordering', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('regression variant: cut ordering', [[[200, 500, 'c0']], [[1500, 1600], [0, 100]]], [[100, 400, 'c0']]), ('partial repair probe: cut ordering', [[[3200, 5200, 'c0'], [1200, 1300, 'c1']], [[500, 2000], [2000, 2100], [1500, 1600]]], [[1600, 3600, 'c0']]), ('partial repair variant: cut ordering', [[[2500, 3300, 'c0'], [200, 500, 'c1']], [[1500, 1600], [0, 1000], [1500, 3000]]], [[500, 800, 'c0']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('normal control', [[[600, 700, 'c0'], [900, 1000, 'c1'], [4000, 6000, 'c2']], [[500, 600]]], [[500, 600, 'c0'], [800, 900, 'c1'], [3900, 5900, 'c2']]), ('normal control', [[[0, 2000, 'c0'], [0, 300, 'c1']], []], [[0, 2000, 'c0'], [0, 300, 'c1']]), ('normal control', [[[600, 700, 'c0'], [3200, 3500, 'c1'], [600, 1400, 'c2'], [200, 2200, 'c3']], [[1500, 2500]]], [[600, 700, 'c0'], [2200, 2500, 'c1'], [600, 1400, 'c2'], [200, 1500, 'c3']])], [('regression: cut ordering', [[[600, 2600, 'c0'], [1200, 2000, 'c1'], [200, 2200, 'c2'], [1200, 3200, 'c3']], [[3000, 4000], [1500, 2500], [2000, 3500]]], [[600, 1500, 'c0'], [1200, 1500, 'c1'], [200, 1500, 'c2'], [1200, 1500, 'c3']]), ('regression variant: cut ordering', [[[200, 300, 'c0'], [600, 900, 'c1'], [4000, 4300, 'c2'], [2500, 3300, 'c3']], [[2000, 2500], [2000, 3000], [1500, 2500]]], [[200, 300, 'c0'], [600, 900, 'c1'], [2500, 2800, 'c2'], [1500, 1800, 'c3']]), ('partial repair probe: cut ordering', [[[0, 800, 'c0'], [4000, 4300, 'c1'], [0, 800, 'c2']], [[3000, 3100], [3000, 4500], [0, 1500]]], []), ('partial repair variant: cut ordering', [[[1200, 1500, 'c0'], [1200, 2000, 'c1'], [600, 2600, 'c2']], [[1000, 2500], [1500, 2500], [1000, 1100]]], [[600, 1100, 'c2']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2800, 'c0'], [600, 1400, 'c1']], []], [[2500, 2800, 'c0'], [600, 1400, 'c1']]), ('normal control', [[[2500, 3300, 'c0']], []], [[2500, 3300, 'c0']]), ('normal control', [[[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']], []], [[3200, 3300, 'c0'], [200, 500, 'c1'], [900, 2900, 'c2']])], [('regression: cut ordering', [[[1600, 1900, 'c0'], [2500, 3300, 'c1'], [1600, 1900, 'c2'], [4000, 6000, 'c3']], [[500, 2000], [0, 1000]]], [[500, 1300, 'c1'], [2000, 4000, 'c3']]), ('regression variant: cut ordering', [[[1200, 1500, 'c0']], [[1500, 2500], [2000, 2100], [500, 1000]]], [[700, 1000, 'c0']]), ('partial repair probe: cut ordering', [[[3200, 5200, 'c0'], [200, 2200, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']], [[3000, 3100], [2000, 2100]]], [[3000, 5000, 'c0'], [200, 2100, 'c1'], [200, 500, 'c2'], [1200, 1300, 'c3']]), ('partial repair variant: cut ordering', [[[200, 500, 'c0']], [[1500, 1600], [0, 100]]], [[100, 400, 'c0']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('normal control', [[[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']], []], [[1200, 2000, 'c0'], [3200, 3300, 'c1'], [900, 1000, 'c2'], [1200, 1300, 'c3']]), ('normal control', [[[600, 1400, 'c0'], [0, 300, 'c1']], [[3000, 4000]]], [[600, 1400, 'c0'], [0, 300, 'c1']]), ('normal control', [[[200, 500, 'c0'], [1200, 2000, 'c1']], [[2000, 2500], [2000, 3000]]], [[200, 500, 'c0'], [1200, 2000, 'c1']])], [('regression: cut ordering', [[[1200, 2000, 'c0'], [4000, 4300, 'c1'], [200, 2200, 'c2'], [3200, 4000, 'c3']], [[1000, 2000], [0, 1500], [1500, 2500]]], [[1500, 1800, 'c1'], [700, 1500, 'c3']]), ('regression variant: cut ordering', [[[4000, 4300, 'c0'], [1200, 3200, 'c1']], [[1500, 2000], [0, 100]]], [[3400, 3700, 'c0'], [1100, 2600, 'c1']]), ('partial repair probe: cut ordering', [[[600, 2600, 'c0'], [1200, 2000, 'c1'], [200, 2200, 'c2'], [1200, 3200, 'c3']], [[3000, 4000], [1500, 2500], [2000, 3500]]], [[600, 1500, 'c0'], [1200, 1500, 'c1'], [200, 1500, 'c2'], [1200, 1500, 'c3']]), ('partial repair variant: cut ordering', [[[4000, 6000, 'c0'], [200, 1000, 'c1']], [[0, 500], [500, 600]]], [[3400, 5400, 'c0'], [0, 400, 'c1']]), ('boundary control', [[[1200, 1800, 'a']], [[1000, 1500]]], [[1000, 1300, 'a']]), ('boundary control', [[[1100, 1400, 'a']], [[1000, 1500]]], []), ('normal control', [[[2500, 2600, 'c0']], []], [[2500, 2600, 'c0']]), ('normal control', [[[2500, 4500, 'c0'], [1600, 3600, 'c1']], [[0, 1500]]], [[1000, 3000, 'c0'], [100, 2100, 'c1']]), ('normal control', [[[900, 1200, 'c0'], [200, 1000, 'c1'], [1200, 2000, 'c2']], []], [[900, 1200, 'c0'], [200, 1000, 'c1'], [1200, 2000, 'c2']])]]\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-cut-list-conform-cut-ordering","generated_at":"2026-09-29T14:49:34.076630+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":"Sort cuts by start before merging.","root_cause":"Cuts are merged in the order supplied.","sha256":"876d7dc8f2e4540a3932c23f81524f51ced6ca686a4a4605fdf65d7c8b5fc3b7","title":"Subtitle conform to an edit cut list: cut ordering · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.211,"exit_code":1,"observations":[{"actual":[[0,800,"c0"],[0,800,"c2"]],"check":"regression: cut ordering","expected":[],"passed":false},{"actual":[[1500,1800,"c0"],[200,500,"c1"]],"check":"regression variant: cut ordering","expected":[[500,800,"c0"]],"passed":false},{"actual":[[2000,2300,"c0"]],"check":"partial repair probe: cut ordering","expected":[[900,1200,"c0"]],"passed":false},{"actual":[[1600,1700,"c0"],[900,1700,"c2"],[1600,1900,"c3"]],"check":"partial repair variant: cut ordering","expected":[[900,1000,"c2"]],"passed":false},{"actual":[[1000,1300,"a"]],"check":"boundary control","expected":[[1000,1300,"a"]],"passed":true},{"actual":[],"check":"boundary control","expected":[],"passed":true},{"actual":[[600,2500,"c0"],[2400,3200,"c1"],[0,1900,"c2"]],"check":"normal control","expected":[[600,2500,"c0"],[2400,3200,"c1"],[0,1900,"c2"]],"passed":true},{"actual":[[200,1000,"c0"],[200,2000,"c1"],[0,100,"c2"],[200,300,"c3"]],"check":"normal control","expected":[[200,1000,"c0"],[200,2000,"c1"],[0,100,"c2"],[200,300,"c3"]],"passed":true},{"actual":[[2000,4000,"c0"],[3500,5500,"c1"],[500,2400,"c2"],[200,1700,"c3"]],"check":"normal control","expected":[[2000,4000,"c0"],[3500,5500,"c1"],[500,2400,"c2"],[200,1700,"c3"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: cut ordering\", \"actual\": [[0, 800, \"c0\"], [0, 800, \"c2\"]], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: cut ordering\", \"actual\": [[1500, 1800, \"c0\"], [200, 500, \"c1\"]], \"expected\": [[500, 800, \"c0\"]], \"passed\": false}, {\"check\": \"partial repair probe: cut ordering\", \"actual\": [[2000, 2300, \"c0\"]], \"expected\": [[900, 1200, \"c0\"]], \"passed\": false}, {\"check\": \"partial repair variant: cut ordering\", \"actual\": [[1600, 1700, \"c0\"], [900, 1700, \"c2\"], [1600, 1900, \"c3\"]], \"expected\": [[900, 1000, \"c2\"]], \"passed\": false}, {\"check\": \"boundary control\", \"actual\": [[1000, 1300, \"a\"]], \"expected\": [[1000, 1300, \"a\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[600, 2500, \"c0\"], [2400, 3200, \"c1\"], [0, 1900, \"c2\"]], \"expected\": [[600, 2500, \"c0\"], [2400, 3200, \"c1\"], [0, 1900, \"c2\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[200, 1000, \"c0\"], [200, 2000, \"c1\"], [0, 100, \"c2\"], [200, 300, \"c3\"]], \"expected\": [[200, 1000, \"c0\"], [200, 2000, \"c1\"], [0, 100, \"c2\"], [200, 300, \"c3\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[2000, 4000, \"c0\"], [3500, 5500, \"c1\"], [500, 2400, \"c2\"], [200, 1700, \"c3\"]], \"expected\": [[2000, 4000, \"c0\"], [3500, 5500, \"c1\"], [500, 2400, \"c2\"], [200, 1700, \"c3\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.117,"exit_code":1,"observations":[{"actual":[[0,800,"c0"],[0,800,"c2"]],"check":"regression: cut ordering","expected":[],"passed":false},{"actual":[[1500,1800,"c0"],[200,500,"c1"]],"check":"regression variant: cut ordering","expected":[[500,800,"c0"]],"passed":false},{"actual":[[900,1200,"c0"]],"check":"partial repair probe: cut ordering","expected":[[900,1200,"c0"]],"passed":true},{"actual":[[900,1000,"c2"]],"check":"partial repair variant: cut ordering","expected":[[900,1000,"c2"]],"passed":true},{"actual":[[1000,1300,"a"]],"check":"boundary control","expected":[[1000,1300,"a"]],"passed":true},{"actual":[],"check":"boundary control","expected":[],"passed":true},{"actual":[[600,2500,"c0"],[2400,3200,"c1"],[0,1900,"c2"]],"check":"normal control","expected":[[600,2500,"c0"],[2400,3200,"c1"],[0,1900,"c2"]],"passed":true},{"actual":[[200,1000,"c0"],[200,2000,"c1"],[0,100,"c2"],[200,300,"c3"]],"check":"normal control","expected":[[200,1000,"c0"],[200,2000,"c1"],[0,100,"c2"],[200,300,"c3"]],"passed":true},{"actual":[[2000,4000,"c0"],[3500,5500,"c1"],[500,2400,"c2"],[200,1700,"c3"]],"check":"normal control","expected":[[2000,4000,"c0"],[3500,5500,"c1"],[500,2400,"c2"],[200,1700,"c3"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: cut ordering\", \"actual\": [[0, 800, \"c0\"], [0, 800, \"c2\"]], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: cut ordering\", \"actual\": [[1500, 1800, \"c0\"], [200, 500, \"c1\"]], \"expected\": [[500, 800, \"c0\"]], \"passed\": false}, {\"check\": \"partial repair probe: cut ordering\", \"actual\": [[900, 1200, \"c0\"]], \"expected\": [[900, 1200, \"c0\"]], \"passed\": true}, {\"check\": \"partial repair variant: cut ordering\", \"actual\": [[900, 1000, \"c2\"]], \"expected\": [[900, 1000, \"c2\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[1000, 1300, \"a\"]], \"expected\": [[1000, 1300, \"a\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[600, 2500, \"c0\"], [2400, 3200, \"c1\"], [0, 1900, \"c2\"]], \"expected\": [[600, 2500, \"c0\"], [2400, 3200, \"c1\"], [0, 1900, \"c2\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[200, 1000, \"c0\"], [200, 2000, \"c1\"], [0, 100, \"c2\"], [200, 300, \"c3\"]], \"expected\": [[200, 1000, \"c0\"], [200, 2000, \"c1\"], [0, 100, \"c2\"], [200, 300, \"c3\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[2000, 4000, \"c0\"], [3500, 5500, \"c1\"], [500, 2400, \"c2\"], [200, 1700, \"c3\"]], \"expected\": [[2000, 4000, \"c0\"], [3500, 5500, \"c1\"], [500, 2400, \"c2\"], [200, 1700, \"c3\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.017,"exit_code":0,"observations":[{"actual":[],"check":"regression: cut ordering","expected":[],"passed":true},{"actual":[[500,800,"c0"]],"check":"regression variant: cut ordering","expected":[[500,800,"c0"]],"passed":true},{"actual":[[900,1200,"c0"]],"check":"partial repair probe: cut ordering","expected":[[900,1200,"c0"]],"passed":true},{"actual":[[900,1000,"c2"]],"check":"partial repair variant: cut ordering","expected":[[900,1000,"c2"]],"passed":true},{"actual":[[1000,1300,"a"]],"check":"boundary control","expected":[[1000,1300,"a"]],"passed":true},{"actual":[],"check":"boundary control","expected":[],"passed":true},{"actual":[[600,2500,"c0"],[2400,3200,"c1"],[0,1900,"c2"]],"check":"normal control","expected":[[600,2500,"c0"],[2400,3200,"c1"],[0,1900,"c2"]],"passed":true},{"actual":[[200,1000,"c0"],[200,2000,"c1"],[0,100,"c2"],[200,300,"c3"]],"check":"normal control","expected":[[200,1000,"c0"],[200,2000,"c1"],[0,100,"c2"],[200,300,"c3"]],"passed":true},{"actual":[[2000,4000,"c0"],[3500,5500,"c1"],[500,2400,"c2"],[200,1700,"c3"]],"check":"normal control","expected":[[2000,4000,"c0"],[3500,5500,"c1"],[500,2400,"c2"],[200,1700,"c3"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: cut ordering\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression variant: cut ordering\", \"actual\": [[500, 800, \"c0\"]], \"expected\": [[500, 800, \"c0\"]], \"passed\": true}, {\"check\": \"partial repair probe: cut ordering\", \"actual\": [[900, 1200, \"c0\"]], \"expected\": [[900, 1200, \"c0\"]], \"passed\": true}, {\"check\": \"partial repair variant: cut ordering\", \"actual\": [[900, 1000, \"c2\"]], \"expected\": [[900, 1000, \"c2\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [[1000, 1300, \"a\"]], \"expected\": [[1000, 1300, \"a\"]], \"passed\": true}, {\"check\": \"boundary control\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[600, 2500, \"c0\"], [2400, 3200, \"c1\"], [0, 1900, \"c2\"]], \"expected\": [[600, 2500, \"c0\"], [2400, 3200, \"c1\"], [0, 1900, \"c2\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[200, 1000, \"c0\"], [200, 2000, \"c1\"], [0, 100, \"c2\"], [200, 300, \"c3\"]], \"expected\": [[200, 1000, \"c0\"], [200, 2000, \"c1\"], [0, 100, \"c2\"], [200, 300, \"c3\"]], \"passed\": true}, {\"check\": \"normal control\", \"actual\": [[2000, 4000, \"c0\"], [3500, 5500, \"c1\"], [500, 2400, \"c2\"], [200, 1700, \"c3\"]], \"expected\": [[2000, 4000, \"c0\"], [3500, 5500, \"c1\"], [500, 2400, \"c2\"], [200, 1700, \"c3\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}