Skip to content

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 deliberate 501/505 exclusion, 4xx, and non-HTTP discard cases. New translate_resource_worker_retryable_test.exs runs 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?/1 is now @doc false public (a unit-test seam, same as the existing translate_now/1); not part of the supported API.
  • Internal cleanup: dropped a redundant identity case in persist_translation_atomic/4 and corrected a stale code comment in ProjectFormLive’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.