"""Typed error hierarchy rooted in IngestError.""" from __future__ import annotations class IngestError(Exception): """Base class for every error raised by this library.""" class ManifestError(IngestError): """The manifest failed fail-fast schema validation (ingest-spec §4).""" class RenderError(IngestError): """A value cannot be rendered under the §5 body rules (never silent coercion).""" class SourceError(IngestError): """An extraction failed against its source (ingest-spec §4, §8). Covers fail-closed path-boundary violations, missing/malformed source content, and max_rows cap violations — always typed, never a leaked OSError and never silent truncation. """ class MaterializationError(IngestError): """Materialization refused or failed (ingest-spec §5). Covers an invalid ingested_at argument and the §3 collision gate (a generated name occupied by a file without the ingest stamp). """ class NetworkGateError(IngestError): """A network source was used without the per-run opt-in flag (spec §8). Local-only default, no silent egress: the flag is a run argument — the manifest cannot grant itself network access. """