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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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