Skip to content

[#47] AI가 branch 조합의 충돌 해결 코드와 작업 순서를 제안한다#61

Merged
opficdev merged 6 commits into
developfrom
feat/#47
Jul 17, 2026
Merged

[#47] AI가 branch 조합의 충돌 해결 코드와 작업 순서를 제안한다#61
opficdev merged 6 commits into
developfrom
feat/#47

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • deterministic merge 상태와 graph 결과를 변경하지 않고 branch 조합 evidence를 바탕으로 해결 방법을 제안하는 AI 경로 구성
  • confirmed conflict에서는 원인과 구체적인 patch를, clean overlap에서는 merge 또는 rebase 순서와 예방 조치를 제안하도록 응답 계약 분리
  • AI provider 및 응답 검증 실패가 다른 branch 조합과 deterministic 결과에 영향을 주지 않도록 실패 범위 격리

📝 작업 내용

📌 요약

  • AiConfirmedConflictResponseAiCleanOverlapResponse 전용 타입 추가
  • 상태별 prompt와 OpenAI structured output schema 추가
  • 응답과 ordered pair, merge 상태, branch 순서, evidence 파일의 일치 검증 추가
  • branch 조합별 provider 순차 호출과 predicted 또는 failed 결과 반환 경로 추가
  • branch 조합 관련 API와 타입을 src/index.ts에 공개

🔍 상세

  • confirmed conflict prompt에서 제공된 코드 문맥에 기반한 conflict 원인, merge 또는 rebase 순서, 파일별 patch 제안을 요구하도록 구성
  • clean overlap prompt에서 현재 merge 상태를 확정 conflict로 표현하지 못하도록 제한하고 예방 조치만 제안하도록 구성
  • 두 상태에 서로 다른 responseShape와 OpenAI JSON schema를 적용하고 정의되지 않은 필드를 허용하지 않도록 구성
  • 응답의 ordered pair, kind, 작업 순서 branch, 원인 및 제안 파일을 요청 evidence와 대조하도록 validator 구성
  • 제공되지 않은 파일, 중복된 작업 순서 branch, 빈 patch 또는 예방 조치, 다른 상태의 응답 필드를 거부하도록 구성
  • branch 조합을 입력 순서대로 한 번씩 호출하고 provider 또는 validation 실패를 해당 조합의 failed 결과로 격리하도록 구성
  • 모든 provider 호출이 실패해도 deterministic graph 결과를 유지할 수 있도록 workflow 전체 오류 전파 경로 미추가
  • AI 제안을 repository에 자동 적용하거나 파일을 수정하는 경로 미추가
  • 기존 branch 단위 AI prediction, src/workflows/mergeRiskWatch.ts, report, Discord, debug artifact 동작 유지

📸 영상 / 이미지 (Optional)

해당 없음

@opficdev opficdev self-assigned this Jul 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 풀 리퀘스트는 브랜치 조합(Branch Pair)에 대한 AI 예측 기능(확정 conflict 해결 및 clean overlap 예방)을 추가하는 변경사항을 담고 있습니다. 이를 위해 전용 프롬프트 빌더, 시스템 프롬프트 템플릿, 응답 검증기(Validator) 및 실행기(Runner)가 새롭게 구현되었습니다. 리뷰어 피드백으로는 AI가 응답 생성 시 브랜치 이름의 순서를 임의로 변경하여 검증에 실패하는 문제를 방지하기 위해 시스템 프롬프트에 순서 보존 지침을 명시할 것과, LLM 응답 문자열의 불필요한 공백으로 인한 매칭 실패를 방지하기 위해 stringFor 함수에서 trim()을 적용하도록 개선할 것을 제안했습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/ai/predictionPairPromptTemplates.ts
Comment thread src/ai/predictionPairPromptTemplates.ts
Comment thread src/ai/predictionPairResponseValidator.ts
@opficdev
opficdev merged commit 8c8c168 into develop Jul 17, 2026
3 checks passed
@opficdev
opficdev deleted the feat/#47 branch July 17, 2026 03:05
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.

AI가 branch 조합의 충돌 해결 코드와 작업 순서를 제안한다

1 participant