omnigraph/crates
Devin AI e91d5615c6 Fix MR-923: refresh restored coordinator on merge Err path
branch_merge_impl swaps the coordinator for the merge target, runs the
merge body, then restores the original coordinator. A concurrent /change
on the same target during this window publishes against the swapped
coord, advancing on-disk manifest state that the restored coord doesn't
see.

The post-restore refresh was previously gated on merge_result.is_ok(),
so the clean-409 path (merge body's post_queue_snapshot drift check
returning a recoverable conflict) left the restored coord's cached
snapshot stale relative to disk. The next sequential /change seeded its
publisher expected_versions from that stale cache and 409'd with
ExpectedVersionMismatch — a non-retryable conflict surfaced to a caller
with no concurrent writer of their own.

Refresh on both Ok and Err paths so cached state cannot diverge from
the manifest across the swap-restore window.

Add a focused regression test
(concurrent_merge_clean_409_does_not_poison_next_change_on_target) that
loops the cell-d scenario until the clean-409 branch fires and asserts
the follow-up sentinel succeeds in that branch specifically.

Co-Authored-By: Ragnor Comerford <ragnor.comerford@gmail.com>
2026-05-11 20:31:18 +00:00
..
omnigraph Fix MR-923: refresh restored coordinator on merge Err path 2026-05-11 20:31:18 +00:00
omnigraph-cli release: prepare omnigraph 0.4.2 2026-05-10 14:02:28 +00:00
omnigraph-compiler release: prepare omnigraph 0.4.2 2026-05-10 14:02:28 +00:00
omnigraph-server Fix MR-923: refresh restored coordinator on merge Err path 2026-05-11 20:31:18 +00:00