feat(deploy): verify translations completed before declaring success#22
Merged
JohnRDOrazio merged 1 commit intomainfrom Apr 29, 2026
Merged
Conversation
Adds a post-translate verification step that polls each translation post's modified_gmt via the WP REST API until it advances past the deploy start time, with a 10-minute (20 × 30s) timeout. Fails the workflow with a list of stuck page IDs if any translation didn't update — previously the deploy reported success even when async translation jobs were silently abandoned by the queue worker. The /cdcf/v1/translate endpoint is fire-and-forget (HTTP 202 with "Translation queued"), so without this poll a backend failure (OpenAI timeout, dead Redis worker, missing API key, exhausted retries) is invisible at the workflow level. Concretely: the v0.2 release on 2026-04-19 reported success while leaving Italian/Spanish/ French/Portuguese/German project-vetting-criteria stuck on v0.1 content. Also captures DEPLOYED_IDS in the env block (per workflow injection hardening guidance) and renames the per-language failure log line from "translation failed" to "translation enqueue failed" since a non-200 from /translate only indicates the job didn't get queued. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
Verify translations completedstep that polls each translationpost's
modified_gmtvia the WP REST API and fails the workflow if anydidn't update past the deploy start time within 10 minutes.
/cdcf/v1/translatereturns202 "Translation queued"immediately —the deploy currently has no signal whether translation actually
succeeded
context=edit) so newly-created drafts arevisible too
(OpenAI timeout, dead Redis worker, missing/invalid API key)
Why
The v0.2 release on 2026-04-19 reported success in this workflow, but
all 5 translations of
project-vetting-criteria(it/es/fr/pt/de) werestill serving v0.1 content 10 days later, and 12 of 15 newly-created
translation pages were stuck as drafts. WP REST confirmed: source page
833
modified_gmt: 2026-04-19T00:28:24, all 5 translationsmodified_gmt: 2026-04-06T09:22:5x— untouched on Apr 19. The asyncworker had silently abandoned the jobs (OpenAI cURL timeouts in
production logs, retry logic dead-coded out — fixed in
CatholicOS/cdcf-website#38).
This step would have caught it.
Drive-by
DEPLOYED_IDSmoved into theenv:block per workflow-injectionhardening guidance
since a non-200 from
/translatemeans the job didn't queue, notthat translation itself failed
Dependencies
This step exercises behavior the cdcf-website backend now produces
correctly only after CatholicOS/cdcf-website#38 deploys. Merging this
first will work fine — the verify step just polls the existing
endpoint — but the next tagged release after both PRs deploy will
be the first one where verification can actually catch a worker
failure.
Test plan
v0.2.1(or trigger workflow_dispatch) and watchthe new step succeed
key) and confirm the workflow fails with the stuck-IDs message
after ~10 min
the new
translated_idsstep output🤖 Generated with Claude Code