Continuum.ActivityOperations (continuum v0.6.2)

Copy Markdown View Source

Operator-facing inspection, classification, dead-letter, and manual retry API.

Mutations are dry runs by default. Pass execute: true after reviewing the returned plan. Every executed action requires and records :operator and :reason.

A manual retry never edits the failed activity event. It appends an activity_retry_scheduled event, creates a successor task linked through a stable lineage id, and reopens the failed root run. This is intentionally limited to an activity failure at the replay tail; completed runs, child runs, compensations, and histories that proceeded past the failure are rejected rather than rewritten ambiguously.

Summary

Functions

Classifies an activity lineage as retryable or non-retryable. Dry-run by default.

Moves a terminal discarded activity into the explicit dead-letter state. Dry-run by default.

Returns one activity task together with its full task lineage, attempts, and operator actions.

Appends and schedules a manual retry with a validated replacement policy. Dry-run by default.

Types

classification()

@type classification() :: :retryable | :non_retryable

Functions

classify(task_id, classification, opts \\ [])

(since 0.6.2)
@spec classify(binary(), classification() | binary(), keyword()) ::
  {:ok, map()} | {:error, term()}

Classifies an activity lineage as retryable or non-retryable. Dry-run by default.

dead_letter(task_id, opts \\ [])

(since 0.6.2)
@spec dead_letter(
  binary(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Moves a terminal discarded activity into the explicit dead-letter state. Dry-run by default.

get(task_id, opts \\ [])

(since 0.6.2)
@spec get(
  binary(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Returns one activity task together with its full task lineage, attempts, and operator actions.

retry(task_id, opts \\ [])

(since 0.6.2)
@spec retry(
  binary(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Appends and schedules a manual retry with a validated replacement policy. Dry-run by default.