beads/internal/storage/versioncontrolops
Steve Yegge 508d359211 fix(automerge): tell a no-op merge write from a vanished row (wy-o8swn)
The conflict resolvers read res.RowsAffected()==0 after their UPDATE as
proof the row had been deleted concurrently, and aborted the whole merge
saying so. But doltutil/dsn.go sets parseTime and multiStatements and NOT
clientFoundRows, so RowsAffected is rows CHANGED, not rows MATCHED: a
merged write the backend normalizes to the bytes already stored reports
zero exactly as a vanished row does, and a correct merge died on a
message about a deletion that never happened.

Ask instead. conflictTargetStillPresent is the matched-rows check both
sites lacked, and it covers the operator path too — resolveOneConflictRow
(bd conflicts resolve --theirs <id>) carried the identical conflation,
where a misleading abort is worse because the operator named the row. It
confirms only that the key still resolves to a row, which is the honest
postcondition: comparing the written values would reintroduce the very
normalization sensitivity this exists to absorb. A check that cannot be
run refuses rather than clearing a conflict it could not confirm.

Second half: the bulk load never rejected duplicate conflict rows sharing
one our-side key the way loadConflictRow does for the single-row path. If
dolt ever emits two, the first DELETE ... WHERE our_id = ? clears both
and the next iteration aborts on "no conflict row deleted" — again a
message about the wrong thing, after a row was resolved without ever
being merged. duplicateConflictKey now catches that shape, and the
pre-screens DECLINE on it rather than erroring: an error out of
issuesConflictsAreFieldMergeable is swallowed by SettleMerge's abort path
and would turn a reportable conflict into an opaque pull failure, where a
decline still builds the MergeConflictsError that names the tables an
operator has to look at. Rows whose our side is NULL (delete/modify) are
skipped — they are never the target of a keyed delete.

Neither shape is known to fire today; both were left unfixed at the tail
of the wy-jpd3.6 diff (F7) rather than patched in a hurry.
2026-07-25 04:50:05 -07:00
..
automerge.go fix(automerge): tell a no-op merge write from a vanished row (wy-o8swn) 2026-07-25 04:50:05 -07:00
automerge_test.go fix(automerge): tell a no-op merge write from a vanished row (wy-o8swn) 2026-07-25 04:50:05 -07:00
backup.go fix: suppress auto-backup address conflict warning (#2927) 2026-04-02 20:28:47 -07:00
backup_test.go fix: suppress auto-backup address conflict warning (#2927) 2026-04-02 20:28:47 -07:00
branches.go /{cmd,internal}: wip sync and data EmbeddedDoltStore methods 2026-03-24 12:01:16 -07:00
clone.go fix: pass remote auth user during clone (#4484) 2026-07-05 11:28:24 -07:00
clone_test.go fix: pass remote auth user during clone (#4484) 2026-07-05 11:28:24 -07:00
commit.go /{.github,cmd,internal}: pr feedback, ci fix 2026-03-25 12:58:46 -07:00
compact.go fix(gc): prune remote-tracking refs before post-squash GC (bd-agctw) 2026-07-18 07:26:17 -07:00
conflicts.go fix(automerge): tell a no-op merge write from a vanished row (wy-o8swn) 2026-07-25 04:50:05 -07:00
conflicts_test.go fix(automerge): tell a no-op merge write from a vanished row (wy-o8swn) 2026-07-25 04:50:05 -07:00
db.go /{cmd,internal}: wip sync and data EmbeddedDoltStore methods 2026-03-24 12:01:16 -07:00
fastforward.go feat(gate): non-destructive fast-forward adopt detection (adopt-ff, #4551 follow-up 2) (#4586) 2026-07-07 05:58:28 -07:00
fastforward_test.go feat(gate): non-destructive fast-forward adopt detection (adopt-ff, #4551 follow-up 2) (#4586) 2026-07-07 05:58:28 -07:00
flatten.go fix(gc): prune remote-tracking refs before post-squash GC (bd-agctw) 2026-07-18 07:26:17 -07:00
gc.go Use Snappy output for Dolt garbage collection (#4986) 2026-07-23 08:55:29 -07:00
gc_test.go Use Snappy output for Dolt garbage collection (#4986) 2026-07-23 08:55:29 -07:00
mergesettle.go fix(merge): close the ON UPDATE restamp and two silent-loss holes in the field merge (wy-jpd3.6) 2026-07-24 22:57:07 -07:00
remoterefs.go fix(gc): prune remote-tracking refs before post-squash GC (bd-agctw) 2026-07-18 07:26:17 -07:00
remotes.go fix(fetch): drop session-killing DOLT_GC from failed-fetch path (bd-6dnrw.10) 2026-06-11 00:59:49 -04:00
version_control.go feat(conflicts): bd conflicts list|show|resolve — issue-oriented merge conflicts (wy-jpd3.5) 2026-07-24 19:47:16 -07:00