{"abstract":"The first of several trailing removed lines disappears from the diff.","category":"Text diff and three-way merge","checks":10,"contract":"Given old and new line lists, fill a suffix LCS table L[i][j] for a[i:], b[j:], then walk from the start: equal lines are kept, otherwise delete when L[i+1][j] >= L[i][j+1] and insert otherwise; flush remaining old lines as deletions and new lines as insertions. Return [tag, line] ops with tags \" \", \"-\", \"+\".","evaluation_group":"w2-text-diff-merge-lcs-edit-script","failed_approach":"Flushing from the new-side index j removes the wrong lines when the sides have different lengths.","family":"w2-text-diff-merge-lcs-edit-script-tail-flush-index","id":"FA-75351","implementations":{"attempt":{"sha256":"0ce51d3f0a0eec439aee398299857181c8ef6904ba708f6882ea4827d0bfa33a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    n, m = len(a), len(b)\n    T = [[0] * (m + 1) for _ in range(n + 1)]\n    for i in range(n - 1, -1, -1):\n        for j in range(m - 1, -1, -1):\n            if a[i] == b[j]:\n                T[i][j] = T[i + 1][j + 1] + 1\n            else:\n                T[i][j] = max(T[i + 1][j], T[i][j + 1])\n    out = []\n    i = j = 0\n    while i < n and j < m:\n        if a[i] == b[j]:\n            out.append([' ', a[i]])\n            i += 1\n            j += 1\n        elif T[i + 1][j] >= T[i][j + 1]:\n            out.append(['-', a[i]])\n            i += 1\n        else:\n            out.append(['+', b[j]])\n            j += 1\n    out.extend(['-', x] for x in a[j:])\n    out.extend(['+', x] for x in b[j:])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0']], [[' ', 'a'], [' ', 'b'], ['+', 'n0']]), ('deletion at the end', [['a', 'b', 'c', 't1', 't2'], ['a', 'b', 'c']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same'], ['same']], [[' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0']], [['+', 'k0']]), ('repeated line after a replaced one', [['r1', 'r1'], ['q', 'r1']], [['-', 'r1'], ['+', 'q'], [' ', 'r1']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    2: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1']]), ('deletion at the end', [['a', 'b', 'c', 'd', 't1', 't2'], ['a', 'b', 'c', 'd']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], [' ', 'd'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same'], ['same', 'same']], [[' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1']], [['+', 'k0'], ['+', 'k1']]), ('repeated line after a replaced one', [['r2', 'r2'], ['q', 'r2']], [['-', 'r2'], ['+', 'q'], [' ', 'r2']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    3: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2']]), ('deletion at the end', [['a', 'b', 't1', 't2'], ['a', 'b']], [[' ', 'a'], [' ', 'b'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same'], ['same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2']]), ('repeated line after a replaced one', [['r3', 'r3'], ['q', 'r3']], [['-', 'r3'], ['+', 'q'], [' ', 'r3']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    4: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2', 'n3']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2'], ['+', 'n3']]), ('deletion at the end', [['a', 'b', 'c', 't1', 't2'], ['a', 'b', 'c']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same', 'same'], ['same', 'same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2', 'k3']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2'], ['+', 'k3']]), ('repeated line after a replaced one', [['r4', 'r4'], ['q', 'r4']], [['-', 'r4'], ['+', 'q'], [' ', 'r4']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    5: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2', 'n3', 'n4']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2'], ['+', 'n3'], ['+', 'n4']]), ('deletion at the end', [['a', 'b', 'c', 'd', 't1', 't2'], ['a', 'b', 'c', 'd']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], [' ', 'd'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same', 'same', 'same'], ['same', 'same', 'same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2', 'k3', 'k4']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2'], ['+', 'k3'], ['+', 'k4']]), ('repeated line after a replaced one', [['r5', 'r5'], ['q', 'r5']], [['-', 'r5'], ['+', 'q'], [' ', 'r5']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n}[N]\nfor label, args, expected in cases:\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":"a1135c8bb4c2c5722eca104bbc4aa514a1931c7a6591464c5c6b5f7bc5725000","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    n, m = len(a), len(b)\n    T = [[0] * (m + 1) for _ in range(n + 1)]\n    for i in range(n - 1, -1, -1):\n        for j in range(m - 1, -1, -1):\n            if a[i] == b[j]:\n                T[i][j] = T[i + 1][j + 1] + 1\n            else:\n                T[i][j] = max(T[i + 1][j], T[i][j + 1])\n    out = []\n    i = j = 0\n    while i < n and j < m:\n        if a[i] == b[j]:\n            out.append([' ', a[i]])\n            i += 1\n            j += 1\n        elif T[i + 1][j] >= T[i][j + 1]:\n            out.append(['-', a[i]])\n            i += 1\n        else:\n            out.append(['+', b[j]])\n            j += 1\n    out.extend(['-', x] for x in a[i + 1:])\n    out.extend(['+', x] for x in b[j:])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0']], [[' ', 'a'], [' ', 'b'], ['+', 'n0']]), ('deletion at the end', [['a', 'b', 'c', 't1', 't2'], ['a', 'b', 'c']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same'], ['same']], [[' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0']], [['+', 'k0']]), ('repeated line after a replaced one', [['r1', 'r1'], ['q', 'r1']], [['-', 'r1'], ['+', 'q'], [' ', 'r1']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    2: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1']]), ('deletion at the end', [['a', 'b', 'c', 'd', 't1', 't2'], ['a', 'b', 'c', 'd']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], [' ', 'd'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same'], ['same', 'same']], [[' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1']], [['+', 'k0'], ['+', 'k1']]), ('repeated line after a replaced one', [['r2', 'r2'], ['q', 'r2']], [['-', 'r2'], ['+', 'q'], [' ', 'r2']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    3: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2']]), ('deletion at the end', [['a', 'b', 't1', 't2'], ['a', 'b']], [[' ', 'a'], [' ', 'b'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same'], ['same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2']]), ('repeated line after a replaced one', [['r3', 'r3'], ['q', 'r3']], [['-', 'r3'], ['+', 'q'], [' ', 'r3']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    4: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2', 'n3']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2'], ['+', 'n3']]), ('deletion at the end', [['a', 'b', 'c', 't1', 't2'], ['a', 'b', 'c']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same', 'same'], ['same', 'same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2', 'k3']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2'], ['+', 'k3']]), ('repeated line after a replaced one', [['r4', 'r4'], ['q', 'r4']], [['-', 'r4'], ['+', 'q'], [' ', 'r4']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    5: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2', 'n3', 'n4']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2'], ['+', 'n3'], ['+', 'n4']]), ('deletion at the end', [['a', 'b', 'c', 'd', 't1', 't2'], ['a', 'b', 'c', 'd']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], [' ', 'd'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same', 'same', 'same'], ['same', 'same', 'same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2', 'k3', 'k4']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2'], ['+', 'k3'], ['+', 'k4']]), ('repeated line after a replaced one', [['r5', 'r5'], ['q', 'r5']], [['-', 'r5'], ['+', 'q'], [' ', 'r5']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n}[N]\nfor label, args, expected in cases:\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":"6d51e625680a20e00a1b6fbdacab4b2ea9ab2102a7becd87a6c9b5169b5a7d22","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    n, m = len(a), len(b)\n    T = [[0] * (m + 1) for _ in range(n + 1)]\n    for i in range(n - 1, -1, -1):\n        for j in range(m - 1, -1, -1):\n            if a[i] == b[j]:\n                T[i][j] = T[i + 1][j + 1] + 1\n            else:\n                T[i][j] = max(T[i + 1][j], T[i][j + 1])\n    out = []\n    i = j = 0\n    while i < n and j < m:\n        if a[i] == b[j]:\n            out.append([' ', a[i]])\n            i += 1\n            j += 1\n        elif T[i + 1][j] >= T[i][j + 1]:\n            out.append(['-', a[i]])\n            i += 1\n        else:\n            out.append(['+', b[j]])\n            j += 1\n    out.extend(['-', x] for x in a[i:])\n    out.extend(['+', x] for x in b[j:])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0']], [[' ', 'a'], [' ', 'b'], ['+', 'n0']]), ('deletion at the end', [['a', 'b', 'c', 't1', 't2'], ['a', 'b', 'c']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same'], ['same']], [[' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0']], [['+', 'k0']]), ('repeated line after a replaced one', [['r1', 'r1'], ['q', 'r1']], [['-', 'r1'], ['+', 'q'], [' ', 'r1']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    2: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1']]), ('deletion at the end', [['a', 'b', 'c', 'd', 't1', 't2'], ['a', 'b', 'c', 'd']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], [' ', 'd'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same'], ['same', 'same']], [[' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1']], [['+', 'k0'], ['+', 'k1']]), ('repeated line after a replaced one', [['r2', 'r2'], ['q', 'r2']], [['-', 'r2'], ['+', 'q'], [' ', 'r2']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    3: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2']]), ('deletion at the end', [['a', 'b', 't1', 't2'], ['a', 'b']], [[' ', 'a'], [' ', 'b'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same'], ['same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2']]), ('repeated line after a replaced one', [['r3', 'r3'], ['q', 'r3']], [['-', 'r3'], ['+', 'q'], [' ', 'r3']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    4: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2', 'n3']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2'], ['+', 'n3']]), ('deletion at the end', [['a', 'b', 'c', 't1', 't2'], ['a', 'b', 'c']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same', 'same'], ['same', 'same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2', 'k3']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2'], ['+', 'k3']]), ('repeated line after a replaced one', [['r4', 'r4'], ['q', 'r4']], [['-', 'r4'], ['+', 'q'], [' ', 'r4']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n    5: [('single replaced line', [['a', 'b', 'c'], ['a', 'x', 'c']], [[' ', 'a'], ['-', 'b'], ['+', 'x'], [' ', 'c']]), ('insertion at the end', [['a', 'b'], ['a', 'b', 'n0', 'n1', 'n2', 'n3', 'n4']], [[' ', 'a'], [' ', 'b'], ['+', 'n0'], ['+', 'n1'], ['+', 'n2'], ['+', 'n3'], ['+', 'n4']]), ('deletion at the end', [['a', 'b', 'c', 'd', 't1', 't2'], ['a', 'b', 'c', 'd']], [[' ', 'a'], [' ', 'b'], [' ', 'c'], [' ', 'd'], ['-', 't1'], ['-', 't2']]), ('tie prefers deletion first', [['p', 'q'], ['q', 'p']], [['-', 'p'], [' ', 'q'], ['+', 'p']]), ('moved block', [['h', 'x', 'y', 'z', 't'], ['h', 'z', 'x', 'y', 't']], [[' ', 'h'], ['+', 'z'], [' ', 'x'], [' ', 'y'], ['-', 'z'], [' ', 't']]), ('identical sequences', [['same', 'same', 'same', 'same', 'same'], ['same', 'same', 'same', 'same', 'same']], [[' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same'], [' ', 'same']]), ('first lines differ', [['A', 'b', 'c', 'd'], ['B', 'b', 'c', 'd']], [['-', 'A'], ['+', 'B'], [' ', 'b'], [' ', 'c'], [' ', 'd']]), ('empty old side', [[], ['k0', 'k1', 'k2', 'k3', 'k4']], [['+', 'k0'], ['+', 'k1'], ['+', 'k2'], ['+', 'k3'], ['+', 'k4']]), ('repeated line after a replaced one', [['r5', 'r5'], ['q', 'r5']], [['-', 'r5'], ['+', 'q'], [' ', 'r5']]), ('lcs longer than greedy', [['a', 'b', 'c', 'x', 'y'], ['x', 'y', 'a', 'b', 'c', 'd']], [['+', 'x'], ['+', 'y'], [' ', 'a'], [' ', 'b'], [' ', 'c'], ['-', 'x'], ['-', 'y'], ['+', 'd']])],\n}[N]\nfor label, args, expected in cases:\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 of one diff, patch or merge rule with stipulated conventions; it is not a production diff or version-control implementation and makes no claim of conformance to any specific tool. 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-text-diff-merge-lcs-edit-script-tail-flush-index","generated_at":"2026-09-29T14:49:05.632986+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Line diffs are built from a longest-common-subsequence table; the walk decides how edits are ordered and presented.","repair":"Flush every remaining old line from index i.","root_cause":"Remaining old lines are flushed from i+1 instead of i.","sha256":"5a227a8f010fda6d90af1eb6b417596e77134dcbd21036d8ec6fcf0917511df3","title":"LCS edit script: the trailing deletion flush skips a line · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.602,"exit_code":1,"observations":[{"actual":[[" ","a"],["-","b"],["+","x"],[" ","c"]],"check":"single replaced line","expected":[[" ","a"],["-","b"],["+","x"],[" ","c"]],"passed":true},{"actual":[[" ","a"],[" ","b"],["+","n0"]],"check":"insertion at the end","expected":[[" ","a"],[" ","b"],["+","n0"]],"passed":true},{"actual":[[" ","a"],[" ","b"],[" ","c"],["-","t1"],["-","t2"]],"check":"deletion at the end","expected":[[" ","a"],[" ","b"],[" ","c"],["-","t1"],["-","t2"]],"passed":true},{"actual":[["-","p"],[" ","q"],["-","q"],["+","p"]],"check":"tie prefers deletion first","expected":[["-","p"],[" ","q"],["+","p"]],"passed":false},{"actual":[[" ","h"],["+","z"],[" ","x"],[" ","y"],["-","z"],[" ","t"]],"check":"moved block","expected":[[" ","h"],["+","z"],[" ","x"],[" ","y"],["-","z"],[" ","t"]],"passed":true},{"actual":[[" ","same"]],"check":"identical sequences","expected":[[" ","same"]],"passed":true},{"actual":[["-","A"],["+","B"],[" ","b"],[" ","c"],[" ","d"]],"check":"first lines differ","expected":[["-","A"],["+","B"],[" ","b"],[" ","c"],[" ","d"]],"passed":true},{"actual":[["+","k0"]],"check":"empty old side","expected":[["+","k0"]],"passed":true},{"actual":[["-","r1"],["+","q"],[" ","r1"]],"check":"repeated line after a replaced one","expected":[["-","r1"],["+","q"],[" ","r1"]],"passed":true},{"actual":[["+","x"],["+","y"],[" ","a"],[" ","b"],[" ","c"],["-","x"],["-","y"],["+","d"]],"check":"lcs longer than greedy","expected":[["+","x"],["+","y"],[" ","a"],[" ","b"],[" ","c"],["-","x"],["-","y"],["+","d"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single replaced line\", \"actual\": [[\" \", \"a\"], [\"-\", \"b\"], [\"+\", \"x\"], [\" \", \"c\"]], \"expected\": [[\" \", \"a\"], [\"-\", \"b\"], [\"+\", \"x\"], [\" \", \"c\"]], \"passed\": true}, {\"check\": \"insertion at the end\", \"actual\": [[\" \", \"a\"], [\" \", \"b\"], [\"+\", \"n0\"]], \"expected\": [[\" \", \"a\"], [\" \", \"b\"], [\"+\", \"n0\"]], \"passed\": true}, {\"check\": \"deletion at the end\", \"actual\": [[\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"t1\"], [\"-\", \"t2\"]], \"expected\": [[\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"t1\"], [\"-\", \"t2\"]], \"passed\": true}, {\"check\": \"tie prefers deletion first\", \"actual\": [[\"-\", \"p\"], [\" \", \"q\"], [\"-\", \"q\"], [\"+\", \"p\"]], \"expected\": [[\"-\", \"p\"], [\" \", \"q\"], [\"+\", \"p\"]], \"passed\": false}, {\"check\": \"moved block\", \"actual\": [[\" \", \"h\"], [\"+\", \"z\"], [\" \", \"x\"], [\" \", \"y\"], [\"-\", \"z\"], [\" \", \"t\"]], \"expected\": [[\" \", \"h\"], [\"+\", \"z\"], [\" \", \"x\"], [\" \", \"y\"], [\"-\", \"z\"], [\" \", \"t\"]], \"passed\": true}, {\"check\": \"identical sequences\", \"actual\": [[\" \", \"same\"]], \"expected\": [[\" \", \"same\"]], \"passed\": true}, {\"check\": \"first lines differ\", \"actual\": [[\"-\", \"A\"], [\"+\", \"B\"], [\" \", \"b\"], [\" \", \"c\"], [\" \", \"d\"]], \"expected\": [[\"-\", \"A\"], [\"+\", \"B\"], [\" \", \"b\"], [\" \", \"c\"], [\" \", \"d\"]], \"passed\": true}, {\"check\": \"empty old side\", \"actual\": [[\"+\", \"k0\"]], \"expected\": [[\"+\", \"k0\"]], \"passed\": true}, {\"check\": \"repeated line after a replaced one\", \"actual\": [[\"-\", \"r1\"], [\"+\", \"q\"], [\" \", \"r1\"]], \"expected\": [[\"-\", \"r1\"], [\"+\", \"q\"], [\" \", \"r1\"]], \"passed\": true}, {\"check\": \"lcs longer than greedy\", \"actual\": [[\"+\", \"x\"], [\"+\", \"y\"], [\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"x\"], [\"-\", \"y\"], [\"+\", \"d\"]], \"expected\": [[\"+\", \"x\"], [\"+\", \"y\"], [\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"x\"], [\"-\", \"y\"], [\"+\", \"d\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.825,"exit_code":1,"observations":[{"actual":[[" ","a"],["-","b"],["+","x"],[" ","c"]],"check":"single replaced line","expected":[[" ","a"],["-","b"],["+","x"],[" ","c"]],"passed":true},{"actual":[[" ","a"],[" ","b"],["+","n0"]],"check":"insertion at the end","expected":[[" ","a"],[" ","b"],["+","n0"]],"passed":true},{"actual":[[" ","a"],[" ","b"],[" ","c"],["-","t2"]],"check":"deletion at the end","expected":[[" ","a"],[" ","b"],[" ","c"],["-","t1"],["-","t2"]],"passed":false},{"actual":[["-","p"],[" ","q"],["+","p"]],"check":"tie prefers deletion first","expected":[["-","p"],[" ","q"],["+","p"]],"passed":true},{"actual":[[" ","h"],["+","z"],[" ","x"],[" ","y"],["-","z"],[" ","t"]],"check":"moved block","expected":[[" ","h"],["+","z"],[" ","x"],[" ","y"],["-","z"],[" ","t"]],"passed":true},{"actual":[[" ","same"]],"check":"identical sequences","expected":[[" ","same"]],"passed":true},{"actual":[["-","A"],["+","B"],[" ","b"],[" ","c"],[" ","d"]],"check":"first lines differ","expected":[["-","A"],["+","B"],[" ","b"],[" ","c"],[" ","d"]],"passed":true},{"actual":[["+","k0"]],"check":"empty old side","expected":[["+","k0"]],"passed":true},{"actual":[["-","r1"],["+","q"],[" ","r1"]],"check":"repeated line after a replaced one","expected":[["-","r1"],["+","q"],[" ","r1"]],"passed":true},{"actual":[["+","x"],["+","y"],[" ","a"],[" ","b"],[" ","c"],["-","x"],["-","y"],["+","d"]],"check":"lcs longer than greedy","expected":[["+","x"],["+","y"],[" ","a"],[" ","b"],[" ","c"],["-","x"],["-","y"],["+","d"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single replaced line\", \"actual\": [[\" \", \"a\"], [\"-\", \"b\"], [\"+\", \"x\"], [\" \", \"c\"]], \"expected\": [[\" \", \"a\"], [\"-\", \"b\"], [\"+\", \"x\"], [\" \", \"c\"]], \"passed\": true}, {\"check\": \"insertion at the end\", \"actual\": [[\" \", \"a\"], [\" \", \"b\"], [\"+\", \"n0\"]], \"expected\": [[\" \", \"a\"], [\" \", \"b\"], [\"+\", \"n0\"]], \"passed\": true}, {\"check\": \"deletion at the end\", \"actual\": [[\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"t2\"]], \"expected\": [[\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"t1\"], [\"-\", \"t2\"]], \"passed\": false}, {\"check\": \"tie prefers deletion first\", \"actual\": [[\"-\", \"p\"], [\" \", \"q\"], [\"+\", \"p\"]], \"expected\": [[\"-\", \"p\"], [\" \", \"q\"], [\"+\", \"p\"]], \"passed\": true}, {\"check\": \"moved block\", \"actual\": [[\" \", \"h\"], [\"+\", \"z\"], [\" \", \"x\"], [\" \", \"y\"], [\"-\", \"z\"], [\" \", \"t\"]], \"expected\": [[\" \", \"h\"], [\"+\", \"z\"], [\" \", \"x\"], [\" \", \"y\"], [\"-\", \"z\"], [\" \", \"t\"]], \"passed\": true}, {\"check\": \"identical sequences\", \"actual\": [[\" \", \"same\"]], \"expected\": [[\" \", \"same\"]], \"passed\": true}, {\"check\": \"first lines differ\", \"actual\": [[\"-\", \"A\"], [\"+\", \"B\"], [\" \", \"b\"], [\" \", \"c\"], [\" \", \"d\"]], \"expected\": [[\"-\", \"A\"], [\"+\", \"B\"], [\" \", \"b\"], [\" \", \"c\"], [\" \", \"d\"]], \"passed\": true}, {\"check\": \"empty old side\", \"actual\": [[\"+\", \"k0\"]], \"expected\": [[\"+\", \"k0\"]], \"passed\": true}, {\"check\": \"repeated line after a replaced one\", \"actual\": [[\"-\", \"r1\"], [\"+\", \"q\"], [\" \", \"r1\"]], \"expected\": [[\"-\", \"r1\"], [\"+\", \"q\"], [\" \", \"r1\"]], \"passed\": true}, {\"check\": \"lcs longer than greedy\", \"actual\": [[\"+\", \"x\"], [\"+\", \"y\"], [\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"x\"], [\"-\", \"y\"], [\"+\", \"d\"]], \"expected\": [[\"+\", \"x\"], [\"+\", \"y\"], [\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"x\"], [\"-\", \"y\"], [\"+\", \"d\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":46.533,"exit_code":0,"observations":[{"actual":[[" ","a"],["-","b"],["+","x"],[" ","c"]],"check":"single replaced line","expected":[[" ","a"],["-","b"],["+","x"],[" ","c"]],"passed":true},{"actual":[[" ","a"],[" ","b"],["+","n0"]],"check":"insertion at the end","expected":[[" ","a"],[" ","b"],["+","n0"]],"passed":true},{"actual":[[" ","a"],[" ","b"],[" ","c"],["-","t1"],["-","t2"]],"check":"deletion at the end","expected":[[" ","a"],[" ","b"],[" ","c"],["-","t1"],["-","t2"]],"passed":true},{"actual":[["-","p"],[" ","q"],["+","p"]],"check":"tie prefers deletion first","expected":[["-","p"],[" ","q"],["+","p"]],"passed":true},{"actual":[[" ","h"],["+","z"],[" ","x"],[" ","y"],["-","z"],[" ","t"]],"check":"moved block","expected":[[" ","h"],["+","z"],[" ","x"],[" ","y"],["-","z"],[" ","t"]],"passed":true},{"actual":[[" ","same"]],"check":"identical sequences","expected":[[" ","same"]],"passed":true},{"actual":[["-","A"],["+","B"],[" ","b"],[" ","c"],[" ","d"]],"check":"first lines differ","expected":[["-","A"],["+","B"],[" ","b"],[" ","c"],[" ","d"]],"passed":true},{"actual":[["+","k0"]],"check":"empty old side","expected":[["+","k0"]],"passed":true},{"actual":[["-","r1"],["+","q"],[" ","r1"]],"check":"repeated line after a replaced one","expected":[["-","r1"],["+","q"],[" ","r1"]],"passed":true},{"actual":[["+","x"],["+","y"],[" ","a"],[" ","b"],[" ","c"],["-","x"],["-","y"],["+","d"]],"check":"lcs longer than greedy","expected":[["+","x"],["+","y"],[" ","a"],[" ","b"],[" ","c"],["-","x"],["-","y"],["+","d"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"single replaced line\", \"actual\": [[\" \", \"a\"], [\"-\", \"b\"], [\"+\", \"x\"], [\" \", \"c\"]], \"expected\": [[\" \", \"a\"], [\"-\", \"b\"], [\"+\", \"x\"], [\" \", \"c\"]], \"passed\": true}, {\"check\": \"insertion at the end\", \"actual\": [[\" \", \"a\"], [\" \", \"b\"], [\"+\", \"n0\"]], \"expected\": [[\" \", \"a\"], [\" \", \"b\"], [\"+\", \"n0\"]], \"passed\": true}, {\"check\": \"deletion at the end\", \"actual\": [[\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"t1\"], [\"-\", \"t2\"]], \"expected\": [[\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"t1\"], [\"-\", \"t2\"]], \"passed\": true}, {\"check\": \"tie prefers deletion first\", \"actual\": [[\"-\", \"p\"], [\" \", \"q\"], [\"+\", \"p\"]], \"expected\": [[\"-\", \"p\"], [\" \", \"q\"], [\"+\", \"p\"]], \"passed\": true}, {\"check\": \"moved block\", \"actual\": [[\" \", \"h\"], [\"+\", \"z\"], [\" \", \"x\"], [\" \", \"y\"], [\"-\", \"z\"], [\" \", \"t\"]], \"expected\": [[\" \", \"h\"], [\"+\", \"z\"], [\" \", \"x\"], [\" \", \"y\"], [\"-\", \"z\"], [\" \", \"t\"]], \"passed\": true}, {\"check\": \"identical sequences\", \"actual\": [[\" \", \"same\"]], \"expected\": [[\" \", \"same\"]], \"passed\": true}, {\"check\": \"first lines differ\", \"actual\": [[\"-\", \"A\"], [\"+\", \"B\"], [\" \", \"b\"], [\" \", \"c\"], [\" \", \"d\"]], \"expected\": [[\"-\", \"A\"], [\"+\", \"B\"], [\" \", \"b\"], [\" \", \"c\"], [\" \", \"d\"]], \"passed\": true}, {\"check\": \"empty old side\", \"actual\": [[\"+\", \"k0\"]], \"expected\": [[\"+\", \"k0\"]], \"passed\": true}, {\"check\": \"repeated line after a replaced one\", \"actual\": [[\"-\", \"r1\"], [\"+\", \"q\"], [\" \", \"r1\"]], \"expected\": [[\"-\", \"r1\"], [\"+\", \"q\"], [\" \", \"r1\"]], \"passed\": true}, {\"check\": \"lcs longer than greedy\", \"actual\": [[\"+\", \"x\"], [\"+\", \"y\"], [\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"x\"], [\"-\", \"y\"], [\"+\", \"d\"]], \"expected\": [[\"+\", \"x\"], [\"+\", \"y\"], [\" \", \"a\"], [\" \", \"b\"], [\" \", \"c\"], [\"-\", \"x\"], [\"-\", \"y\"], [\"+\", \"d\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}