corvix.hydration.base¶
Provider interfaces and shared context for hydration.
These names are preserved for backward compatibility; the canonical definitions
live in corvix.pipeline.provider.
Classes¶
Provider that completes missing canonical fields on a |
|
Per-cycle request budget and URL cache shared across all pipeline providers. |
Module Contents¶
- class corvix.hydration.base.HydrationProvider[source]¶
Bases:
ProtocolProvider that completes missing canonical fields on a
Notification.Field providers mutate the notification in-place by returning a (possibly replaced)
Notificationwith missing required fields filled in (e.g.subject_url,web_url).- hydrate(_notification: corvix.domain.Notification, _client: corvix.pipeline.base.JsonFetchClient, _ctx: PipelineContext, /) corvix.domain.Notification[source]¶
Return a notification with any missing required fields filled in.
- class corvix.hydration.base.HydrationContext[source]¶
Bases:
corvix.pipeline.base.RequestContextPer-cycle request budget and URL cache shared across all pipeline providers.
A single
PipelineContextis created perPipelineEngine.run()call and passed to every provider, so that URL responses cached by a field-completion provider are visible to subsequent context providers in the same cycle.- get_json(client: corvix.pipeline.base.JsonFetchClient, url: str, timeout_seconds: float) corvix.types.JsonValue[source]¶
Fetch and cache a JSON payload; raises if the request budget is exhausted.