FAILURE MAP
← Case archive

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

Patience diff anchors: piles are keyed by old index instead of new index · case 03

Crossing unique lines are all kept as anchors, producing an inconsistent alignment.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Candidates are lines occurring exactly once in the old side and exactly once in the new side, as (old index, new index) pairs in old order. Keep the longest chain with increasing new index, found with patience piles (bisect on pile tops by new index, back pointers to the previous pile top) and reconstructed from the top of the last pile. Return the anchor pairs.

Why this case matters

Patience diff anchors on unique lines to produce readable diffs of code with many repeated braces and blank lines.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
crossing unique lines keep the longest chain[[0, 2], [1, 0], [2, 1], [3, 3]][[1, 0], [2, 1], [3, 3]]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 ↗