a73x

517b472d

Spec: the multi-base bound test needs three bases, not two

a73x   2026-08-10 07:30

Commit message
Spec: the multi-base bound test needs three bases, not two

For two inputs merge_base_many degenerates to the symmetric binary
merge_base and is correct, so a two-base test passes on both
implementations. Caught in implementation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

docs/superpowers/specs/2026-08-09-merge-recording-design.md
Old New
@@ -107,7 +107,10 @@ inputs. On a linear chain A-B-C-D-E, `git merge-base A B D` is A but
107 commit sitting between them is never seen: the scan then records nothing, silently, 107 commit sitting between them is never seen: the scan then records nothing, silently,
108 for exactly the case layer 2 exists to serve. Fold binary `merge_base` over the 108 for exactly the case layer 2 exists to serve. Fold binary `merge_base` over the
109 bases (or use octopus, which git2 0.19 does not expose). Tests must cover a 109 bases (or use octopus, which git2 0.19 does not expose). Tests must cover a
110 multi-base bound, since a single-base test cannot distinguish the two. 110 bound over **three** bases. Two is not enough: for two inputs
111 `git_merge_base_many` degenerates to the symmetric binary `merge_base` and is
112 correct, so no two-base test — unit or end to end — can tell the two
113 implementations apart.
111 114
112 ### Why this survives a squash 115 ### Why this survives a squash
113 116
@@ -265,8 +268,9 @@ still worth doing; it stops being load-bearing.
265 - An issue closed by a merge and then deliberately reopened stays open across 268 - An issue closed by a merge and then deliberately reopened stays open across
266 repeated syncs. 269 repeated syncs.
267 - A merge recorded with the close half-failed is closed by the next scan. 270 - A merge recorded with the close half-failed is closed by the next scan.
268 - Two open patches on one base with unrelated bases, one merged by a commit 271 - Three open patches on one base with distinct bases, the oldest one merged by a
269 older than the other's base, is still recorded — the multi-base bound case. 272 commit below the other two's bases, is still recorded — the multi-base bound
273 case. Three, not two; see above.
270 - A `Patch:` trailer naming an unknown, ambiguous, or archived patch warns and 274 - A `Patch:` trailer naming an unknown, ambiguous, or archived patch warns and
271 leaves sync successful. 275 leaves sync successful.
272 - `Patch: abc merged by me` parses to nothing. 276 - `Patch: abc merged by me` parses to nothing.