FA-75613 / Text diff and three-way merge / Member archive
Rename similarity pairing: candidates are paired in path order instead of by score · case 03
A weaker pairing claims a file before its best match is considered.
Case contract
For deleted and added files (path -> lines), a pair scores floor(100 * multiset-common-lines / max(len_a, len_b)); empty files never pair. Pairs scoring at least the threshold are taken greedily by descending score, ties by (deleted path, added path) ascending, each file used at most once. Return [deleted, added, score] triples sorted by deleted path.
Why this case matters
Rename and copy detection decides whether a delete plus an add is shown as a rename with a small diff.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| lower score pairs after higher ones | [["x", "p", 90], ["y", "q", 50]] | [["x", "q", 100], ["y", "p", 50]] | 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 ↗