-
The root package now exports
IngestErrorfor hard per-document ingest failures. Callers inspect it viaPath(),Layer(),Value(),Unwrap(), andCause();Layer()usesparser,transformer,numeric, andschemavalues.Value()is verbatim and is not redacted or truncated by the library, so callers own redaction and output-size policy.gin-index experiment --on-error continuetext and JSON summaries now group structured failures by layer with at most 3 samples per layer, use anunknownbucket for non-IngestErrorfailures, and emitaborted:tragicwhen continue mode aborts on a closed builder. -
IngestFailureMode/IngestFailureHard/IngestFailureSoftare the preferred failure-mode names. Deprecated source-compatible aliasesTransformerFailureMode/TransformerFailureStrict/TransformerFailureSoftremain available for pre-phase-17 callers. -
Companion transformer soft mode is representation-scoped:
WithTransformerFailureMode(gin.IngestFailureSoft)skips only the derived alias when a transformer returnsok=false; it does not drop the source document.Before:
gin.WithTransformerFailureMode(gin.TransformerFailureSoft)After:
gin.WithTransformerFailureMode(gin.IngestFailureSoft) -
New config options extend the taxonomy to parser and numeric failures:
WithParserFailureMode(mode)— drop documents that fail JSON parsing underIngestFailureSoft; surface the error underIngestFailureHard(default).WithNumericFailureMode(mode)— drop documents that fail numeric coercion or hit unsupported mixed-numeric promotion underIngestFailureSoft; surface the error underIngestFailureHard(default).
-
New builder observability:
NumSoftSkippedDocuments()returns the count of documents dropped by soft parser or numeric failures.NumSoftSkippedRepresentations()returns the count of companion representations skipped by soft transformer failures.SoftSkippedDocuments()is a deprecated alias forNumSoftSkippedDocuments(); prefer the new name.