# `HephaestusOban.Runner`
[🔗](https://github.com/lucas-stellet/hephaestus_oban/blob/v0.5.0/lib/hephaestus_oban/runner.ex#L1)

Oban-backed `Hephaestus.Runtime.Runner` implementation.

`start_instance/3` extracts `:workflow_version` from `opts` before persisting
the instance and enqueuing the first `AdvanceWorker`. That same version is then
propagated through every worker job as `"workflow_version"` so retries,
resumes, and step result inserts stay tied to the concrete workflow revision
that started the instance.

## start_instance/3 options

  * `:storage` — storage backend tuple used to persist instances
  * `:config_key` — key used to resolve runtime config from `:persistent_term`
  * `:oban` — Oban instance name used for inserts
  * `:id` — required business key used as the workflow instance id
  * `:workflow_version` — workflow revision stored on the instance and passed
    through Oban job args (defaults to `1`)

# `child_spec`

```elixir
@spec child_spec(keyword()) :: Supervisor.child_spec()
```

# `start_instance`

```elixir
@spec start_instance(module(), map(), keyword()) ::
  {:ok, String.t()} | {:error, term()}
```

Starts a workflow instance and enqueues the initial `AdvanceWorker`.

The required `:id` option and `:workflow_version` option flow into
`Instance.new/4` and the
initial Oban job args as `"workflow_version"`, ensuring downstream workers
execute against the same workflow revision.

# `start_link`

```elixir
@spec start_link(keyword()) :: :ignore
```

---

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