{"abstract":"Normalized diffs contain empty equalities that split merges and render as nothing.","category":"Text diff and three-way merge","checks":10,"contract":"Normalize a character diff of [op, text] (op -1 delete, 0 equal, 1 insert): drop empty texts, merge adjacent equalities, collect each run of edits into one deletion and one insertion (deletion first), move their common prefix into the preceding equality (creating one at the start if needed) and their common suffix into the following equality (appending one at the end if needed).","evaluation_group":"w2-text-diff-merge-char-diff-cleanup-merge","failed_approach":"Keeping empty equalities splits one run of edits into two, so their deletion and insertion are never grouped.","family":"w2-text-diff-merge-char-diff-cleanup-merge-empty-filter","id":"FA-75576","implementations":{"attempt":{"sha256":"55882a7322cbb985b8bf58f7ac079f3e9934cf0f2833f8b2944db9accdc37b0b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(diffs):\n    res = []\n    diffs = [list(d) for d in diffs if d[1] != '' or d[0] == 0]\n    i = 0\n    while i < len(diffs):\n        if diffs[i][0] == 0:\n            if res and res[-1][0] == 0:\n                res[-1][1] += diffs[i][1]\n            else:\n                res.append([0, diffs[i][1]])\n            i += 1\n            continue\n        dl = ins = ''\n        while i < len(diffs) and diffs[i][0] != 0:\n            if diffs[i][0] == -1:\n                dl += diffs[i][1]\n            else:\n                ins += diffs[i][1]\n            i += 1\n        suffix = ''\n        if dl and ins:\n            p = 0\n            while p < min(len(dl), len(ins)) and dl[p] == ins[p]:\n                p += 1\n            if p:\n                if res and res[-1][0] == 0:\n                    res[-1][1] += dl[:p]\n                else:\n                    res.append([0, dl[:p]])\n                dl, ins = dl[p:], ins[p:]\n            s = 0\n            while s < min(len(dl), len(ins)) and dl[-1 - s] == ins[-1 - s]:\n                s += 1\n            suffix = dl[len(dl) - s:]\n            dl, ins = dl[:len(dl) - s], ins[:len(ins) - s]\n        if dl:\n            res.append([-1, dl])\n        if ins:\n            res.append([1, ins])\n        if suffix:\n            if i < len(diffs) and diffs[i][0] == 0:\n                diffs[i] = [0, suffix + diffs[i][1]]\n            else:\n                res.append([0, suffix])\n    return res\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz1'], [1, 'uvz1']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z1']]), ('prefix at the start of the text', [[[-1, 'prea'], [1, 'preb'], [0, 'tail']]], [[0, 'pre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab1'], [0, ''], [1, 'ac1']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '1']])],\n    2: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz2'], [1, 'uvz2']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z2']]), ('prefix at the start of the text', [[[-1, 'preprea'], [1, 'prepreb'], [0, 'tail']]], [[0, 'prepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab2'], [0, ''], [1, 'ac2']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '2']])],\n    3: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz3'], [1, 'uvz3']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z3']]), ('prefix at the start of the text', [[[-1, 'prepreprea'], [1, 'preprepreb'], [0, 'tail']]], [[0, 'preprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab3'], [0, ''], [1, 'ac3']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '3']])],\n    4: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz4'], [1, 'uvz4']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z4']]), ('prefix at the start of the text', [[[-1, 'preprepreprea'], [1, 'prepreprepreb'], [0, 'tail']]], [[0, 'prepreprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab4'], [0, ''], [1, 'ac4']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '4']])],\n    5: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz5'], [1, 'uvz5']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z5']]), ('prefix at the start of the text', [[[-1, 'prepreprepreprea'], [1, 'preprepreprepreb'], [0, 'tail']]], [[0, 'preprepreprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab5'], [0, ''], [1, 'ac5']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '5']])],\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":"d66e9587885b3c9b68d861673fb0b6e43ff1e6a26e270c0292d59de707cfbbe0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(diffs):\n    res = []\n    diffs = [list(d) for d in diffs]\n    i = 0\n    while i < len(diffs):\n        if diffs[i][0] == 0:\n            if res and res[-1][0] == 0:\n                res[-1][1] += diffs[i][1]\n            else:\n                res.append([0, diffs[i][1]])\n            i += 1\n            continue\n        dl = ins = ''\n        while i < len(diffs) and diffs[i][0] != 0:\n            if diffs[i][0] == -1:\n                dl += diffs[i][1]\n            else:\n                ins += diffs[i][1]\n            i += 1\n        suffix = ''\n        if dl and ins:\n            p = 0\n            while p < min(len(dl), len(ins)) and dl[p] == ins[p]:\n                p += 1\n            if p:\n                if res and res[-1][0] == 0:\n                    res[-1][1] += dl[:p]\n                else:\n                    res.append([0, dl[:p]])\n                dl, ins = dl[p:], ins[p:]\n            s = 0\n            while s < min(len(dl), len(ins)) and dl[-1 - s] == ins[-1 - s]:\n                s += 1\n            suffix = dl[len(dl) - s:]\n            dl, ins = dl[:len(dl) - s], ins[:len(ins) - s]\n        if dl:\n            res.append([-1, dl])\n        if ins:\n            res.append([1, ins])\n        if suffix:\n            if i < len(diffs) and diffs[i][0] == 0:\n                diffs[i] = [0, suffix + diffs[i][1]]\n            else:\n                res.append([0, suffix])\n    return res\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz1'], [1, 'uvz1']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z1']]), ('prefix at the start of the text', [[[-1, 'prea'], [1, 'preb'], [0, 'tail']]], [[0, 'pre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab1'], [0, ''], [1, 'ac1']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '1']])],\n    2: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz2'], [1, 'uvz2']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z2']]), ('prefix at the start of the text', [[[-1, 'preprea'], [1, 'prepreb'], [0, 'tail']]], [[0, 'prepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab2'], [0, ''], [1, 'ac2']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '2']])],\n    3: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz3'], [1, 'uvz3']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z3']]), ('prefix at the start of the text', [[[-1, 'prepreprea'], [1, 'preprepreb'], [0, 'tail']]], [[0, 'preprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab3'], [0, ''], [1, 'ac3']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '3']])],\n    4: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz4'], [1, 'uvz4']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z4']]), ('prefix at the start of the text', [[[-1, 'preprepreprea'], [1, 'prepreprepreb'], [0, 'tail']]], [[0, 'prepreprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab4'], [0, ''], [1, 'ac4']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '4']])],\n    5: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz5'], [1, 'uvz5']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z5']]), ('prefix at the start of the text', [[[-1, 'prepreprepreprea'], [1, 'preprepreprepreb'], [0, 'tail']]], [[0, 'preprepreprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab5'], [0, ''], [1, 'ac5']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '5']])],\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":"ef74d16deb1fb8eefd5809e2832497e8e9b4b810fb3a90fc851295b7626bdcf3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(diffs):\n    res = []\n    diffs = [list(d) for d in diffs if d[1] != '']\n    i = 0\n    while i < len(diffs):\n        if diffs[i][0] == 0:\n            if res and res[-1][0] == 0:\n                res[-1][1] += diffs[i][1]\n            else:\n                res.append([0, diffs[i][1]])\n            i += 1\n            continue\n        dl = ins = ''\n        while i < len(diffs) and diffs[i][0] != 0:\n            if diffs[i][0] == -1:\n                dl += diffs[i][1]\n            else:\n                ins += diffs[i][1]\n            i += 1\n        suffix = ''\n        if dl and ins:\n            p = 0\n            while p < min(len(dl), len(ins)) and dl[p] == ins[p]:\n                p += 1\n            if p:\n                if res and res[-1][0] == 0:\n                    res[-1][1] += dl[:p]\n                else:\n                    res.append([0, dl[:p]])\n                dl, ins = dl[p:], ins[p:]\n            s = 0\n            while s < min(len(dl), len(ins)) and dl[-1 - s] == ins[-1 - s]:\n                s += 1\n            suffix = dl[len(dl) - s:]\n            dl, ins = dl[:len(dl) - s], ins[:len(ins) - s]\n        if dl:\n            res.append([-1, dl])\n        if ins:\n            res.append([1, ins])\n        if suffix:\n            if i < len(diffs) and diffs[i][0] == 0:\n                diffs[i] = [0, suffix + diffs[i][1]]\n            else:\n                res.append([0, suffix])\n    return res\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {\n    1: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz1'], [1, 'uvz1']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z1']]), ('prefix at the start of the text', [[[-1, 'prea'], [1, 'preb'], [0, 'tail']]], [[0, 'pre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab1'], [0, ''], [1, 'ac1']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '1']])],\n    2: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz2'], [1, 'uvz2']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z2']]), ('prefix at the start of the text', [[[-1, 'preprea'], [1, 'prepreb'], [0, 'tail']]], [[0, 'prepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab2'], [0, ''], [1, 'ac2']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '2']])],\n    3: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz3'], [1, 'uvz3']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z3']]), ('prefix at the start of the text', [[[-1, 'prepreprea'], [1, 'preprepreb'], [0, 'tail']]], [[0, 'preprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab3'], [0, ''], [1, 'ac3']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '3']])],\n    4: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz4'], [1, 'uvz4']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z4']]), ('prefix at the start of the text', [[[-1, 'preprepreprea'], [1, 'prepreprepreb'], [0, 'tail']]], [[0, 'prepreprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab4'], [0, ''], [1, 'ac4']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '4']])],\n    5: [('adjacent equalities merge', [[[0, 'ab'], [0, 'cd']]], [[0, 'abcd']]), ('empty entries are dropped', [[[0, 'a'], [-1, ''], [1, 'b'], [0, '']]], [[0, 'a'], [1, 'b']]), ('common prefix moves into the previous equality', [[[0, 'x'], [-1, 'abc'], [1, 'abd'], [0, 'y']]], [[0, 'xab'], [-1, 'c'], [1, 'd'], [0, 'y']]), ('common suffix moves into the next equality', [[[0, 'p'], [-1, 'kz'], [1, 'mz'], [0, 'q']]], [[0, 'p'], [-1, 'k'], [1, 'm'], [0, 'zq']]), ('no common affix', [[[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]], [[0, 'h'], [-1, 'ab'], [1, 'cd'], [0, 'e']]), ('interleaved edits are grouped deletion first', [[[1, 'I'], [-1, 'D'], [1, 'J'], [-1, 'E']]], [[-1, 'DE'], [1, 'IJ']]), ('suffix at the end of the text', [[[0, 'st'], [-1, 'xyz5'], [1, 'uvz5']]], [[0, 'st'], [-1, 'xy'], [1, 'uv'], [0, 'z5']]), ('prefix at the start of the text', [[[-1, 'prepreprepreprea'], [1, 'preprepreprepreb'], [0, 'tail']]], [[0, 'preprepreprepre'], [-1, 'a'], [1, 'b'], [0, 'tail']]), ('insertion only', [[[0, 'a'], [1, 'b'], [0, 'c']]], [[0, 'a'], [1, 'b'], [0, 'c']]), ('empty equality between edits', [[[0, 'k'], [-1, 'ab5'], [0, ''], [1, 'ac5']]], [[0, 'ka'], [-1, 'b'], [1, 'c'], [0, '5']])],\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-char-diff-cleanup-merge-empty-filter","generated_at":"2026-09-29T14:49:08.092796+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Character-level diff engines normalize raw edit scripts so that the same change always renders the same way.","repair":"Drop every entry whose text is empty before merging.","root_cause":"Entries with empty text are not removed before merging.","sha256":"0a6f23a9cc409903649418780b6ce79b6b5bfaffcb5886cdeb482cabcd3f7694","title":"Character diff cleanup merge: empty entries survive cleanup · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.662,"exit_code":1,"observations":[{"actual":[[0,"abcd"]],"check":"adjacent equalities merge","expected":[[0,"abcd"]],"passed":true},{"actual":[[0,"a"],[1,"b"],[0,""]],"check":"empty entries are dropped","expected":[[0,"a"],[1,"b"]],"passed":false},{"actual":[[0,"xab"],[-1,"c"],[1,"d"],[0,"y"]],"check":"common prefix moves into the previous equality","expected":[[0,"xab"],[-1,"c"],[1,"d"],[0,"y"]],"passed":true},{"actual":[[0,"p"],[-1,"k"],[1,"m"],[0,"zq"]],"check":"common suffix moves into the next equality","expected":[[0,"p"],[-1,"k"],[1,"m"],[0,"zq"]],"passed":true},{"actual":[[0,"h"],[-1,"ab"],[1,"cd"],[0,"e"]],"check":"no common affix","expected":[[0,"h"],[-1,"ab"],[1,"cd"],[0,"e"]],"passed":true},{"actual":[[-1,"DE"],[1,"IJ"]],"check":"interleaved edits are grouped deletion first","expected":[[-1,"DE"],[1,"IJ"]],"passed":true},{"actual":[[0,"st"],[-1,"xy"],[1,"uv"],[0,"z1"]],"check":"suffix at the end of the text","expected":[[0,"st"],[-1,"xy"],[1,"uv"],[0,"z1"]],"passed":true},{"actual":[[0,"pre"],[-1,"a"],[1,"b"],[0,"tail"]],"check":"prefix at the start of the text","expected":[[0,"pre"],[-1,"a"],[1,"b"],[0,"tail"]],"passed":true},{"actual":[[0,"a"],[1,"b"],[0,"c"]],"check":"insertion only","expected":[[0,"a"],[1,"b"],[0,"c"]],"passed":true},{"actual":[[0,"k"],[-1,"ab1"],[0,""],[1,"ac1"]],"check":"empty equality between edits","expected":[[0,"ka"],[-1,"b"],[1,"c"],[0,"1"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"adjacent equalities merge\", \"actual\": [[0, \"abcd\"]], \"expected\": [[0, \"abcd\"]], \"passed\": true}, {\"check\": \"empty entries are dropped\", \"actual\": [[0, \"a\"], [1, \"b\"], [0, \"\"]], \"expected\": [[0, \"a\"], [1, \"b\"]], \"passed\": false}, {\"check\": \"common prefix moves into the previous equality\", \"actual\": [[0, \"xab\"], [-1, \"c\"], [1, \"d\"], [0, \"y\"]], \"expected\": [[0, \"xab\"], [-1, \"c\"], [1, \"d\"], [0, \"y\"]], \"passed\": true}, {\"check\": \"common suffix moves into the next equality\", \"actual\": [[0, \"p\"], [-1, \"k\"], [1, \"m\"], [0, \"zq\"]], \"expected\": [[0, \"p\"], [-1, \"k\"], [1, \"m\"], [0, \"zq\"]], \"passed\": true}, {\"check\": \"no common affix\", \"actual\": [[0, \"h\"], [-1, \"ab\"], [1, \"cd\"], [0, \"e\"]], \"expected\": [[0, \"h\"], [-1, \"ab\"], [1, \"cd\"], [0, \"e\"]], \"passed\": true}, {\"check\": \"interleaved edits are grouped deletion first\", \"actual\": [[-1, \"DE\"], [1, \"IJ\"]], \"expected\": [[-1, \"DE\"], [1, \"IJ\"]], \"passed\": true}, {\"check\": \"suffix at the end of the text\", \"actual\": [[0, \"st\"], [-1, \"xy\"], [1, \"uv\"], [0, \"z1\"]], \"expected\": [[0, \"st\"], [-1, \"xy\"], [1, \"uv\"], [0, \"z1\"]], \"passed\": true}, {\"check\": \"prefix at the start of the text\", \"actual\": [[0, \"pre\"], [-1, \"a\"], [1, \"b\"], [0, \"tail\"]], \"expected\": [[0, \"pre\"], [-1, \"a\"], [1, \"b\"], [0, \"tail\"]], \"passed\": true}, {\"check\": \"insertion only\", \"actual\": [[0, \"a\"], [1, \"b\"], [0, \"c\"]], \"expected\": [[0, \"a\"], [1, \"b\"], [0, \"c\"]], \"passed\": true}, {\"check\": \"empty equality between edits\", \"actual\": [[0, \"k\"], [-1, \"ab1\"], [0, \"\"], [1, \"ac1\"]], \"expected\": [[0, \"ka\"], [-1, \"b\"], [1, \"c\"], [0, \"1\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.538,"exit_code":1,"observations":[{"actual":[[0,"abcd"]],"check":"adjacent equalities merge","expected":[[0,"abcd"]],"passed":true},{"actual":[[0,"a"],[1,"b"],[0,""]],"check":"empty entries are dropped","expected":[[0,"a"],[1,"b"]],"passed":false},{"actual":[[0,"xab"],[-1,"c"],[1,"d"],[0,"y"]],"check":"common prefix moves into the previous equality","expected":[[0,"xab"],[-1,"c"],[1,"d"],[0,"y"]],"passed":true},{"actual":[[0,"p"],[-1,"k"],[1,"m"],[0,"zq"]],"check":"common suffix moves into the next equality","expected":[[0,"p"],[-1,"k"],[1,"m"],[0,"zq"]],"passed":true},{"actual":[[0,"h"],[-1,"ab"],[1,"cd"],[0,"e"]],"check":"no common affix","expected":[[0,"h"],[-1,"ab"],[1,"cd"],[0,"e"]],"passed":true},{"actual":[[-1,"DE"],[1,"IJ"]],"check":"interleaved edits are grouped deletion first","expected":[[-1,"DE"],[1,"IJ"]],"passed":true},{"actual":[[0,"st"],[-1,"xy"],[1,"uv"],[0,"z1"]],"check":"suffix at the end of the text","expected":[[0,"st"],[-1,"xy"],[1,"uv"],[0,"z1"]],"passed":true},{"actual":[[0,"pre"],[-1,"a"],[1,"b"],[0,"tail"]],"check":"prefix at the start of the text","expected":[[0,"pre"],[-1,"a"],[1,"b"],[0,"tail"]],"passed":true},{"actual":[[0,"a"],[1,"b"],[0,"c"]],"check":"insertion only","expected":[[0,"a"],[1,"b"],[0,"c"]],"passed":true},{"actual":[[0,"k"],[-1,"ab1"],[0,""],[1,"ac1"]],"check":"empty equality between edits","expected":[[0,"ka"],[-1,"b"],[1,"c"],[0,"1"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"adjacent equalities merge\", \"actual\": [[0, \"abcd\"]], \"expected\": [[0, \"abcd\"]], \"passed\": true}, {\"check\": \"empty entries are dropped\", \"actual\": [[0, \"a\"], [1, \"b\"], [0, \"\"]], \"expected\": [[0, \"a\"], [1, \"b\"]], \"passed\": false}, {\"check\": \"common prefix moves into the previous equality\", \"actual\": [[0, \"xab\"], [-1, \"c\"], [1, \"d\"], [0, \"y\"]], \"expected\": [[0, \"xab\"], [-1, \"c\"], [1, \"d\"], [0, \"y\"]], \"passed\": true}, {\"check\": \"common suffix moves into the next equality\", \"actual\": [[0, \"p\"], [-1, \"k\"], [1, \"m\"], [0, \"zq\"]], \"expected\": [[0, \"p\"], [-1, \"k\"], [1, \"m\"], [0, \"zq\"]], \"passed\": true}, {\"check\": \"no common affix\", \"actual\": [[0, \"h\"], [-1, \"ab\"], [1, \"cd\"], [0, \"e\"]], \"expected\": [[0, \"h\"], [-1, \"ab\"], [1, \"cd\"], [0, \"e\"]], \"passed\": true}, {\"check\": \"interleaved edits are grouped deletion first\", \"actual\": [[-1, \"DE\"], [1, \"IJ\"]], \"expected\": [[-1, \"DE\"], [1, \"IJ\"]], \"passed\": true}, {\"check\": \"suffix at the end of the text\", \"actual\": [[0, \"st\"], [-1, \"xy\"], [1, \"uv\"], [0, \"z1\"]], \"expected\": [[0, \"st\"], [-1, \"xy\"], [1, \"uv\"], [0, \"z1\"]], \"passed\": true}, {\"check\": \"prefix at the start of the text\", \"actual\": [[0, \"pre\"], [-1, \"a\"], [1, \"b\"], [0, \"tail\"]], \"expected\": [[0, \"pre\"], [-1, \"a\"], [1, \"b\"], [0, \"tail\"]], \"passed\": true}, {\"check\": \"insertion only\", \"actual\": [[0, \"a\"], [1, \"b\"], [0, \"c\"]], \"expected\": [[0, \"a\"], [1, \"b\"], [0, \"c\"]], \"passed\": true}, {\"check\": \"empty equality between edits\", \"actual\": [[0, \"k\"], [-1, \"ab1\"], [0, \"\"], [1, \"ac1\"]], \"expected\": [[0, \"ka\"], [-1, \"b\"], [1, \"c\"], [0, \"1\"]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":73.858,"exit_code":0,"observations":[{"actual":[[0,"abcd"]],"check":"adjacent equalities merge","expected":[[0,"abcd"]],"passed":true},{"actual":[[0,"a"],[1,"b"]],"check":"empty entries are dropped","expected":[[0,"a"],[1,"b"]],"passed":true},{"actual":[[0,"xab"],[-1,"c"],[1,"d"],[0,"y"]],"check":"common prefix moves into the previous equality","expected":[[0,"xab"],[-1,"c"],[1,"d"],[0,"y"]],"passed":true},{"actual":[[0,"p"],[-1,"k"],[1,"m"],[0,"zq"]],"check":"common suffix moves into the next equality","expected":[[0,"p"],[-1,"k"],[1,"m"],[0,"zq"]],"passed":true},{"actual":[[0,"h"],[-1,"ab"],[1,"cd"],[0,"e"]],"check":"no common affix","expected":[[0,"h"],[-1,"ab"],[1,"cd"],[0,"e"]],"passed":true},{"actual":[[-1,"DE"],[1,"IJ"]],"check":"interleaved edits are grouped deletion first","expected":[[-1,"DE"],[1,"IJ"]],"passed":true},{"actual":[[0,"st"],[-1,"xy"],[1,"uv"],[0,"z1"]],"check":"suffix at the end of the text","expected":[[0,"st"],[-1,"xy"],[1,"uv"],[0,"z1"]],"passed":true},{"actual":[[0,"pre"],[-1,"a"],[1,"b"],[0,"tail"]],"check":"prefix at the start of the text","expected":[[0,"pre"],[-1,"a"],[1,"b"],[0,"tail"]],"passed":true},{"actual":[[0,"a"],[1,"b"],[0,"c"]],"check":"insertion only","expected":[[0,"a"],[1,"b"],[0,"c"]],"passed":true},{"actual":[[0,"ka"],[-1,"b"],[1,"c"],[0,"1"]],"check":"empty equality between edits","expected":[[0,"ka"],[-1,"b"],[1,"c"],[0,"1"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"adjacent equalities merge\", \"actual\": [[0, \"abcd\"]], \"expected\": [[0, \"abcd\"]], \"passed\": true}, {\"check\": \"empty entries are dropped\", \"actual\": [[0, \"a\"], [1, \"b\"]], \"expected\": [[0, \"a\"], [1, \"b\"]], \"passed\": true}, {\"check\": \"common prefix moves into the previous equality\", \"actual\": [[0, \"xab\"], [-1, \"c\"], [1, \"d\"], [0, \"y\"]], \"expected\": [[0, \"xab\"], [-1, \"c\"], [1, \"d\"], [0, \"y\"]], \"passed\": true}, {\"check\": \"common suffix moves into the next equality\", \"actual\": [[0, \"p\"], [-1, \"k\"], [1, \"m\"], [0, \"zq\"]], \"expected\": [[0, \"p\"], [-1, \"k\"], [1, \"m\"], [0, \"zq\"]], \"passed\": true}, {\"check\": \"no common affix\", \"actual\": [[0, \"h\"], [-1, \"ab\"], [1, \"cd\"], [0, \"e\"]], \"expected\": [[0, \"h\"], [-1, \"ab\"], [1, \"cd\"], [0, \"e\"]], \"passed\": true}, {\"check\": \"interleaved edits are grouped deletion first\", \"actual\": [[-1, \"DE\"], [1, \"IJ\"]], \"expected\": [[-1, \"DE\"], [1, \"IJ\"]], \"passed\": true}, {\"check\": \"suffix at the end of the text\", \"actual\": [[0, \"st\"], [-1, \"xy\"], [1, \"uv\"], [0, \"z1\"]], \"expected\": [[0, \"st\"], [-1, \"xy\"], [1, \"uv\"], [0, \"z1\"]], \"passed\": true}, {\"check\": \"prefix at the start of the text\", \"actual\": [[0, \"pre\"], [-1, \"a\"], [1, \"b\"], [0, \"tail\"]], \"expected\": [[0, \"pre\"], [-1, \"a\"], [1, \"b\"], [0, \"tail\"]], \"passed\": true}, {\"check\": \"insertion only\", \"actual\": [[0, \"a\"], [1, \"b\"], [0, \"c\"]], \"expected\": [[0, \"a\"], [1, \"b\"], [0, \"c\"]], \"passed\": true}, {\"check\": \"empty equality between edits\", \"actual\": [[0, \"ka\"], [-1, \"b\"], [1, \"c\"], [0, \"1\"]], \"expected\": [[0, \"ka\"], [-1, \"b\"], [1, \"c\"], [0, \"1\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}