SquidMesh.Runtime.Reviewer (squid_mesh v0.1.0-alpha.7)

Copy Markdown View Source

Applies explicit approval decisions to paused approval steps.

Approval and rejection reuse the durable paused-step lifecycle from the runtime, but this module owns the decision-specific contract: validating reviewer input, completing the paused step with decision output, and resuming the run through the persisted approval targets.

Summary

Types

decision()

@type decision() :: :approved | :rejected

review_attrs()

@type review_attrs() :: %{
  :actor => String.t() | map(),
  optional(:comment) => String.t(),
  optional(:metadata) => map()
}

Functions

review(config, run, decision, attrs)

@spec review(SquidMesh.Config.t(), SquidMesh.Run.t(), decision(), map()) ::
  :ok | {:error, term()}