FA-75579 / Text diff and three-way merge / Member archive
Character diff cleanup merge: empty entries survive cleanup · case 04
Normalized diffs contain empty equalities that split merges and render as nothing.
Case 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).
Why this case matters
Character-level diff engines normalize raw edit scripts so that the same change always renders the same way.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| empty entries are dropped | [[0, "a"], [1, "b"], [0, ""]] | [[0, "a"], [1, "b"]] | 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 ↗