pub struct FinalizeSession<'a, FR, SR, NC> {
pub facts: &'a FR,
pub sessions: &'a SR,
pub classifier: &'a NC,
pub confidence_cfg: &'a ConfidenceConfig,
pub nli_cfg: &'a NliConfig,
pub merge_cfg: &'a MergeConfig,
}Expand description
Borrow-style bundle of every dependency the finalize pipeline needs.
Built inline at the call site (the watcher in Slice-7, or the CLI
--finalize trigger), dropped right after FinalizeSession::execute
returns. References keep allocation to one borrow per call.
Fields§
§facts: &'a FR§sessions: &'a SR§classifier: &'a NC§confidence_cfg: &'a ConfidenceConfig§nli_cfg: &'a NliConfig§merge_cfg: &'a MergeConfigImplementations§
Source§impl<'a, FR, SR, NC> FinalizeSession<'a, FR, SR, NC>
impl<'a, FR, SR, NC> FinalizeSession<'a, FR, SR, NC>
Sourcepub async fn execute(
&self,
session_id: &SessionId,
memory_key: &MemoryKey,
) -> Result<FinalizeStats, UseCaseError>
pub async fn execute( &self, session_id: &SessionId, memory_key: &MemoryKey, ) -> Result<FinalizeStats, UseCaseError>
Resolve every pending fact owned by session_id within memory_key.
Ownership is derived from Fact.source_sessions (see module docs):
every pending fact whose provenance list contains session_id is in
scope. Returns Ok(stats) even on per-fact failures; the only Err
paths are store catastrophes that prevent reading the pending or
accepted pools.
memory_key scopes the namespace scan. Callers that already know the
namespace (the watcher reading SessionState.memory_key(), the CLI
with --memory-key) pass it directly; the CLI additionally exposes a
discovery fallback that iterates every key when the operator does not
name one.