Skip to content

Maintainer feedback workflow #46

Description

@NivaldoFarias

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:

PR Fix type
reactjs/pt-br.react.dev#1227, reactjs/pt-br.react.dev#1200 Single heading or glossary term
reactjs/pt-br.react.dev#1241 One broken markdown link
reactjs/pt-br.react.dev#1238 One section mistranslated
reactjs/pt-br.react.dev#1215, reactjs/pt-br.react.dev#1186 Restore specific English lines in code
reactjs/pt-br.react.dev#1183reactjs/pt-br.react.dev#1189 Heading capitalization only

Merged PRs #1227, #1238, #1241 were fixed and merged manually after review, which is the effective process today.

Proposed direction

  1. 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.
  2. 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.
  3. Do not close the PR with the generic “refreshing from upstream” comment when executing a targeted fix.

Acceptance criteria

  • Open translation PR with unresolved maintainer feedback is not skipped by skipIfValidTranslationPullRequest.
  • Documented remediation order; full branch reset is not the default for review nits.
  • Runner can commit to the existing translate/… branch without closing the PR when doing a targeted fix (design + implementation).
  • Tests or integration scenario for “valid PR + new maintainer comment → re-process”.

References

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions