Skip to content

Migrate translation workflows to @v0, adopt the review template, enable -W#137

Merged
mmcky merged 2 commits into
mainfrom
migrate-v0-review-template
Jul 21, 2026
Merged

Migrate translation workflows to @v0, adopt the review template, enable -W#137
mmcky merged 2 commits into
mainfrom
migrate-v0-review-template

Conversation

@mmcky

@mmcky mmcky commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Moves review and rebase off the exact @v0.16.1 pin onto the floating @v0 tag — the policy settled in QuantEcon/project-translation#9 — and aligns the review workflow with the upstream template in action-translation docs/user/tutorials/connect-existing.md.

Why the pin matters here, not just as hygiene

The pin was two releases behind. v0.18.0 carries the fix for action-translation#102, a review-mode defect: a model response missing a criterion score became NaN and rendered as an automatic FAIL ("undefined/10") on otherwise clean PRs. This repo is exposed to that today.

Two substantive workflow changes beyond the pin

Concurrency moves from workflow level to job level, and cancel-in-progress from false to true. The previous comment argued that job-level true was unsafe: an automated label event would cancel the in-flight review for action-translation and then skip its own job via the filter, leaving no review at all. That was reasoned from the GitHub docs and never tested — and production disproved it. Across roughly 15 live opportunities on lecture-intro.zh-cn, the group was entered only after the if passed, the automated event skipped without cancelling, and a review was posted every time. The stale rationale is replaced rather than left in the file.

A permissions block is added. v0.17.0's review dedupe deletes superseded comments, which requires pull-requests: write.

Separately: -W on the notebook build

publish.yml in this repo already builds strict, so the PR gate was weaker than the publish gate — a corrupted sync could merge green and then break the published site. This aligns them.

Coverage is 26 of 26 lectures with a _toc.yml identical to source, so there are no untranslated-lecture references for the flag to trip on. The strict build is the last line of defence against the silent-corruption class in action-translation#118 and #119, both of which surfaced only because a downstream repo built with -n -W.

CI on this PR is the test of the -W half; any warning is either a translation defect to fix or a false positive to waive deliberately.

Part of Stage 1 of the translation program work plan. See QuantEcon/project-translation#9.

🤖 Generated with Claude Code

…le -W

Moves review and rebase off the exact `@v0.16.1` pin onto the floating
`@v0` tag, per the pin policy settled in
QuantEcon/project-translation#9, and aligns the review workflow with the
upstream template in action-translation
docs/user/tutorials/connect-existing.md.

Two substantive changes beyond the pin:

**Concurrency moves from workflow level to job level**, and
`cancel-in-progress` from false to true. The previous comment argued
that job-level `true` was unsafe because an 'automated' label event
would cancel the in-flight review for 'action-translation' and then
skip its own job via the filter, leaving no review at all. That was
reasoned from the GitHub docs and never tested, and production
disproved it: across roughly 15 live opportunities on
lecture-intro.zh-cn the group was entered only after the `if` passed,
the 'automated' event skipped without cancelling, and a review was
posted every time. The stale rationale is replaced rather than left in
place.

**A `permissions` block is added** — v0.17.0's review dedupe deletes
superseded comments, which requires `pull-requests: write`.

The pin was two releases behind, which matters here: v0.18.0 carries
the fix for a review-mode defect where a model response missing a
criterion score became NaN and rendered as an automatic FAIL on
otherwise clean PRs. See QuantEcon/action-translation#102.

Separately, `ci.yml` gains `-W` on the notebook build. This repo's
publish.yml already builds strict, so the PR gate was weaker than the
publish gate — a corrupted sync could merge green and then break the
published site. Coverage is 26 of 26 lectures with a `_toc.yml`
identical to source, so there are no untranslated-lecture references
for the flag to trip on. The strict build is the last line of defence
against the silent-corruption class in
QuantEcon/action-translation#118 and #119, both of which surfaced only
because a downstream repo built with -n -W.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 00:03
@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for majestic-griffin-10b166 ready!

Name Link
🔨 Latest commit 0f1efa1
🔍 Latest deploy log https://app.netlify.com/projects/majestic-griffin-10b166/deploys/6a5ec9df6fbd140008635c38
😎 Deploy Preview https://deploy-preview-137--majestic-griffin-10b166.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates this repository’s translation automation workflows to follow the current QuantEcon/action-translation guidance (moving off a hard pin to @v0), and tightens CI by treating Jupyter Book warnings as errors to better catch broken builds before merge.

Changes:

  • Migrate translation workflows from QuantEcon/action-translation@v0.16.1 to the floating @v0 tag.
  • Align the translation review workflow with the upstream template (job-level concurrency + required permissions).
  • Enable strict Jupyter Book builds in CI by adding -W to the build command.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/review-translations.yml Switches to action-translation@v0, adds job-level concurrency + permissions, and refreshes the review trigger filter logic.
.github/workflows/rebase-translations.yml Switches the rebase workflow to action-translation@v0.
.github/workflows/ci.yml Makes CI’s Jupyter Book build strict by adding -W (warnings as errors).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/review-translations.yml
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

The rebase workflow only fired for `translation-sync-*` branches, which
the Action's sync mode creates. The CLI's `translate forward --github`
creates `resync/{stem}` branches, so merging one resync PR never
rebased its siblings — during a drift-recovery wave that leaves a stack
of open PRs whose bases go stale with every merge.

Fixed engine-side in action-translation v0.18.1, but the action-side
half is not sufficient on its own: this `if` gates whether the job runs
at all, and it runs before the action does. Both layers must list both
prefixes or the result is a job that never starts.

Brings this file in step with the upstream template as of that release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
github-actions Bot temporarily deployed to pull request July 21, 2026 01:27 Inactive
@mmcky
mmcky merged commit 3b460fb into main Jul 21, 2026
7 checks passed
@mmcky
mmcky deleted the migrate-v0-review-template branch July 21, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants