From 696a55d42b5d6a7b1fb53dfe6c888b41bc5cd421 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Nov 2026 02:23:17 +0000 Subject: sync: ask for what changes waiting in screening lack Screening keeps a change whose dependencies haven't come from Automerge, waiting, so Automerge never learns what it lacks: our next message asks for the peer's heads alone, and the peer, forgetting having sent those, sends them again, and what they build on only as far as it still counts it as sent. So the session asks for what changes waiting build on and the document lacks too (`Waiting::lacking`, `SyncSession::lacks`), as Automerge asks for what the changes it holds back lack. --- src/swarm/sync.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/swarm/sync.rs') diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 528fe47..5f30440 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -706,6 +706,7 @@ pub(crate) async fn handle_sync( if let Some(actor) = outcome.fresh_actor { remake.add_own_actor(actor); } + sync.lacks(screening.lock_or_recover().waiting.lacking(doc)); } sync.receive_logged(doc, message, log) })(); -- cgit v1.3.1