Checks the install health of ash_onetime: the Ash security floor, Oban queue configuration,
and prefix validity. Run after install and after each upgrade to catch the silent-failure modes
that have no runtime signal.
mix ash_onetime.doctor --repo MyApp.Repo
mix ash_onetime.doctor --repo MyApp.Repo --prefix tenant_1Checks:
Ash floor (fatal): the running Ash version must be >= 3.31.3 (the CVE-floor pinned in
mix.exsash_requirement/0). A below-floor Ash is a security defect, not an advisory.Oban queues (advisory when Oban loaded): the three maintenance workers require
:ash_onetime_cleanup,:ash_onetime_reap, and:ash_onetime_partitions. A missing:ash_onetime_partitionsqueue silently strands the retention-safety path (forward partition creation never executes). The doctor scans the consumer's Oban config for the three queues and warns on any missing. This is advisory — a consumer may configure Oban dynamically at runtime.Prefix validity (when
--prefixgiven): the prefix must be 1..63 bytes (PostgreSQL's NAMEDATALEN bound).Schema currency (fatal, only with
--live): queries the database (read-only, catalog tables) and fails when the installed schema is not current for this package version — the failure mode of upgrading the package without running its migrations. Checks: thelogical_partitioncolumn on both claim tables (the 1.1 logical-partition upgrade), theash_onetime_response_payloadspartitioned table and its_defaultpartition, the three cleanup/reap functions (by name and arity), and the two delete-guard triggers.mix ash_onetime.doctor --repo MyApp.Repo --live mix ash_onetime.doctor --repo MyApp.Repo --live --prefix tenant_1
Without
--livethe doctor stays offline (compile-env checks only). The schema checked is--prefixwhen given, elsepublic.
Exits non-zero only on a FAIL (Ash below floor, missing --repo, invalid --prefix, or — with
--live — a missing/stale schema). Advisory warnings return :ok.