ExGAM.Erasure.Analysis (ExGAM v0.1.0)

Copy Markdown View Source

Pure causal analysis for payload erasure.

The analysis consumes decoded governed records through Analysis.Facts. It derives the immutable closure affected by deleting a payload and remains conservative when execution may have touched the external payload store.

Summary

Functions

Returns affected Evidence using the current dynamic causal closure.

Returns every durable record causally affected by one payload.

Returns the Evidence records that remain valid inputs after erasure.

Derives the exact immutable erasure draft from the current fact prefix.

Classifies whether deletion may have touched the named payload.

Rejects duplicate erasure while an earlier request may still have had effect.

Returns all Evidence made unusable by an attempted erasure.

Rejects reuse of Evidence whose causal payload may have been erased.

Checks a supplied draft against the closure derivable at this exact prefix.

Types

input()

payload_state()

Functions

affected_evidence_refs(input, target_ref)

@spec affected_evidence_refs(input(), String.t()) ::
  {:ok, MapSet.t(String.t())} | {:error, term()}

Returns affected Evidence using the current dynamic causal closure.

affected_refs(input, target_ref)

@spec affected_refs(input(), String.t()) :: {:ok, [String.t()]} | {:error, term()}

Returns every durable record causally affected by one payload.

available_evidence(input)

@spec available_evidence(input()) :: %{optional(String.t()) => ExGAM.Evidence.t()}

Returns the Evidence records that remain valid inputs after erasure.

derive_request(input, target_ref, scope_ref, reason, requested_at)

@spec derive_request(input(), String.t(), String.t(), String.t(), integer()) ::
  {:ok, map()} | {:error, term()}

Derives the exact immutable erasure draft from the current fact prefix.

execution_state(input, target_ref)

@spec execution_state(input(), String.t()) ::
  {:ok, payload_state()} | {:error, term()}

Classifies whether deletion may have touched the named payload.

requestable?(input, target_ref)

@spec requestable?(input(), String.t()) :: :ok | {:error, term()}

Rejects duplicate erasure while an earlier request may still have had effect.

unavailable_evidence_refs(input)

@spec unavailable_evidence_refs(input()) :: MapSet.t(String.t())

Returns all Evidence made unusable by an attempted erasure.

validate_evidence_available(input, refs)

@spec validate_evidence_available(input(), [String.t()]) :: :ok | {:error, term()}

Rejects reuse of Evidence whose causal payload may have been erased.

validate_request(input, request)

@spec validate_request(input(), ExGAM.Erasure.t() | map() | keyword()) ::
  :ok | {:error, term()}

Checks a supplied draft against the closure derivable at this exact prefix.