Skip to content

just_dna_enricher.enrich.outcome

just_dna_enricher.enrich.outcome

What a run returns and raises: EnrichmentError, EnrichmentResult, and the rederive drift report (RM260 split this out of the former single-file enrich.py).

EnrichmentError

Bases: RuntimeError

Raised in strict mode when the chain cannot fully resolve the module.

SubjectDrift dataclass

SubjectDrift(
    variant_key: str,
    before: str,
    after: str,
    respelled: bool | None = False,
    case: str | None = None,
)

One subject whose recorded facts and freshly derived facts disagree, under rederive=True.

The canary MODULE_LIFECYCLE describes, finally performed. Merge-not-clobber means an ordinary re-run never re-asks about a recorded row, so a source that silently revised an answer moves no fetched_at, no fact signature and no digest — and the only way to notice was to delete the table and re-derive, which used to discard the curator's rows with it. With corrections living in the overlay a full re-derivation costs nothing, and because the fresh table is staged beside the current one both sides exist at the commit boundary, so the comparison is free.

before/after render the fact columns only (RESOLUTION_FACT_FIELDS), read off the registry rather than restated here: the provenance columns move on every run by design, and a report that called a new fetched_at a drift would cry wolf on every subject.