Fixes #01M5XFSJTVQ8ZY5WWC1GMTPNFZ.
Why
The Files tab reviewed an open request with a three-dot diff against the base branch. Once the request lands, the head is in the base, so the merge base of the two is the head itself and the diff is empty by definition. A merged request therefore showed “Already merged into main” and no files — the review surface disappeared exactly when someone would look back at what the merge changed.
What changed
The landing mark records merged_base, the base tip the merge started from,
in the same commit that records merged_head, merged_by and merged_at:
merged_base: 3f2a9c1... # what the base pointed at before it moved
merged_head: 7b41e08... # what landed (the head, or the merge commit)
vole change merge passes the tip it replaced, so the record names the
“before” side of the change. A retry that finds the head already landed has
no base tip of its own to name and passes nothing, which keeps whatever the
record already says instead of replacing it with the moved tip.
The Files tab now diffs merged_base against the landing, so a merged
request shows what it changed — the head for a fast-forward, the merge
commit for a non-fast-forward, which includes conflict resolution.
merged_base is optional on read because landings made before the field
existed have none; those fall back to the merge commit’s first parent when
the landing was a merge, and claim nothing when it was a fast-forward and
the starting point is gone.
The request page shows the file count and the review link for a merged request too, with the merge named beside it, instead of replacing them with “Already merged”.
Checks
vole workflow checkvole workflow run verify(format, vet, build, govulncheck, packages, markdown links,go test -race ./...)- New coverage: a merged record’s
merged_baseis written by a fast-forward and by a merge-commit landing, survives a retry, and is validated when read; the diff range picks the recorded base, the merge parent fallback, or nothing for a legacy fast-forward; and an end-to-end landing keeps the changed file on the request page and the Files tab.