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

HydrationProvider

Provider that completes missing canonical fields on a Notification.

HydrationContext

Per-cycle request budget and URL cache shared across all pipeline providers.

Module Contents

class corvix.hydration.base.HydrationProvider[source]

Bases: Protocol

Provider that completes missing canonical fields on a Notification.

Field providers mutate the notification in-place by returning a (possibly replaced) Notification with missing required fields filled in (e.g. subject_url, web_url).

name: str[source]
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.RequestContext

Per-cycle request budget and URL cache shared across all pipeline providers.

A single PipelineContext is created per PipelineEngine.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.