ExecutionPlane.ActivitySideEffectIdempotency (execution_plane v0.1.0)

Copy Markdown View Source

Activity-facing side-effect idempotency contract for Phase 4 durable workflows.

Mezzanine owns workflow worker execution. Execution Plane owns the lower runtime side effect and dedupes retries by execution intent id and idempotency key.

Summary

Types

t()

@type t() :: %ExecutionPlane.ActivitySideEffectIdempotency{
  activity_call_ref: term(),
  actor_ref: term(),
  authority_packet_ref: term(),
  contract_name: term(),
  heartbeat_policy: term(),
  idempotency_key: term(),
  intent_id: term(),
  lease_evidence_ref: term(),
  lease_ref: term(),
  lower_run_ref: term(),
  permission_decision_ref: term(),
  release_manifest_ref: term(),
  resource_ref: term(),
  retry_policy: term(),
  runtime_family: term(),
  side_effect_ref: term(),
  tenant_ref: term(),
  timeout_policy: term(),
  trace_id: term(),
  workflow_ref: term()
}

Functions

contract_name()

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

idempotency_scope()

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

new(attrs)

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

same_retry_scope?(left, right)

@spec same_retry_scope?(t(), t()) :: boolean()

side_effect_key(activity)

@spec side_effect_key(t()) :: {String.t(), String.t()}