Portable Evidence about a proposition, kept separate from authority.
Its explicit stance distinguishes support from contradiction. Evidence is
also scoped by source, provenance, time, bindings and assumptions.
:generated and provisional evidence remain visibly so; this record never
promotes them to observed facts.
Summary
Functions
Returns the plain, string-keyed ledger representation.
Returns the content-derived reference, independent of an assigned ref.
Returns whether Evidence is current and fresh enough at one trusted instant.
Returns the stable digest of the complete evidence record.
Restores evidence from its canonical map.
Builds and validates evidence.
Returns canonical labels de-duplicated and ordered by stable reference.
Returns whether two records assert opposite stances for the same proposition.
Returns the Evidence time-window status at one trusted instant.
Types
@type stance() :: :supports | :contradicts
@type t() :: %Spectre.GAM.Evidence{ assumptions: [term()], bindings: map(), freshness_ms: non_neg_integer() | nil, issuer_ref: String.t(), labels: [Spectre.GAM.Label.t()], observed_at: integer(), parent_refs: [String.t()], payload: term(), payload_ref: String.t() | nil, proposition: term(), provenance: :observed | :derived | :generated, provisional: boolean(), ref: String.t(), schema_version: 1, source_ref: String.t(), stance: stance(), valid_from: integer() | nil, valid_until: integer() | nil }
@type temporal_status() :: :current | :from_future | :not_yet_valid | :expired
Functions
Returns the plain, string-keyed ledger representation.
Returns the content-derived reference, independent of an assigned ref.
@spec current_at?(t(), integer(), non_neg_integer() | nil) :: boolean()
Returns whether Evidence is current and fresh enough at one trusted instant.
Returns the stable digest of the complete evidence record.
Restores evidence from its canonical map.
Builds and validates evidence.
@spec normalize_labels(term()) :: {:ok, [Spectre.GAM.Label.t()]} | {:error, term()}
Returns canonical labels de-duplicated and ordered by stable reference.
Returns whether two records assert opposite stances for the same proposition.
@spec temporal_status(t(), integer()) :: temporal_status()
Returns the Evidence time-window status at one trusted instant.