Backend translation publish guard
Section titled “Backend translation publish guard”This update documents the backend compatibility API guard for ramideltoro/nutsnews-backend#263.
What changed
Section titled “What changed”- Backend-primary Worker writes can no longer insert accepted articles as already
published. publish-articles-batchnow requires enabled summarylanguageCodesbefore publishing.- The backend checks
public.article_summariesfor every requested article/language pair. - Missing rows leave articles hidden and return structured
missingTranslationsdetails. - Recovery reads include both
publishedandtranslation_pendingarticles.
Worker boundary
Section titled “Worker boundary”The Worker repo must pass its enabled languages to publish-articles-batch, treat ok=false as a recoverable translation gap, and log the returned article URL/language pairs through worker.translation.* diagnostics.
Validation
Section titled “Validation”Backend validation:
python3 -m unittest tests.test_worker_db_apipython3 scripts/validate_backend_api_compatibility_contract.pypython3 scripts/backend_postgres_smoke_tests.py --offlinepython3 scripts/backend_app_db_api_smoke.py --offlinepython3 -m unittest discover -s testspython3 scripts/validate_no_secret_files.pygit diff --check