From 03576a26d7d2d823a3bac83199391f07addcd131 Mon Sep 17 00:00:00 2001 From: Danil Silantyev Date: Sat, 3 Oct 2026 18:48:33 +0500 Subject: [PATCH] feat(desktop): expose delayed delivery completion and path load --- crates/rds-desktop/src/session.rs | 25 ++++++++++++++-- docs/native-viewer.md | 11 +++++++ .../rds-delivery-observation-20261003.md | 29 +++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 docs/reports/rds-delivery-observation-20261003.md diff --git a/crates/rds-desktop/src/session.rs b/crates/rds-desktop/src/session.rs index 2002728..0e9c21d 100644 --- a/crates/rds-desktop/src/session.rs +++ b/crates/rds-desktop/src/session.rs @@ -843,6 +843,10 @@ pub async fn serve_desktop_with( delayed_bytes, failed_frames, path_rtt_ms = ?path.map(|p| p.rtt.as_millis()), + path_id = ?path.map(|p| p.path_id), + path_cwnd_bytes = ?path.map(|p| p.cwnd), + path_sent_bytes = ?path.map(|p| p.sent_bytes), + path_received_bytes = ?path.map(|p| p.recv_bytes), path_via_relay = ?path.map(|p| p.via_relay), path_sent = ?path.map(|p| p.sent), path_lost = ?path.map(|p| p.lost), @@ -878,6 +882,10 @@ pub async fn serve_desktop_with( obsolete_delivery = feedback.obsolete.load(Ordering::Relaxed), last_ack_ms = feedback.last_ack_ms.load(Ordering::Relaxed), path_rtt_ms = ?path.map(|p| p.rtt.as_millis()), + path_id = ?path.map(|p| p.path_id), + path_cwnd_bytes = ?path.map(|p| p.cwnd), + path_sent_bytes = ?path.map(|p| p.sent_bytes), + path_received_bytes = ?path.map(|p| p.recv_bytes), path_via_relay = ?path.map(|p| p.via_relay), path_sent = ?path.map(|p| p.sent), path_lost = ?path.map(|p| p.lost), @@ -1810,7 +1818,7 @@ async fn send_frame_inner( _ = tokio::time::sleep(delay_budget) => { feedback.mark_delayed(payload_bytes); late = Some(LateReceipt::new(feedback.clone())); - tracing::warn!(frame_seq=seq,payload_bytes,delay_budget_ms=delay_budget.as_millis(),"desktop frame delivery delayed"); + tracing::warn!(frame_seq=seq,keyframe,payload_bytes,delay_budget_ms=delay_budget.as_millis(),"desktop frame delivery delayed"); receipt.await } } @@ -1820,6 +1828,19 @@ async fn send_frame_inner( Ok(Ok(None)) => { sending.finished = true; feedback.acknowledged(payload_bytes, transfer_started.elapsed(), delay_budget); + if late.is_some() { + // Complete the soft-delay record at ordinary diagnostic + // verbosity; the initial crossing alone hid its duration. + tracing::info!( + frame_seq = seq, + keyframe, + payload_bytes, + enqueue_ms = started.duration_since(transfer_started).as_millis(), + ack_ms = started.elapsed().as_millis(), + transfer_ms = transfer_started.elapsed().as_millis(), + "desktop delayed frame transport acknowledged" + ); + } tracing::trace!(frame_seq=seq,payload_bytes,ack_ms=started.elapsed().as_millis(),"desktop frame transport acknowledged"); FrameReceipt::Delivered } @@ -1832,7 +1853,7 @@ async fn send_frame_inner( result => { feedback.failed.fetch_add(1, Ordering::Relaxed); request_frame_repair(&latest_key_seq, &idr, seq); - tracing::warn!(frame_seq=seq,payload_bytes,ack_ms=started.elapsed().as_millis(),outcome=?result,"desktop frame delivery unconfirmed"); + tracing::warn!(frame_seq=seq,keyframe,payload_bytes,ack_ms=started.elapsed().as_millis(),outcome=?result,"desktop frame delivery unconfirmed"); FrameReceipt::Failed } }; diff --git a/docs/native-viewer.md b/docs/native-viewer.md index 222ddfa..4851000 100644 --- a/docs/native-viewer.md +++ b/docs/native-viewer.md @@ -507,3 +507,14 @@ repair a second time. A newer produced key suppresses another request for an older frame, including reference-admission rejection while that key is queued. Current failures and unknown worker termination still require repair. This correlation does not treat a produced picture as successful delivery. + +Serving-side delivery health and bitrate-reduction records include selected +`path_id`, instantaneous `path_cwnd_bytes` and cumulative sent/received UDP bytes. +Compare byte deltas only within the same path id; these counters include other +services on that connection and do not measure media throughput alone. A soft +delayed-frame warning now has a matching ordinary-level completion record with +sequence, keyframe flag, payload length, `enqueue_ms`, `ack_ms` and `transfer_ms`. +Enqueue spans stream opening/writes and scheduling of the receipt worker; ACK +spans that worker's transport receipt wait. Neither is an application input ACK +or a physical presentation measurement. Timely frame completions remain trace +level. The diagnostic addition changes no pacing, admission or deadlines. diff --git a/docs/reports/rds-delivery-observation-20261003.md b/docs/reports/rds-delivery-observation-20261003.md new file mode 100644 index 0000000..7d8916c --- /dev/null +++ b/docs/reports/rds-delivery-observation-20261003.md @@ -0,0 +1,29 @@ +# Delivery observation follow-up — 2026-10-03 + +W6.6/W6.7 and observability follow-up, without a completed stability gate. +Installed qualification of the payload-aware controller still found a multi- +second media pause with fresh control echoes. Receiver metadata localized one +independent picture to a slow body read, and serving metadata showed the +keyframe receipt barrier holding further capture. The precise transport cause +was not established; no endpoint identities, private runtime data or payloads +are part of this public receipt. + +Ordinary health and reduction records now include the selected path id, +instantaneous congestion-window bytes and cumulative UDP sent/received bytes. +A path change invalidates cross-path counter subtraction. UDP counters cover +the entire connection's selected path, including other services; they are not +an isolated media-goodput or available-capacity estimate. + +Successful receipts that previously crossed their soft deadline now produce +an info completion record, pairing the initial warning's sequence with its +keyframe flag, payload size and enqueue/receipt/total duration. Existing timely +completion trace records, independent five-second production health and receiver +slow-body logs remain. This allows diagnostics to distinguish a frozen producer, +waiting keyframe, slow enqueue and slow transport receipt without requiring +per-frame verbose tracing. No keys, input values, clipboard data or pixels are +logged, and no wire, deadline, recovery or scheduling behavior changes. + +Verification on macOS arm64: fmt, strict workspace all-target desktop-feature +clippy and all 45 session tests passed. Native Linux/macOS CI and an installed +receipt remain separate. This increment adds diagnostic fields and does not +assert a network or click-to-visible latency improvement.