[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -1,100 +1,191 @@
---
id: wiki-2026-0508-pull-request-and-issue-tracking
title: Pull Request and Issue Tracking
category: Other
status: needs_review
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [pull_request_and_issue_tracking]
aliases: [PR Workflow, Code Review, Issue Tracker]
duplicate_of: none
source_trust_level: A
confidence_score: 0.95
tags: [- pull_request - issue_tracking - code_review - devops - collaboration]
raw_sources: ["- Other/풀_리퀘스트_및_이슈_트래커_PR_&_Issue_Tracker.md - Other/풀_리퀘스트_및_이슈_트래킹_Pull_Requests_&_Issue_Tracking.md - AI_and_ML/풀 리퀘스트 워크플로우.md - AI_and_ML/풀 리퀘스트(PR) 기반 보안 검토.md"]
last_reinforced: 2026-05-08
confidence_score: 0.9
verification_status: applied
tags: [git, github, workflow, devops]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: unspecified
framework: unspecified
language: yaml
framework: github-gitlab
---
# 풀 리퀘스트 및 이슈 트래킹 (Pull Request & Issue Tracking)
# Pull Request and Issue Tracking
## 📌 한 줄 통찰 (The Karpathy Summary)
풀 리퀘스트(PR)와 이슈 트래킹은 코드의 변경 사항을 제안, 검토, 병합하고 버그나 기능 요청을 체계적으로 추적하는 현대적 협업의 핵심 도구입니다 [1, 2]. 코드베이스 해독 관점에서 이들은 단순히 작업 관리 도구를 넘어, 코드가 왜 현재의 형태로 작성되었는지에 대한 역사적 맥락, 설계 결정, 그리고 암묵적 지식을 명시적으로 담고 있는 필수적인 서사(Narrative) 기록소 역할을 합니다 [4].
## 한 줄
> **"매 PR 의 unit of code change, 매 issue 의 unit of intent"**. GitHub (2008) 의 popularize, GitLab/Bitbucket/Gitea/Forgejo 의 follow. 매 2026 의 standard workflow 의 trunk-based + small PRs + automated checks + LLM-assisted review (CodeRabbit, GitHub Copilot Workspace, Claude Code).
## 📖 구조화된 지식 (Synthesized Content)
### 1. 코드의 역사적 맥락과 설계 의도 파악
* **서사 저장소**: 소스 코드는 시스템의 현재 상태만을 보여주지만, PR과 이슈 트래커는 코드가 그러한 형태로 존재하게 된 서사를 담고 있습니다. PR 설명, 커밋 메시지, 토론 기록은 당시의 설계 결정과 비즈니스 요구사항을 이해하는 유일한 단서가 됩니다 [1, 4].
* **암묵적 지식의 명시화**: 과거에 시도했다가 기각된 대안들이나 기술적 타협점(Trade-off)에 대한 기록은 현재 코드가 가진 제약 사항과 부채를 이해하는 데 매우 중요합니다 [1, 2].
## 매 핵심
### 2. 효율적인 워크플로우 및 코드 리뷰
* **지식 교환의 장**: PR은 단순한 코드 병합 요청이 아니라 질문을 던지고 가정을 검증하며 제품을 개선하는 대화의 시작점입니다 [1, 3].
* **단계별 리뷰**: 전체 그림(Big Picture) 파악 → 파일별 변경 확인 → 핵심 로직 및 타입 정의 검토 → 커밋 이력 확인 순으로 진행하는 것이 효율적입니다 [9-14].
* **보안 검토 통합**: PR 단계에서 정적 분석(SAST) 및 보안 취약점 스캔을 자동화하여 이슈를 조기에 식별(Shift-Left)합니다 [22, 23].
### 매 PR Lifecycle
1. **Branch** — 매 feature/fix branch 의 cut from main.
2. **Commit** — 매 atomic change + descriptive message (Conventional Commits).
3. **Open PR** — 매 description (what/why/how) + linked issue.
4. **CI** — 매 lint, test, build, security scan.
5. **Review** — 매 human + LLM-assist.
6. **Merge** — 매 squash / rebase / merge commit.
7. **Deploy** — 매 main 의 push 의 trigger CD.
### 3. AI 및 자동화 도구의 활용
* **컨텍스트 추출**: AI 기반 분석 도구들이 PR 및 이슈 데이터를 읽어 코드의 존재 목적을 고차원적으로 설명하거나 설계 결정을 요약합니다 [2, 9, 17-21].
* **MCP 연동**: AI 에이전트가 GitHub API 등을 통해 PR 데이터를 직접 조회하여 탭 전환 없이 맥락을 파악하고 리뷰를 보조합니다 [17, 18, 40].
### 매 Issue Types
- **Bug** — 매 actual misbehavior + repro steps.
- **Feature** — 매 user-facing capability request.
- **Task** — 매 internal work (refactor, debt).
- **Epic** — 매 multi-PR initiative.
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
* **인지적 과부하**: PR의 규모가 너무 크면(예: 50개 이상의 파일 변경) 리뷰어와 AI 모델 모두 문맥을 잃기 쉽습니다. 피처 플래그(Feature Flags)를 활용하여 작고 점진적인 단위로 쪼개는 것이 권장됩니다 [24-26].
* **알림 피로 (Notification Fatigue)**: 무분별한 리뷰 요청은 방치나 무검토 병합을 초래할 수 있습니다. 적절한 '코드 오너(Code Owners)' 설정과 알림 제어가 필요합니다 [15, 19, 27].
* **정보의 노이즈**: 상투적인 문구나 무의미한 체크리스트 등은 분석에 방해가 되므로 핵심 설계 결정 위주로 기록해야 합니다 [17, 18].
### 매 Automation Surface
- Branch protection (required reviews + checks).
- Auto-assign reviewers (CODEOWNERS).
- Auto-label / triage bots.
- Stale issue cleanup.
- Release notes (release-please).
## 🔗 지식 연결 (Graph)
- **Related Topics**: [[버전 관리 시스ᄐEM(Version Control Systems)|버전 관리 시스템]], [[코드 리뷰(Code Review)|코드 리뷰]], CI/CD, 기술적 부채
- **Projects/Contexts**: GitHub 워크플로우, Jira/Linear 이슈 연동, AI 기반 PR 리뷰 시스템 (CodeRabbit 등)
- **Contradictions/Notes**: 과도한 제동(Request Changes)은 배포 속도를 지연시킵니다. 심각한 오류가 없다면 승인 후 별도 이슈로 개선 사항을 처리하는 유연함이 장기적인 생산성에 유리할 수 있습니다 [28, 29].
### 매 응용
1. Solo project — 매 PR 의 self 의 review 의 force structure.
2. Team — 매 ownership boundary 의 CODEOWNERS.
3. OSS — 매 issue triage 의 community signal.
4. Compliance — 매 audit trail 의 SOC2/ISO 27001.
---
*Last updated: 2026-05-08*
## 💻 패턴
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### PR template (`.github/PULL_REQUEST_TEMPLATE.md`)
```markdown
## What
<one-liner>
**언제 이 지식을 쓰는가:**
- *(TODO)*
## Why
<motivation, linked issue: #123>
**언제 쓰면 안 되는가:**
- *(TODO)*
## How
<technical approach summary>
## 🧪 검증 상태 (Validation)
## Test plan
- [ ] Unit tests pass
- [ ] Manual repro on staging
- [ ] No new warnings
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
## 🧬 중복 검사 (Duplicate Check)
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
## 🕓 변경 이력 (Changelog)
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 💻 코드 패턴 (Code Patterns)
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
```text
# TODO
## Risk
Low / Medium / High — explain.
```
## 🤔 의사결정 기준 (Decision Criteria)
### Issue template (`.github/ISSUE_TEMPLATE/bug.yml`)
```yaml
name: Bug report
description: File a bug
labels: [bug, triage]
body:
- type: textarea
id: repro
attributes:
label: Steps to reproduce
validations: { required: true }
- type: textarea
id: expected
attributes:
label: Expected behavior
- type: input
id: version
attributes: { label: Version }
```
**선택 A를 써야 할 때:**
- *(TODO)*
### CODEOWNERS
```
# .github/CODEOWNERS
*.py @backend-team
/web/** @frontend-team
/infra/** @platform @sre
*.md @docs
```
**선택 B를 써야 할 때:**
- *(TODO)*
### CI gate (GitHub Actions)
```yaml
name: ci
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm ci
- run: npm run lint
- run: npm test -- --coverage
- uses: codecov/codecov-action@v4
```
**기본값:**
> *(TODO)*
### Auto-merge after green
```yaml
name: auto-merge
on: pull_request_review
jobs:
automerge:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- uses: pascalgn/automerge-action@v0.16.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: squash
MERGE_LABELS: "automerge,!wip"
```
## ❌ 안티패턴 (Anti-Patterns)
### `gh` CLI workflow
```bash
# Create PR
git checkout -b fix/null-deref
git commit -am "fix: handle null user in checkout"
gh pr create --fill --reviewer alice,bob
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
# Review queue
gh pr list --search "is:open review-requested:@me"
# Triage
gh issue list --label "needs-triage" --json number,title,createdAt
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Small change | Squash merge |
| Long-lived feature | Merge commit (preserve history) |
| Linear history fans | Rebase + fast-forward |
| Many reviewers | CODEOWNERS auto-request |
| OSS project | Issue templates + DCO |
| Internal monorepo | Required checks + auto-merge |
**기본값**: small PRs (<400 LOC) + squash merge + Conventional Commits + required CI.
## 🔗 Graph
- 부모: [[Git]] · [[CI-CD]]
- 변형: [[GitHub]] · [[GitLab]] · [[Gitea]] · [[Forgejo]]
- 응용: [[Code-Review]] · [[Trunk-Based-Development]]
- Adjacent: [[Conventional-Commits]] · [[Semantic-Versioning]] · [[CODEOWNERS]]
## 🤖 LLM 활용
**언제**: PR description 의 generate, review 의 first-pass (style, obvious bugs), issue triage 의 label.
**언제 X**: security-critical review — 매 human 의 final approve.
## ❌ 안티패턴
- **Mega-PR (5000+ LOC)**: 매 review 의 useless — 매 split 의 require.
- **Empty description**: 매 reviewer 의 context-free.
- **Force-push to shared branch**: 매 review history 의 destroy — feature branch 의 only.
- **Self-merge without review**: 매 sole-maintainer except — 매 audit trail 의 weak.
- **Issue 의 dump 의 chat**: 매 GitHub issue 의 single source of truth.
## 🧪 검증 / 중복
- Verified (GitHub Docs 2026, Conventional Commits v1.0).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — PR/issue templates + CI patterns + gh CLI |