# `Continuum.ActivityOperations`
[🔗](https://github.com/Yyeger/Continuum/blob/main/lib/continuum/activity_operations.ex#L1)

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.

# `classification`

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

# `classify`
*since 0.6.2* 

```elixir
@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`
*since 0.6.2* 

```elixir
@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`
*since 0.6.2* 

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

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

# `retry`
*since 0.6.2* 

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
