Summary
When a maintainer leaves scoped fix requests on an open translation PR, the runner has no path to apply them. It either skips the file (PR still “valid”) or performs a full branch reset and re-translation from English upstream, which is costly and can reintroduce the same defects.
Problem
TranslationPullRequestValidityManager treats a PR as workflow-complete when it is open, mergeable, and fork content passes target-language detection. It does not consider maintainer review comments.
If translation runs anyway, resetTranslationBranch closes the PR, deletes the branch, and opens a new PR after a full-file LLM pass from upstream source (translation-batch.manager.ts).
Maintainer comments on pt-br.react.dev are consistently surgical (one section, diff, or glossary fix). Examples:
Merged PRs #1227, #1238, #1241 were fixed and merged manually after review, which is the effective process today.
Proposed direction
-
Validity
- Invalidate “valid PR” when a configured maintainer (or org member) commented on the PR after the last runner commit on that branch.
- Optional: label-driven (
changes-requested) if the team adopts it.
-
Remediation tiers (in order)
- Mechanical: apply explicit
diff / before-after lines from comment text when parseable.
- Section-scoped LLM: re-translate only the cited heading range with maintainer text as retry hints.
- Full re-translate: last resort; prefer commit on existing branch and keep PR number when possible.
-
Do not close the PR with the generic “refreshing from upstream” comment when executing a targeted fix.
Acceptance criteria
References
Summary
When a maintainer leaves scoped fix requests on an open translation PR, the runner has no path to apply them. It either skips the file (PR still “valid”) or performs a full branch reset and re-translation from English upstream, which is costly and can reintroduce the same defects.
Problem
TranslationPullRequestValidityManagertreats a PR as workflow-complete when it is open, mergeable, and fork content passes target-language detection. It does not consider maintainer review comments.If translation runs anyway,
resetTranslationBranchcloses the PR, deletes the branch, and opens a new PR after a full-file LLM pass from upstream source (translation-batch.manager.ts).Maintainer comments on pt-br.react.dev are consistently surgical (one section, diff, or glossary fix). Examples:
Merged PRs #1227, #1238, #1241 were fixed and merged manually after review, which is the effective process today.
Proposed direction
Validity
changes-requested) if the team adopts it.Remediation tiers (in order)
diff/ before-after lines from comment text when parseable.Do not close the PR with the generic “refreshing from upstream” comment when executing a targeted fix.
Acceptance criteria
skipIfValidTranslationPullRequest.translate/…branch without closing the PR when doing a targeted fix (design + implementation).References
src/app/services/runner/workflow/translation-pull-request-validity.manager.tssrc/app/services/runner/workflow/translation-batch.manager.ts(resetTranslationBranch,skipIfValidTranslationPullRequest)target.mdpara Português (Brasil) reactjs/pt-br.react.dev#1227, Tradução deViewTransition.mdpara Português (Brasil) reactjs/pt-br.react.dev#1238, Tradução decaptureOwnerStack.mdpara Português (Brasil) reactjs/pt-br.react.dev#1241, Tradução depurity.mdpara Português (Brasil) reactjs/pt-br.react.dev#1215, Tradução desunsetting-create-react-app.mdpara Português (Brasil) reactjs/pt-br.react.dev#1186