Skip to content

fix: MQM 계약 위반 응답 격리 및 안전한 repair 차단 - #35

Open
harheem wants to merge 1 commit into
mainfrom
codex/fix-mqm-validation-and-safe-dispatch
Open

harheem wants to merge 1 commit into
mainfrom
codex/fix-mqm-validation-and-safe-dispatch

Conversation

@harheem

@harheem harheem commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

배경

대상 저장소 PR #196을 gpt-5.6-luna, MQM 동시성 4로 실측한 결과 quality job은 6분 20초로 기존 17분 45초보다 약 64% 단축되었습니다. 그러나 290개 segment 중 245개가 JSON schema 이후의 의미 계약을 위반해 폐기되었고, 남은 결과에서 생성된 444개 finding이 자동 repair 입력으로 넘어가는 안전 문제를 확인했습니다.

재현 run: https://github.com/Hugging-Face-KREW/hugging-face-krew.github.io/actions/runs/32820549064

변경 사항

  • schema는 통과했지만 verbatim span, terminology status, failed term/error 연결 규칙을 위반한 MQM 응답을 격리합니다.
  • 격리 응답의 finding은 issue나 repair 근거로 사용하지 않고 semantic evaluation을 incomplete 상태로 유지합니다.
  • 격리 상태를 cache v2에 저장해 동일 문서 재실행에서 실패한 245개 segment를 매번 다시 호출하지 않습니다. API timeout 등 일시적 실패는 캐시하지 않습니다.
  • MQM 처리 진행률을 25개마다 출력합니다.
  • 프롬프트에 literal substring, status 파생, linked terminology error 사전 점검을 명시합니다.
  • semantic evaluation이 incomplete이면 branch 수정 전에 자동 repair를 차단합니다.
  • workflow_call과 workflow_dispatch에 repair_enabled 입력을 추가해 수동 실행에서 mutation을 끌 수 있습니다.
  • 실패 시 붙인 hf-agent:needs-human 라벨은 green gate에서만 제거합니다.

검증

  • .venv/bin/python -m pytest -q — 343 passed
  • .venv/bin/python -m compileall -q scripts skills tests
  • workflow YAML parse 검증
  • git diff --check

관련 이슈

Related to #40

이 PR은 MQM 평가가 불완전할 때 자동 repair를 차단하는 공통 안전장치를 제공합니다. #40의 기존 게시글 수정 감지 및 quality·SEO 재검증 경로는 별도 구현·검증 대상입니다.

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.

1 participant