proofreader_task:
  name: "LLM Translation Proofreader"
  container:
    image: python:3.12
  env:
    OPENAI_BASE_URL: "https://api.ppq.ai"
    OPENAI_MODEL: "google/gemini-3-flash-preview"
    CONCURRENCY: "50"
    # in addition, OPENAI_API_KEY is set as an "override" in https://cirrus-ci.com/settings/...
  only_if: $CIRRUS_PR != ''
  install_dependencies_script:
    - pip install polib aiohttp unidiff
  compute_diff_script:
    - git fetch origin $CIRRUS_DEFAULT_BRANCH
    - git diff origin/$CIRRUS_DEFAULT_BRANCH..HEAD -- locale/ > /tmp/locale.diff
    - echo "Diff size:" && wc -l /tmp/locale.diff
  proofread_script:
    - python llm_proofreader/llm_proofreader.py --diff /tmp/locale.diff --output-dir /tmp/cirrus-ci-build/proofreader_reports
  always:
    report_artifacts:
      path: "/tmp/cirrus-ci-build/proofreader_reports/**"
      type: text/plain

