Limit aggregate retry fan-out to tombstones

Only deletion retries need to repair the post-commit disconnect/fan-out gap;
leave byte-identical active retries as no-op deliveries.

Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
Wes
2026-08-05 15:50:41 -06:00
parent 125f3d7cef
commit 63563d4e5d

View File

@@ -121,12 +121,14 @@ pub async fn submit_aggregate(
let retry_private_event;
let dispatch_events: &[buzz_core::StoredEvent] = if commit.inserted {
&commit.events
} else {
} else if !commit.head.active {
// A tombstone may have committed before disconnect propagation failed.
// Its exact retry must fan the durable head out again after repairing
// that propagation; otherwise live Desktop sessions never learn it.
retry_private_event = buzz_core::StoredEvent::new(commit.private_event.clone(), None);
std::slice::from_ref(&retry_private_event)
} else {
&[]
};
for stored in dispatch_events {
crate::handlers::event::dispatch_persistent_event(