fix(peer): coalesce full UI view publications

Keep one queued and one replaceable pending snapshot for remote-library and Call-to-Play views while preserving lifecycle-event FIFO delivery. Generation barriers and fenced drains prevent stale nonempty views from crossing disable or acknowledgement boundaries.

Test Plan:
- just test
- just clippy
- focused burst, lifecycle ordering, fence, repeated-barrier, and stale-view tests
- independent ordering review
- git diff --check
This commit is contained in:
ddidderr committed 2026-09-12 13:06:10 +02:00
1 parent 470e119515
commit 37420e26ed
17 files changed
+828 -251

No files matched your search

@@ -3,10 +3,8 @@
use std::{sync::Arc, time::Duration};
use futures::{StreamExt as _, stream};
use tokio::sync::mpsc::UnboundedSender;
use crate::{
PeerEvent,
PeerEventSender,
config::{PEER_PING_IDLE_SECS, PEER_PING_INTERVAL_SECS, peer_stale_timeout},
content_quarantine::ContentQuarantine,
context::{NetworkServiceCtx, OperationKind},
@@ -22,7 +20,7 @@ const MAX_CONCURRENT_PINGS: usize = 8;
/// uses `last_revision_check`; inbound and content traffic only affect
/// `last_seen`, which remains the stale-pruning clock.
pub async fn run_ping_service(
tx_notify_ui: UnboundedSender<PeerEvent>,
tx_notify_ui: PeerEventSender,
ctx: NetworkServiceCtx,
) -> eyre::Result<()> {
log::info!(