pub fn validate_backup(
spec: &SnapshotSpec,
origin: Option<Origin>,
) -> Vec<ValidationError>Expand description
Validate a Snapshot spec for a given origin, accumulating all problems.
origin is supplied by the caller because the canonical value lives in
status.origin / the kopiur.home-operations.com/origin label, not in
spec (ADR §3.4). None means the row carries an origin marker the caller
could not parse (Origin::parse returned None): the origin-GATED rules
(deletionPolicy legality, onScheduleDelete) are skipped, not failed —
refusing would wedge metadata-only writes (finalizer removal above all) on
rows written under a newer operator during version skew, while skipping is
safe because the controller’s conservative resolution of an unparseable
origin (forced Retain, never scheduled, never run) makes both gated
fields inert at reconcile time. The origin-independent rules still run.