Skip to content

Run the translate job when nothing needed extracting - #15778

Closed
emirb wants to merge 1 commit into
quattrofrom
fix/i18n-sync-translate-skip
Closed

emirb wants to merge 1 commit into
quattrofrom
fix/i18n-sync-translate-skip

Conversation

@emirb

@emirb emirb commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

The Sync translations workflow has not translated anything since it landed: in all 17 runs so far, translate was skipped. So every English string added since then is untranslated in all 49 languages. Today that is 20 items per language: the seven style.font.cjk menu entries from #15508, three CLI strings and ten manual chapters. It is also why test/shell.d/i18n-test.sh fails on quattro (da/menu.json mirrors the English catalog; it stops at the first language).

Why

translate had if: needs.prepare.outputs.locales != '[]' and no status function, so GitHub evaluates it as success() && (...). success() looks at every job upstream of translate, not just its direct needs, and is false when any of them was skipped. extract and validate-extract are skipped on every run that has nothing to extract, and they sit upstream of translate through publish-extract. publish-extract, collect and land already start with always() && !cancelled() for this reason; translate didn't.

From the log archive of the last run, 39072331078:

  • publish-extract saw extract and validate-extract as skipped.
  • collect saw has_work == 'true', and its collect step received EXPECTED_LOCALES with all 49 languages. So translate's own condition was true, and it was skipped anyway.

GitHub documents this ("a failure or skip applies to all jobs in the dependency chain from the point of failure or skip onwards"), and it is tracked in actions/runner#2205.

What

translate gets the same guard as its siblings, plus an explicit check that prepare and publish-extract succeeded, so a failed or cancelled upstream job still stops it:

if: ${{ always() && !cancelled() && needs.prepare.result == 'success' && needs.publish-extract.result == 'success' && needs.prepare.outputs.locales != '[]' }}

Before merging

omacom/omarchy has no Actions secrets or variables at all (checked with admin access: 0 repository secrets, 0 variables, 0 organization secrets available to it). omacom/omarchy-site has a MUSE_API_KEY, but secret values can't be copied, so whoever holds the key needs to add it here first. Merged without it, translate would run on every sync and all 49 language jobs would stop at the workflow's own check ("Add the MUSE_API_KEY Actions secret to enable automatic translations."), turning each run red without translating anything. I18N_SYNC_TOKEN is optional: without it the translations pull request still opens, but someone has to nudge it before auto-merge can pass. This stays a draft until the key is in place.

Testing

actionlint 1.7.12 (with shellcheck) reports nothing new; its one finding is an info-level shellcheck note in land that quattro has too. Actions can't be run locally, so the real check is a manual run of the workflow after merging: translate should run for the 49 pending languages and the run should open the auto-merging "Update translations" pull request.

Its condition had no status function, so GitHub added success(), which
is false when extract and validate-extract were skipped upstream. They
are skipped on every run with nothing to extract, so since the workflow
landed no run has translated anything. Guard it the way publish-extract,
collect and land already are.
@emirb
emirb marked this pull request as draft October 17, 2026 23:24
@greptile-apps

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The code change appears safe to merge once the acknowledged credential setup is complete.

Summary

Updates translate so skipped extraction jobs do not prevent pending translations from running.

  • Pending translations run even when extraction is skipped.

No new actionable issues found. GitHub Actions was not run during this review.

Reviews (2) · Last reviewed commit: "Run the translate job when nothing neede..." · Reviewed by Greptile

@emirb

emirb commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@dhh before merging we need to add the MUSE_API_KEY Actions secret to enable automatic translations

@omarchybot omarchybot added the bug Something isn't working label Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This fixes a real bug, but #15549, opened two days earlier, makes the same fix. That one is the one going forward, and this one is waiting on the maintainer.

What was checked: the job results of every Sync translations run on record. In all 74 runs that got past prepare, extract was skipped and so was translate, including the latest, 39853440966, where publish-extract and collect succeeded. Your reading of the cause holds: a job with no status function gets an implicit success(), which is false when anything upstream was skipped.

Both pull requests change only the if: on translate in .github/workflows/i18n-sync.yml, to always() && !cancelled() && needs.publish-extract.result == 'success' && needs.prepare.outputs.locales != '[]'. This one also checks needs.prepare.result == 'success', but that never changes the outcome, because publish-extract (line 179) can only succeed when prepare did. A failed or cancelled prepare, extract or validate-extract stops translate under either condition. Where two fixes behave the same, the older one is kept, so the first to the fix keeps the credit. Nothing was run on a worker, because a workflow condition only runs inside GitHub Actions. This one was not labelled verified, since verifying a fix that won't be merged spends a worker on nothing.

The review is by Claude Opus 5.5. Codex Medium and muse-spark-1.3-contributor (pi, thinking high) were each asked which of the two should go forward, without being shown that answer. Both chose #15549 and found no case where the conditions differ. They had access to this session's work, so their agreement is not guaranteed to be independent. Codex Medium also classified this as a bug fix separately, and it agreed.

Your point about MUSE_API_KEY applies to #15549 too: merged without the secret, every translate job would stop at the workflow's own check and turn the run red. That has gone to the maintainer with #15549. Whether to close this one is the maintainer's decision.

@emirb

emirb commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Closing: #16559 merged the same fix to the translate job’s condition on Oct 25.

@emirb emirb closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants