FA-75458 / Text diff and three-way merge / Member archive
diff3 chunk merge: conflicts omit the base section · case 03
Conflict hunks lack the original text, contrary to the diff3 conflict style.
Case contract
Match base against ours and against theirs with difflib.SequenceMatcher (autojunk off). Base lines matched on both sides are stable anchors. Between consecutive anchors (and after the last) compare the three regions: unchanged ours takes theirs, unchanged theirs takes ours, identical changes take ours, anything else is a conflict rendered as "<<<<<<< ours", ours, "||||||| base", base, "=======", theirs, ">>>>>>> theirs". Return merged lines and the conflict count.
Why this case matters
Three-way merge tools classify each region between stable lines to decide between clean merges and conflicts.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| conflicting edits | {"conflicts": 1, "merged": ["a", "b", "\u003c\u003c\u003c\u003c\u003c\u003c\u003c ours", "X", "=======", "Y", "\u003e\u003e\u003e\u003e\u003e\u003e\u003e theirs", "d", "e"]} | {"conflicts": 1, "merged": ["a", "b", "\u003c\u003c\u003c\u003c\u003c\u003c\u003c ours", "X", "||||||| base", "c", "=======", "Y", "\u003e\u003e\u003e\u003e\u003e\u003e\u003e theirs", "d", "e"]} | 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 ↗