fix(cli): drive single-target runs with ManagedClient

Replace the manual single-target ClientSession loops in the stream and TUI adapters with ManagedClient::start_with_subscription so the existing worker owns opening, deadline-aware pacing, receive handling, timeout polling, draining, and close.

Use bounded subscription waits for interruption and input polling, drain queued events before and after join, and report per-subscription drops without changing output, statistics, labels, summaries, warning, or peer-close policy. Add process and unit regressions for 10 ms cadence, interruption, final-event draining, TUI terminal state, and overflow visibility.
This commit is contained in:
Nils Andreas Svee committed 2026-07-28 14:42:02 +07:00
1 parent 080d45ca67
commit 6af4663b6e
9 files changed
+530 -477

No files matched your search

+3 -3
View File
@@ -169,9 +169,9 @@ pub enum EventSubscriptionError {
/// The subscription can no longer receive new events.
///
/// Already queued events are delivered first. After the queue is drained,
/// `recv` and `try_recv` return this error when the hub disconnects the
/// subscriber, the hub is shut down, or the subscription is disconnected by
/// its overflow policy.
/// `recv`, `recv_timeout`, and `try_recv` return this error when the hub
/// disconnects the subscriber, the hub is shut down, or the subscription is
/// disconnected by its overflow policy.
#[error("event subscription is disconnected")]
Disconnected,
}