Skip to main content

aggregate_live

Function aggregate_live 

Source
pub fn aggregate_live(
    workstream_id: WorkstreamId,
    store: SharedWorkstreamStore,
) -> impl Stream<Item = WorkstreamEventEnvelope>
Expand description

Build the live aggregation stream for one workstream (no ring-buffer replay — see module docs).

Why: the single seam routes’ handler drives; kept as a free function (not inlined into the handler) so a unit test can exercise the fan-out logic directly against a SharedWorkstreamStore, without going through axum at all. As of Phase 1B (issue #3299) this is a thin adapter over trusty_agents_common::transport::aggregate_live — see this module’s docs for the trait impls it supplies. What: delegates to the shared combinator with [TcodeEventSource], [WorkstreamMembership], and the [classify] bypass closure. Test: sse_tests::fan_out_tags_events_from_bound_sessions_only, sse_tests::activation_changed_event_is_forwarded_regardless_of_session_binding, sse_tests::state_inferred_event_is_forwarded_for_this_workstream_only, sse_tests::empty_workstream_stream_yields_nothing.