Projects 0.5.1: Tests and cleanup for AI translation
Projects 0.5.1 follows up the AI translation work of 0.5.0 with tests and small internal cleanups. No change for a running site.
The new tests pin which errors from an AI provider make a translation job try again and which make it give up: temporary server errors such as 500, 502 and 503 are retried, while 501, 505, client errors and other failures are dropped. The rules themselves did not change. A redundant step in saving a translation was removed and a stale code comment corrected.
Nothing to run. Update the dependency when convenient.
Full release notes: Projects 0.5.1
0.5.1 · 22 May 2026
Follow-up review pass on the 0.5.0 AI-translation work — test coverage for the worker’s retry classification plus minor internal cleanups. No behavior changes.
Tests
- 5xx retry classification —
TranslateResourceWorker.retryable?/1(the transient-vs-deterministic decision behind retry-vs-discard) now has direct unit coverage pinning the provider-5xx allow-list (500/502/503/504/522/524/529), the deliberate501/505exclusion, 4xx, and non-HTTP discard cases. Newtranslate_resource_worker_retryable_test.exsruns as a pure-function (no-DB) test, since in CI the AI plugin isn’t loaded and the worker’s job path can only surface:ai_not_installed.
Changed
TranslateResourceWorker.retryable?/1is now@doc falsepublic (a unit-test seam, same as the existingtranslate_now/1); not part of the supported API.- Internal cleanup: dropped a redundant identity
caseinpersist_translation_atomic/4and corrected a stale code comment inProjectFormLive’s save guard.
Projects 0.5.1. Install or update: {:phoenix_kit_projects, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.