Preserve three-dot failure semantics without a merge base #31

Closed
opened 2026-10-27 13:34:40 +00:00 by sam · 0 comments
Owner

patch silently computes a direct tree diff when base and HEAD have no merge base, contradicting its three-dot contract and corrupting diff-cap and gate inputs.

Acceptance criteria

Unrelated histories return a clear error from Diff, ChangedFiles, and ChangedLines; shared-history merge-base behavior remains covered.

Close reason

Fixed on main: patch() now errors with 'no common ancestor' when MergeBase returns no bases (worktree.go:498-501) instead of falling back to a direct tree diff, so Diff/ChangedFiles/ChangedLines all fail closed on unrelated histories.


Imported from beads archie-core-1ysw.5 · GitHub #599 · type bug · priority P2 · created 2026-08-22 · closed 2026-08-24

patch silently computes a direct tree diff when base and HEAD have no merge base, contradicting its three-dot contract and corrupting diff-cap and gate inputs. ### Acceptance criteria Unrelated histories return a clear error from Diff, ChangedFiles, and ChangedLines; shared-history merge-base behavior remains covered. ### Close reason Fixed on main: patch() now errors with 'no common ancestor' when MergeBase returns no bases (worktree.go:498-501) instead of falling back to a direct tree diff, so Diff/ChangedFiles/ChangedLines all fail closed on unrelated histories. --- _Imported from beads `archie-core-1ysw.5` · GitHub #599 · type bug · priority P2 · created 2026-08-22 · closed 2026-08-24_
sam added the mediumbug labels 2026-10-27 13:34:40 +00:00
sam self-assigned this 2026-10-27 13:34:40 +00:00
sam closed this issue 2026-10-27 13:34:40 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#31