PhoenixKit 2.13.15: Schema repair stops reporting two phantom keys
PhoenixKit 2.13.15 fixes the schema repair check, which reported two primary keys on the shop’s product and category slug tables as missing on every install, however often repair ran. They were declared as plain indexes; they are now checked as the keys they are.
Integrations no longer accept a connection for a provider that is not installed. A module registered after start-up now adds its providers to the list, where it used to stay invisible until a restart. mix phoenix_kit.update checks the order of the supervisor and Oban in application.ex against the edits it is about to make, not the file as it was.
The folder tree component can now show items inside folders next to the folders themselves, and no longer crashes on a folder without a colour. This is for modules that use it; the media browser looks the same.
Full release notes: PhoenixKit 2.13.15
2.13.15 · 29 August 2026
Fixed
- Repair no longer reports two composite-key PRIMARY KEYs as missing.
phoenix_kit_shop_product_slugs_pkeyandphoenix_kit_shop_category_slugs_pkeywere hand-declared alongside V171 askind: :index, but on the catalog they are PRIMARY KEY constraints on a composite natural key(lang, value)— and the index ap/uconstraint owns is deliberately never listed among bare indexes, so the check could never match anything. Both read:missingon every run, on every install, no matter how many times repair ran. They are now declared as constraints. Separately,Probekeeps constraint-backed index rows in a newconstraint_backed_indexesmap instead of dropping them, and akind: :indexlookup falls back to it — so a manifest entry with the wrongkinddegrades to a shape comparison rather than a permanent phantom. (#762) mix phoenix_kit.update’s supervisor-ordering check reads the staged edit, not stale disk. It decided “order is correct” from a freshFile.read!ofapplication.ex, but two earlier steps in the same run stage theirapplication.exedits in the Igniter buffer, which is not flushed to disk until the run ends. The check could see neitherPhoenixKit.SupervisornorOban, conclude there was nothing to verify, and pass an install whose buffer was genuinely misordered. It now reads the same buffer the subsequent fix does. (#763)Integrations.add_connection/4rejects unregistered provider keys. The provider arrives from a tamperable client event; an unknown key madeProviders.get/1returnnil, which made the scope check default to[:system]and pass trivially, birthing a connection row for a provider that was never installed. Unknown keys now return{:error, :unknown_provider}. (#765)- A module registered after the provider cache was warmed now contributes
its providers.
Providers.all/0caches built-in plus external providers inpersistent_termwith no expiry, andModuleRegistry.all_modules/0answers[]until the registry has started — so a module arriving later (the parent app’srescan/0, a runtimeregister/1, a dev hot-reload) stayed invisible to the provider list for the life of the VM.Providers.clear_cache/0existed for exactly this and nothing outside the test suite ever called it. The registry now calls it whenever the module set actually changes. This was survivable while an unknown key merely fell back to a[:system]default; with theadd_connection/4guard above it meant a legitimately installed provider could not be connected at all until a restart. (post-merge review of #765)
Added
- A repository-level guard against running the test suite on a live
database.
config/test.exshonorsPGDATABASEso the suite can target an already-provisioned database on a role withoutCREATEDB— which also means a shell that leaksmyapp_devinto every process turns a baremix testinto a silent migrate-and-seed of the real thing.test_helper.exsnow refuses, before anything opens a connection, a database name ending in_dev,_development,_prod,_productionor_staging, plus any exact name listed inPHOENIX_KIT_TEST_DB_DENYLIST. It deliberately does not require a_testsuffix: an arbitrary scratch name is the casePGDATABASEsupport exists for and passes through untouched. (#764) - Coverage for rotating a restricted setting that is still plaintext.
Every existing rotation test seeded through the encrypting write path, so
none could tell “rotation handles a restricted setting” apart from
“rotation handles one that was already encrypted”. The real row this
protects — an
oauth_google_client_secretwritten before encryption shipped — is genuinely plaintext, and the new test asserts both that rotation encrypts it and that the live OAuth credential read path still hands back the original secret. (#766)
PhoenixKit 2.13.15. Install or update: {:phoenix_kit, "~> 2.13"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.