Skip to content

Align the test-translation-sync harness repos with production config (labels, workflows, .translate bootstrap, frontmatter) #109

Description

@mmcky

The #108 smoke test (test-translation-sync.fa#78, 2026-07-18) surfaced that the harness repos have drifted from what production target repos actually run: the very first forward --github run errored on PR creation because the .fa repo lacked the action-translation-sync and resync labels — a failure no production repo wired per the tutorials would hit. The harness only earns its keep if its config mirrors production closely enough that e2e results transfer, and the periodic "Reset: base state for testing" commits reset content but not config, so this drift accumulates silently.

Current state vs production

test-translation-sync (source) test-translation-sync.fa test-translation-sync.zh-cn Production wiring
Sync/forward labels old translate:* taxonomy action-translation-sync + resync created manually 2026-07-18 during the smoke (missing before; gh pr create --label fails hard) present present per tutorials
Review workflow n/a none — review can only be driven locally with INPUT_* env vars review-translations.yml, heavily drifted (below) v0.17.0 template
Action version sync workflows pin ref: v0.16.1, checkout + npm ci + uses: ./action n/a review checks out the default branch (unpinned actions/checkout of the action repo) QuantEcon/action-translation@v0
Model pin workflow default n/a claude-sonnet-4-5-20250929 (two generations old) default (claude-sonnet-5)
.translate/ bootstrap n/a absent absent status --write-state after connect
Base-state frontmatter n/a legacy heading-map: legacy heading-map: translation: block (new format)

Specific drift in test-translation-sync.zh-cn/review-translations.yml

Compared with the v0.17.0 template it is missing the labeled trigger type (labels are applied after the PR opens, so [opened, synchronize] misses label-gated PRs), the per-PR concurrency group with cancel-in-progress, and the explicit permissions block (pull-requests: write, needed for duplicate-comment cleanup). It also gates on contains(labels, 'action-translation'), which forward resync PRs do not carry — they get action-translation-sync + resync — so resync PRs never auto-trigger review even where the workflow exists. That last point is also true of production wiring and is really a #104 follow-up question for the tool: either forward PRs should additionally carry action-translation, or the review template should trigger on the resync labels too; whichever way it lands, the harness should match.

Suggested work

  1. Labels: create the production label set in all three repos (done by hand for .fa on 2026-07-18 — verify .zh-cn and the source repo, and check the label set the sync pr-labels default expects: action-translation, automated).
  2. Workflows: replace the drifted/absent review workflows in both target repos with the current v0.17.0 template (labeled trigger, concurrency, permissions), and repin the source repo's two sync workflows from ref: v0.16.1 to the pattern production uses (@v0, or a deliberate ref: main in exactly one designated canary repo if we want pre-release coverage — but make it a labeled choice, not drift).
  3. Bootstrap: run status --write-state in both target repos and migrate base-state frontmatter from legacy heading-map: to the translation: block, then bake both into the reset procedure.
  4. Make resets config-preserving: encode 1–3 in a small bootstrap script or checklist (e.g. scripts/harness/) so "Reset: base state" restores production-equivalent config, not just content. The e2e harness docs should state which action ref each workflow is expected to pin so drift is detectable by inspection.

Why it matters

The harness exists to catch exactly the class of failure #108 shipped fixes for — and the smoke run only found the label gap because the config had drifted from production. Aligned config also means the next e2e wave (and the #107 validation wave, when it runs) tests what target repos will actually execute, including the review trigger path that failed silently for resync PRs in production (#104).

Refs: #108 (smoke run), #104 (review trigger labels), #92 (2026-07-15 e2e harness run), QuantEcon/test-translation-sync.fa#78 (the smoke PR, closed after passing).

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceRoutine housekeeping: style, formatting, env & dependency upkeep

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions