ExGAM.Duty.EvidenceCause (ExGAM v0.1.0)

Copy Markdown View Source

Canonical description of an application Duty cause carried by Evidence.

The marker records only facts about the unresolved gap. Containment, closing conditions and disposition authority remain Constitution policy and are deliberately absent, so Evidence can never grant itself power.

Summary

Functions

Returns the exact string-keyed value embedded in Evidence.payload.

Returns the stable no-Act cause key derived from canonical Evidence.

Recognizes and validates the reserved Evidence marker and its configured source.

Restores a cause payload from its canonical representation.

Builds the strict payload carried by a Duty-cause Evidence record.

The reserved proposition used by Evidence which declares a Duty cause.

Types

t()

@type t() :: %ExGAM.Duty.EvidenceCause{
  accountable_ref: String.t(),
  class: String.t(),
  mandate_ref: String.t() | nil,
  missing: [term()],
  related_evidence_refs: [String.t()],
  schema_version: 1,
  subject_refs: [String.t()]
}

Functions

canonical(cause)

@spec canonical(t()) :: map()

Returns the exact string-keyed value embedded in Evidence.payload.

cause_key(evidence, evidence_cause)

@spec cause_key(ExGAM.Evidence.t(), t()) :: term()

Returns the stable no-Act cause key derived from canonical Evidence.

extract(evidence, constitution)

@spec extract(ExGAM.Evidence.t(), map()) :: :not_cause | {:ok, t()} | {:error, term()}

Recognizes and validates the reserved Evidence marker and its configured source.

from_canonical(value)

@spec from_canonical(map()) :: {:ok, t()} | {:error, term()}

Restores a cause payload from its canonical representation.

new(cause)

@spec new(map() | keyword() | t()) :: {:ok, t()} | {:error, term()}

Builds the strict payload carried by a Duty-cause Evidence record.

proposition()

@spec proposition() :: String.t()

The reserved proposition used by Evidence which declares a Duty cause.