pub struct StreamingExecution {
pub events: UnboundedReceiver<FlowExecutionEvent>,
pub exited: Arc<Notify>,
pub enforcement_summaries: Arc<Mutex<HashMap<String, EnforcementSummaryWire>>>,
pub step_audit_records: Arc<Mutex<Vec<StepAuditRecord>>>,
pub runtime_warnings: Arc<Mutex<Vec<RuntimeWarning>>>,
}Expand description
§Fase 33.f — Handles returned by server_execute_streaming.
Bundles the [FlowExecutionEvent] receiver with an “exited”
signal the consumer can await to confirm the producer task has
terminated (e.g. for cancel-safety budgets in tests / metrics).
Fields§
§events: UnboundedReceiver<FlowExecutionEvent>§exited: Arc<Notify>Resolves once the producer’s spawn_blocking task exits, for
any reason (normal completion, cancellation, or send-failure
on a dropped consumer). Pairs with the crate::cancel_token::CancellationFlag
the producer observes between emits.
enforcement_summaries: Arc<Mutex<HashMap<String, EnforcementSummaryWire>>>§Fase 33.x.d — Per-step EnforcementSummary side-channel.
Populated by the async streaming producer
(run_streaming_async_path) as each step’s
crate::stream_effect_dispatcher::StreamPolicyEnforcer
finishes draining. Read by the consumer (execute_sse_handler)
when emitting axon.complete so the wire body includes the
enforcement summary per step that had a declared
<stream:<policy>> effect.
Empty for:
- The legacy synchronous fallback path
(
run_streaming_legacy_path) — preserves v1.24.0 wire byte-compat for adopter shapes the streaming path defers. - The async path when no step has a declared effect policy — no enforcer is constructed; no summary to publish.
The lock is tokio::sync::Mutex so the producer can hold it
across .await points without risk of deadlock from
std::sync::Mutex blocking the executor.
step_audit_records: Arc<Mutex<Vec<StepAuditRecord>>>§Fase 33.x.f — Per-step audit record side-channel.
Populated by the async streaming producer
(run_streaming_async_path) after each step finishes
draining: one
crate::axonendpoint_replay::StepAuditRecord per
IRFlowNode::Step that executed. Read by the SSE handler
when emitting axon.complete if a ReplayContext is
provided (route has replay: true declared) — the records
land in the
crate::axonendpoint_replay::AxonendpointReplayEntry::step_audit
field so GET /v1/replay/<trace_id> returns the per-step
sequence to regulators / auditors.
Empty for:
- The legacy synchronous fallback path
(
run_streaming_legacy_path) — preserves v1.24.0 wire + replay byte-compat. - SSE routes WITHOUT
replay: true— recording the side-channel costs ~one Mutex push per step regardless of replay binding (cheap), but the entry is never written.
runtime_warnings: Arc<Mutex<Vec<RuntimeWarning>>>§Fase 33.x.g — Runtime warning side-channel.
Populated synchronously by server_execute_streaming BEFORE
spawning the producer when the dispatch falls back to the
legacy synchronous path. The W002 warning is recorded with
the specific crate::runtime_warnings::FallbackMode tag
identifying WHY streaming did not activate (unsupported
flow shape / unknown backend / source compilation failed /
backend lacks stream()).
Read by the SSE consumer at FlowComplete time + projected
onto axon.complete.warnings (wire). Also lands on
AxonendpointReplayEntry.runtime_warnings (audit) when the
route declares replay: true.
D5 contract: NO silent degradation. Empty Vec on the happy path (the async streaming path activated correctly).
Auto Trait Implementations§
impl !RefUnwindSafe for StreamingExecution
impl !UnwindSafe for StreamingExecution
impl Freeze for StreamingExecution
impl Send for StreamingExecution
impl Sync for StreamingExecution
impl Unpin for StreamingExecution
impl UnsafeUnpin for StreamingExecution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more