Skip to main content

load_active_artifact

Function load_active_artifact 

pub fn load_active_artifact(
    opts: &Options,
) -> Result<Option<Cow<'static, CalibrationArtifact>>>
Expand description

The single home for the active-artifact resolution precedence, shared by the corpus-percentile lens and the provenance vintage stamp:

  1. opts.calibration path set → load it (validated), owned.
  2. else the embedded_world artifact (a real, non-placeholder one), borrowed.
  3. else None — no artifact active.

Returns a Cow so the embedded branch is zero-copy while a --calibration file is owned. A bad --calibration file is a hard error (matching load’s exit-3/4 contract); “no artifact active” returns None silently — the one deduped notice lives at the CLI layer.