AITrace.GovernedEffectEvidence (AITrace v0.2.0)

Copy Markdown View Source

Redaction-safe governed-effect evidence trace builder.

The evidence record keeps provider payloads and credential material out of trace attributes. Sensitive fields are preserved as GAOP tombstones so replay can prove a field existed without exporting the raw value.

Summary

Functions

Builds a governed-effect evidence record.

Builds a governed-effect evidence record and raises on invalid input.

Converts governed-effect evidence into an AITrace trace.

Types

t()

@type t() :: %AITrace.GovernedEffectEvidence{
  authority_decision: map(),
  authority_ref: String.t(),
  command_ref: String.t(),
  effect_ref: String.t(),
  export_profile: :governed_effect,
  lower_execution: map(),
  receipt_reduction: map(),
  receipt_ref: String.t(),
  redaction_posture: :standard,
  trace_ref: String.t(),
  transitions: [map()]
}

Functions

new(attrs)

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

Builds a governed-effect evidence record.

new!(attrs)

@spec new!(map() | keyword()) :: t()

Builds a governed-effect evidence record and raises on invalid input.

to_trace(evidence)

@spec to_trace(t()) :: AITrace.Trace.t()

Converts governed-effect evidence into an AITrace trace.