PhoenixKit 1.7.213: A Lifeline timeout that is too short now gets a warning
PhoenixKit 1.7.213 checks the value of Oban Lifeline’s rescue_after, not only that the plugin is there.
Oban’s own documentation shows rescue_after: :timer.minutes(5) as an example. With a value that short, a long job such as storage file sync is started a second time while the first run is still going. mix phoenix_kit.doctor now warns when rescue_after is 30 minutes or less, and mix phoenix_kit.update raises a too-short :timer.minutes(N) value to 60. Other forms are left alone with a notice. Doctor also stops warning about Lifeline on a node with plugins: false.
Rolling back migration V157 failed with a bare database error once any image annotation existed. It now stops first and says how many rows are in the way and what to do.
Full release notes: PhoenixKit 1.7.213
1.7.213 · 26 July 2026
Changed
- Lifeline is now validated by value, not just presence. 1.7.212 raised the
shipped
rescue_afterto 60 minutes at every emit site, but both the installer andmix phoenix_kit.doctorstill only asked whether anOban.Plugins.Lifelineentry existed. Oban’s own docs advertiserescue_after: :timer.minutes(5)as the “more aggressive period” example, so a host copying from them sat squarely in the duplicate-execution window while PhoenixKit reported everything as fine.mix phoenix_kit.doctorwarns whenrescue_afteris at or below the longesttimeout/1PhoenixKit ships (30 minutes,Storage.Workers.SyncFilesJob). An unsetrescue_afteris treated as safe — that means Oban’s own 60-minute default.PhoenixKit.Install.ObanConfig.ensure_lifeline_plugin/2raises a too-low:timer.minutes(N)literal to 60 instead of no-oping on any existing entry. Only that literal form is rewritten; any other expression (raw milliseconds, a module attribute, a runtime lookup) is left untouched with a notice rather than blind-edited.- The value now has a single source (
lifeline_entry/0) feeding the generated template, the backfill and the manual-fallback message, so the emit sites cannot drift apart again.
- V157
down/1fails loudly instead of opaquely (issue #663). Rolling back re-adds the narrowerphoenix_kit_annotations_kind_check, and Postgres validates a CHECK against every existing row — so onekind = 'image'annotation created sinceup/1made the rollback die with a bare23514partway through.down/1now checks first and raises a message naming the row count and the two real ways forward (remove/convert the rows, or stay on V157 — its widened CHECK is a superset of V156’s). The check runs before anything is queued, so no half-applied DDL is left behind. Deleting user annotations from a rollback, andNOT VALID(a constraint that lies about the rows already present), were both rejected as worse; see the new## down/1 is conditional, by necessitymoduledoc section.
Fixed
mix phoenix_kit.doctorno longer emits a false-positive Lifeline warning on a node runningplugins: false. 1.7.212 stopped thelength(false)crash but then letfalsefall through as[]into the Lifeline branch, so a deliberately plugin-less node was told to runmix phoenix_kit.update— which would rewriteconfig.exsfor a node that must not run plugins at all. It now reports plugins-disabled and skips the check.
Added
test/phoenix_kit/migrations/v157_test.exs(issue #663) — V157 was the one recent migration with no test of its own. Deliberately narrow:annotations/annotation_kind_test.exsalready pins both layers accepting"image", so this file pins the CHECK’s whole vocabulary, which is what a later migration could silently narrow while leaving that file green. Not yet executed against a live database — see the investigation doc.- The Lifeline invariant test now discovers workers at runtime (every
Oban.Workerin:phoenix_kitexportingtimeout/1) instead of hardcoding three modules, so a new long-running worker fails the test rather than quietly eroding the margin. dev_docs/investigations/2026-07-26-issue-663-post-release-audit.md— full write-up of issue #663’s four items, including the two that did not hold up: the Tessera CDN pin (tessera@v0.3.1vsmix.lock0.3.4) is a cosmetic mismatch only —alexdont/tesserahas nov0.3.4tag, so the recommended bump would 404 the loader, and the asset is byte-identical across v0.3.1, v0.3.2 and hex 0.3.4 — and the#652host-router note is already satisfied by the:browserpipelinemix phx.newscaffolds.
PhoenixKit 1.7.213. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.