# `Replicant.Supervisor`
[🔗](https://github.com/baselabs/replicant/blob/v0.3.1/lib/replicant/supervisor.ex#L1)

The top `DynamicSupervisor` — one child per running pipeline (a
`Replicant.Pipeline` supervisor). Pipelines run as **`:temporary`** children:
a fail-closed halt terminates one permanently (no restart), while transient
crashes are recovered inside each `Pipeline`'s own `:one_for_all` strategy.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `halt`

```elixir
@spec halt(String.t(), term()) :: :ok
```

Fail-closed halt of a pipeline from *within* its own tree. Terminates the whole
pipeline permanently (it is a `:temporary` DynamicSupervisor child → no
restart). The teardown runs in an **unlinked spawned process** to avoid the
self-termination deadlock — a child process cannot synchronously stop its own
ancestor supervisor. The caller owns the distinguishing telemetry
(`:slot_invalidated` / `:sink :failed` / `:schema_change :halted`); `halt/2`
performs only the teardown and returns immediately.

# `start_link`

```elixir
@spec start_link(term()) :: Supervisor.on_start()
```

# `start_pipeline`

```elixir
@spec start_pipeline(Replicant.Config.t()) :: DynamicSupervisor.on_start_child()
```

Start a pipeline as a `:temporary` child — a fail-closed halt (`halt/2`) must
terminate it permanently, so the DynamicSupervisor must not restart it.

# `stop_pipeline`

```elixir
@spec stop_pipeline(String.t()) :: :ok
```

Terminate a running pipeline by slot name (idempotent).

---

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