Skip to content

solutions_backend.classification.context

Deterministic Core preflight and coherent Data context construction.

Classes

ClassificationContextBuilder

Stabilize deterministic selectors around one bounded atomic Data snapshot.

build

build(source: SourceRecordRef, email: EmailMessageRecord) -> StabilizedContext

Build context, rebuilding once if authoritative client matching changes selectors.

ContextRepository

Bases: Protocol

Narrow Data reads required by the classification manager.

list_active_clients

list_active_clients(limit: int = 500) -> tuple[Client, ...]

Return the complete bounded active-client census.

load_snapshot

load_snapshot(source: SourceRecordRef, selectors: ClassificationContextSelectors | None = None, limits: ClassificationContextLimits | None = None) -> LoadedClassificationContext

Load one repeatable-read classification context.

EmailClassifier

Bases: Protocol

Pure deterministic classification surface supplied by Solutions Core.

classify

classify(message: EmailMessageRecord, clients: Sequence[Client] = ()) -> EmailClassification

Classify one normalized message against current clients.

StabilizedContext

Core preflight plus the exact bounded context admitted to Agents.