# `Scrypath.Operator.Reconcile`
[🔗](https://github.com/szTheory/scrypath/blob/v0.3.5/lib/scrypath/operator/reconcile.ex#L1)

Report-first reconciliation returned by `Scrypath.reconcile_sync/2`.

A reconcile report combines sync visibility, failed work, drift signals, and
rebuild visibility before any recovery action is executed. Per-class failed-work
pileup counts (`failed_work_counts`) use the same taxonomy as `FailedWork` rows
for triage at a glance.

When `include_index_contract_drift: true` is passed in operator options,
`index_contract_drift` is populated from the same builder as
`Scrypath.index_contract_drift/2`, adding one live `get_settings` read. If that
read fails, the entire reconcile returns `{:error, reason}` so operators are
not shown a false-green report.

# `t`

```elixir
@type t() :: %Scrypath.Operator.Reconcile{
  actions: [Scrypath.Operator.RecoveryAction.t()],
  drift_signals: [atom()],
  failed_work: [Scrypath.Operator.FailedWork.t()],
  failed_work_counts: Scrypath.Operator.ReasonClassCounts.t(),
  index: String.t(),
  index_contract_drift: Scrypath.Operator.IndexContractDrift.Report.t() | nil,
  mode: :inline | :manual | :oban | atom(),
  reindex: Scrypath.Operator.Reconcile.ReindexVisibility.t(),
  schema: module(),
  status: Scrypath.Operator.Status.t()
}
```

# `apply_action`

```elixir
@spec apply_action(
  Scrypath.Operator.RecoveryAction.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}
```

# `run`

```elixir
@spec run(module(), keyword(), keyword()) :: {:ok, t()} | {:error, term()}
```

---

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