sx-git Phase 5: diff — Myers line diff + structural tree diff + unified render (TDD)

Myers O(ND) forward/backtrack over line vectors (dict-vec), edit script
{:op eq|del|add :line}, reconstruction invariants both sides, paper example
D=5 verified; unified hunks with context 3, merged ranges, exact header
math for empty sides; tree/commit structural diff over flattened trees;
whole-commit unified render. 27/27, total 159/159.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 12:15:51 +00:00
parent 125d9f1398
commit 4d5a60a754
5 changed files with 595 additions and 5 deletions

View File

@@ -3,9 +3,10 @@
"object": {"pass": 38, "fail": 0},
"ref": {"pass": 38, "fail": 0},
"dag": {"pass": 30, "fail": 0},
"worktree": {"pass": 26, "fail": 0}
"worktree": {"pass": 26, "fail": 0},
"diff": {"pass": 27, "fail": 0}
},
"total_pass": 132,
"total_pass": 159,
"total_fail": 0,
"total": 132
"total": 159
}