pub struct EvaluationSupervisor { /* private fields */ }Expand description
Connects an append-only fact journal to a host policy, evidence reader, and auxiliary-run service. The policy is the only component that decides when an evaluation is useful; Core only enforces identity, bounds, and cleanup.
Implementations§
Source§impl EvaluationSupervisor
impl EvaluationSupervisor
pub fn new( journal: Arc<dyn ExecutionFactJournal>, reader: Arc<dyn EvidenceReader>, auxiliary: Arc<dyn AuxiliaryRunService>, policy: Arc<dyn EvaluationPolicy>, ) -> Self
Sourcepub fn with_dispatch_ledger(
journal: Arc<dyn ExecutionFactJournal>,
reader: Arc<dyn EvidenceReader>,
auxiliary: Arc<dyn AuxiliaryRunService>,
policy: Arc<dyn EvaluationPolicy>,
dispatch_ledger: Arc<dyn EvaluationDispatchLedger>,
) -> Self
pub fn with_dispatch_ledger( journal: Arc<dyn ExecutionFactJournal>, reader: Arc<dyn EvidenceReader>, auxiliary: Arc<dyn AuxiliaryRunService>, policy: Arc<dyn EvaluationPolicy>, dispatch_ledger: Arc<dyn EvaluationDispatchLedger>, ) -> Self
Construct a supervisor whose dispatch claims survive process restart. The ledger is still only a replay/lease mechanism; result persistence and host authorization remain separate concerns.
pub fn cancellation(&self) -> CancellationToken
pub fn cancel(&self)
Sourcepub async fn shutdown(&self)
pub async fn shutdown(&self)
Cancel all admitted auxiliary work and release this supervisor’s in-memory admission history. Auxiliary services still own their terminal snapshots; the parent cancellation token makes cooperative executors settle without blocking the caller.
Sourcepub async fn pending_count(&self) -> usize
pub async fn pending_count(&self) -> usize
Return the number of auxiliary runs currently admitted but not yet terminal. This is an observation only and never grants admission.
Sourcepub async fn observe_event(
&self,
frame: ExecutionFrameV1,
record: &RunEventRecord,
) -> Result<EvaluationDispatch, SupervisorError>
pub async fn observe_event( &self, frame: ExecutionFrameV1, record: &RunEventRecord, ) -> Result<EvaluationDispatch, SupervisorError>
Record one runtime event and, if the host policy selects the matching boundary, dispatch one isolated auxiliary run. The returned handle is advisory: the parent execution is never implicitly blocked by the auxiliary result.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for EvaluationSupervisor
impl !UnwindSafe for EvaluationSupervisor
impl Freeze for EvaluationSupervisor
impl Send for EvaluationSupervisor
impl Sync for EvaluationSupervisor
impl Unpin for EvaluationSupervisor
impl UnsafeUnpin for EvaluationSupervisor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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