Skip to content

[#45] branch 조합의 merge risk를 계산하고 충돌 그래프로 집계한다#59

Merged
opficdev merged 3 commits into
developfrom
feat/#45
Jul 16, 2026
Merged

[#45] branch 조합의 merge risk를 계산하고 충돌 그래프로 집계한다#59
opficdev merged 3 commits into
developfrom
feat/#45

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • baseBranch와 활성 branch의 조합별 merge 결과를 충돌 graph로 구성하고, 위험 관계를 양쪽 branch의 분석 결과에 반영하기 위한 변경

📝 작업 내용

📌 요약

🔍 상세

  • 충돌 graph 구성

    • baseBranch와 활성 branch를 중복 없는 graph node로 구성
    • branch 조합을 방향과 무관하게 정규화하여 graph edge에 한 번만 포함
    • edge 상태를 confirmed_conflict, potential_overlap, clean, error로 분류
    • 같은 파일 수정은 same_file_overlap, 같은 hunk 수정은 same_hunk_overlap reason으로 기록
    • merge 결과 또는 코드 문맥 수집 실패는 merge_check_failed, code_context_failed reason으로 구분
    • confirmed_conflict를 코드 문맥 수집 실패보다 우선하는 최상위 상태로 처리
  • branch별 관계 집계

    • 위험 edge의 상대 branch를 양쪽 node의 relatedBranchNames에 집계
    • branch별 confirmedConflictCountpotentialOverlapCount 집계
    • graph node, edge, 관련 branch, reason 파일을 정규화하고 branch 이름 기준으로 정렬
    • 동일한 입력에 대해 동일한 graph와 정렬 결과 생성
  • graph 기반 위험 분석

    • analyzeGraph에서 branch와 연결된 전체 graph edge를 기존 BranchRisk 형식으로 변환
    • confirmed_conflict 존재 시 100점의 critical 위험으로 우선 처리
    • conflict가 없는 경우 같은 file·hunk 겹침, critical file, 실패한 check를 보조 signal로 유지
    • graph 수집 오류를 기존 merge_check_failed 위험 근거로 호환 처리
  • 실행 흐름 연결

    • mergeRiskWatch에서 merge-tree 결과의 코드 문맥 수집 후 edge와 graph 생성
    • 기존 branch 단위 분석을 analyzeGraph 기반 분석으로 교체
    • 활성 branch 사이의 충돌을 양쪽 branch 위험 결과에 반영
    • 기존 deterministic-evidence.json, AI 대상 선택, report 생성 흐름과 연결

📸 영상 / 이미지 (Optional)

해당 없음

@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

이번 풀 요청은 브랜치 간의 충돌 및 겹침 관계를 나타내는 충돌 그래프(Conflict Graph) 빌더를 도입하고, 이를 기반으로 위험 분석을 수행하도록 riskAnalyzermergeRiskWatch 워크플로우를 개선합니다. 리뷰어는 conflictGraphBuilder.ts에서 파일 경로를 정렬할 때 브랜치 이름 비교 함수인 compareBranchNames를 사용하는 문제를 지적하며, 파일 경로 정렬을 위한 별도의 정렬 함수(sortedUniqueFiles)를 분리하여 사용할 것을 제안했습니다.

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/risks/conflictGraphBuilder.ts
@opficdev
opficdev merged commit 8a5cbb1 into develop Jul 16, 2026
3 checks passed
@opficdev
opficdev deleted the feat/#45 branch July 16, 2026 15:21
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.

branch 조합의 merge risk를 계산하고 충돌 그래프로 집계한다

1 participant