What is going on with each library's storage, derived — never stored — from two
things: how many of its files are out of date
(PhoenixKit.Modules.Storage.Reconciler.counts_by_library/0, one grouped query)
and its storage.reconcile run
(PhoenixKit.Modules.Storage.Jobs.Reconcile, dev_docs/plans/2026-10-03-job-runs.md
§6.3, R8).
| state | when |
|---|---|
:paused | its reconcile run is paused (or pausing) |
:syncing | a reconcile run is queued or running — "N files left" |
:attention | no run is active, and either its last run failed with files left, or the reconciler tried files and could not finish them (they wait out their retry window) |
:waiting | files are out of date and no run is active: the queue is down, or nothing has triggered yet — the case a global count hides |
:up_to_date | nothing is out of date |
"Up to date" means the files carry the revisions of their library's profile and
variant set. It does not prove every recorded object is still on its bucket;
that is what a later storage.verify is for (§6.4).
The map returned for a library:
%{state: :syncing, out_of_date: 12, eligible: 12, failing: 0, run: %Run{}}run is the active run when there is one, else the last one, else nil.
Summary
Functions
The state of each of library_uuids, as a map keyed by the uuid string: three
queries however many libraries (the counts, the active runs, the last runs).
The state of one library.
The kind whose runs this state is about.
Types
@type state() :: :up_to_date | :syncing | :paused | :attention | :waiting
@type t() :: %{ state: state(), out_of_date: non_neg_integer(), eligible: non_neg_integer(), failing: non_neg_integer(), run: PhoenixKit.Jobs.Run.t() | nil }
Functions
The state of each of library_uuids, as a map keyed by the uuid string: three
queries however many libraries (the counts, the active runs, the last runs).
The state of one library.
@spec kind() :: String.t()
The kind whose runs this state is about.