Skip to content

[#44] 위험한 branch 조합의 병합 코드 문맥을 추출한다#58

Merged
opficdev merged 10 commits into
developfrom
feat/#44
Jul 16, 2026
Merged

[#44] 위험한 branch 조합의 병합 코드 문맥을 추출한다#58
opficdev merged 10 commits into
developfrom
feat/#44

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • 위험한 branch 조합의 병합 판단 근거를 merge base와 각 version 기준으로 구조화하기 위한 기반 구성
  • worktree와 index를 변경하지 않는 Git object 기반 코드 문맥 수집 경로 마련

📝 작업 내용

📌 요약

  • MergeCodeContextEvidence 중심의 file, range, commit metadata 모델 추가
  • confirmed_conflictclean_hunk_overlapbase, left, right, merged 문맥 수집
  • snippet의 text, binary, deleted, missing 상태 분류
  • Git object batch 조회와 branch 조합별 실패 격리 구성
  • conflict, clean overlap, evidence 생성, Git 조회의 책임별 모듈 분리

🔍 상세

  • git merge-tree 수집 시점의 left/right commit OID 보존
  • merge base, merged tree OID와 base/left/right commit metadata 포함
  • conflict marker와 diff hunk 기준의 문맥 범위 해석
  • 함수 범위 우선 적용과 제한된 범위 대체 처리
  • 앞선 conflict와 대규모 삽입으로 행 위치가 변한 merged tree 범위 대응
  • clean 병합에서 양쪽 변경 hunk가 merge-base 좌표로 겹치는 문맥만 수집
  • branch 조합 하나의 실패가 다른 조합에 영향을 주지 않는 격리와 입력 순서 보존
  • Git object batch process, snippet 수집, conflict marker 범위 수집의 책임 분리
  • worktree와 index 불변성, binary·삭제·누락 파일, 범위 변환에 대한 테스트 추가
  • 개발 보조 디렉터리 superpowers/ Git 추적 제외
  • mise exec node@22 -- npm run build 통과
  • mise exec node@22 -- npm test 전체 159개 테스트 통과
  • git diff --check 통과

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jul 16, 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

This pull request introduces a comprehensive Git code context collection system to gather conflict and clean overlap evidence during branch comparisons. It adds modules for batch-reading Git objects, parsing diff hunks, streaming snippets, and collecting conflict markers, along with extensive unit tests. The feedback suggests avoiding defensive fallback values (like ?? 0) in gitObjectSnippetCollector.ts where upstream validation already guarantees the property's presence, recommending a non-null assertion instead.

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/git/gitObjectSnippetCollector.ts Outdated
@opficdev
opficdev merged commit 821e4b6 into develop Jul 16, 2026
3 checks passed
@opficdev
opficdev deleted the feat/#44 branch July 16, 2026 12:32
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 조합의 병합 코드 문맥을 추출한다

1 participant