Text Ingestion Handler
The one shipped IngestionHandler: a normalized text front door that wraps the existing extraction pipeline without modifying it.
For each artifact the handler:
resolves a deduplication key (the caller-supplied content hash when present, otherwise a hash computed via the injected ContentHasher),
atomically claims that key via IngestionLedger.recordIfAbsent; when the key was already present it short-circuits before any extraction, returning a ArtifactOutcome.Deduplicated marker (no extraction call),
bridges the artifact text into a Chunk and runs the pipeline with the artifact's source locator on the context, so the pipeline grounds each returned proposition's provenance in that locator, and
leaves the claimed key recorded so identical content is deduplicated next time; if extraction fails the claim is released so retries are not poisoned.
The handler runs extraction only — no revision. Revision and persistence stay downstream caller concerns, so the returned propositions are exactly the pipeline's extraction output (enriched with grounding) and are unsaved.
Per-artifact failures are isolated into ArtifactOutcome.Failed so one bad artifact never aborts the rest of the batch.
A batch is processed SEQUENTIALLY, in submission order. Intra-batch deduplication of identical content relies on this sequential processing: the claim for an earlier artifact is visible to a later identical one. A future handler that processes a batch in parallel must supply its own atomic deduplication strategy rather than depending on processing order.
Constructors
Functions
Convenience for ingesting a single artifact. Delegates to ingest with a one-element batch so implementations only define the batch path.
Ingest a batch of artifacts, returning one outcome per artifact.