Skip to content

Migrate translation workflows to @v0 and the upstream review template#73

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

Migrate translation workflows to @v0 and the upstream review template#73
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 replaces the original translate setup review workflow with the upstream template from action-translation docs/user/tutorials/connect-existing.md.

This was the least-protected review workflow in the estate

The existing file was still the auto-generated translate setup output. It had no labeled trigger, no concurrency group and no permissions block, so:

  • a sync's labeled events started no review at all on that event type, and nothing serialised concurrent runs against the same PR;
  • v0.17.0's review dedupe deletes superseded comments, which needs pull-requests: write — absent here, so dedupe could not work even once the pin moved.

Both the .fr and .fa editions had already adopted at least part of the template; this repo had none of it.

The pin was also 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 on otherwise clean PRs. This repo is exposed to it today.

On the concurrency placement

Job-level rather than workflow-level is deliberate and field-verified: the group is entered only after the job's if has passed, so a labeled event for automated skips out without cancelling the in-flight real review. This was confirmed across roughly 15 live opportunities on lecture-intro.zh-cn, where a review was posted every time.

Note on -W

Unlike the .fa and .fr PRs in this wave, no build change is needed here — this edition already builds -n -W --keep-going in both ci.yml and publish.yml.

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

🤖 Generated with Claude Code

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 replaces the original
`translate setup` review workflow with the upstream template from
action-translation docs/user/tutorials/connect-existing.md.

This was the least-protected review workflow in the estate. It had no
`labeled` trigger, no concurrency group and no `permissions` block, so:

- a sync's `labeled` events started no review at all on that event type,
  and nothing serialised concurrent runs against the same PR;
- v0.17.0's review dedupe deletes superseded comments, which needs
  `pull-requests: write` — absent here, so dedupe could not work.

The pin was also two releases behind. 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 — this repo is exposed to it today.

The job-level (not workflow-level) concurrency placement is deliberate
and field-verified: the group is entered only after the job's `if` has
passed, so a `labeled` event for 'automated' skips out without
cancelling the in-flight real review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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 the repository’s translation automation workflows to align with the upstream QuantEcon/action-translation “connect existing repo” template and to follow the project policy of tracking the floating @v0 major tag rather than a fixed patch pin.

Changes:

  • Migrate QuantEcon/action-translation usage from @v0.16.1 to @v0 in both review and rebase workflows.
  • Expand the review workflow triggers and add job-level permissions plus PR-scoped concurrency to ensure labeled events are handled and duplicate reviews are avoided.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/review-translations.yml Updates triggers and adds permissions/concurrency while moving the action reference to @v0 for translation review comments.
.github/workflows/rebase-translations.yml Moves the rebase automation to QuantEcon/action-translation@v0 to track the supported major version line.

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

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>
@mmcky
mmcky merged commit e74271a into main Jul 21, 2026
2 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