FAILURE MAP
← Case archive

FA-75345 / Text diff and three-way merge / Member archive

LCS edit script: a match extends the wrong neighbouring cell · case 05

Diffs contain more insertions and deletions than necessary around repeated lines.

Member previewVariant 5 · 3 implementations · 10 checks per implementation

Case 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 " ", "-", "+".

Why this case matters

Line diffs are built from a longest-common-subsequence table; the walk decides how edits are ordered and presented.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
repeated line after a replaced one[["+", "q"], [" ", "r5"], ["-", "r5"]][["-", "r5"], ["+", "q"], [" ", "r5"]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗