# task-2552 — GitHub Gemini Code Assist App 공식 docs trigger 조건 박제

**범주**: 검증 #2 (사실 검증 1:1)
**작성 시각 UTC**: 2026-05-11
**검증자**: dev1 헤르메스 (사전조사 Lv.1, read-only)

---

## 1. 공식 docs 인용

### 1.1 Gemini Code Assist on GitHub — auto-review

**출처**: <https://developers.google.com/gemini-code-assist/docs/use-code-assist-github>

> "When you open the new pull request, Gemini Code Assist provides an initial review."
> "When a new pull request is opened, Gemini Code Assist provides an initial review within five minutes. Once the review is ready, you'll see `gemini-code-assist[bot]` automatically added as a reviewer to the pull request."

**해석**: PR open 이벤트에 대해 Gemini App이 auto-review 작동. **PR author identity에 대한 명시적 제한 docs 미기재**.

### 1.2 `/gemini` 트리거 코맨드

> "You can request assistance from Gemini at any point in your pull request via creating an issue comment using either `@gemini-code-assist` or `/gemini <command>`."
> "The `/gemini review` command triggers a full re-review of the PR, and the `/gemini summary` command requests a new summary of the changes."

**핵심 docs 인용** (Google Developers):
> "Gemini Code Assist listens to comments from any pull request contributor, and decides whether it should respond."

**해석**: "any pull request contributor" — 명문상 bot/User 차별 없음. 단 "decides whether it should respond"는 내부 필터링 룰 가능성 시사.

### 1.3 Troubleshooting 공식 가이드

`/gemini review` 미작동 시 docs가 권장하는 확인 사항:
1. Setup/permissions: Gemini Code Assist app 설치 확인
2. Billing (Enterprise only): GCP project billing 연결
3. Repository access: app installation 시 대상 repo 선택 확인

**누락**: "bot identity의 댓글이 trigger되지 않음" 항목은 공식 docs에 **미기재**.

---

## 2. GitHub 측 공식 규칙 (간접 evidence)

**출처**: <https://docs.github.com/en/actions/using-workflows/triggering-a-workflow>

> "When you use the repository's `GITHUB_TOKEN` to perform tasks, events triggered by the `GITHUB_TOKEN` will not create a new workflow run, with the following exception: `workflow_dispatch` and `repository_dispatch` events always create workflow runs."

> "To trigger workflows from within a workflow, you must use either a GitHub App installation access token or a personal access token instead of the default `GITHUB_TOKEN`."

**해석**:
- 위 규칙은 **GitHub Actions의 workflow trigger**에만 명시. Gemini Code Assist는 별도 GitHub App이며 자체 webhook subscriber.
- 즉 위 규칙이 Gemini App의 webhook 응답 룰을 직접 강제하지는 않음.
- 단 Gemini App이 자체적으로 동일 패턴(bot identity ignore)을 구현했을 가능성 매우 높음 (recursive bot-to-bot 호출 방지 표준 패턴).

**우리 bot token 분석**:
- `BOT_GITHUB_TOKEN`은 `ghs_` prefix (GitHub App **installation access token**, server-to-server).
- 워크플로 GITHUB_TOKEN(`ghs_` 동일 prefix)과 동일 클래스이며, GitHub 측에서 종종 동일 룰을 적용함.

---

## 3. docs 정합성 결론

| 질문 | 공식 docs 답변 | 실증 evidence (검증 #1) |
|---|---|---|
| bot-opened PR에 Gemini auto-review 작동? | docs 미기재 (명시적 제한 X) | **미작동** (PR #91/#93/#94/#95/#96/#97/#98/#99 bot-opened — auto-review 0건) |
| bot `/gemini review` 댓글 trigger? | "any contributor" — 차별 없는 듯 | **미작동** (5/5 bot trigger 실패) |
| OWNER `/gemini review` 댓글 trigger? | "any contributor" | **작동** (10/10 OWNER trigger 성공, +1~3분 응답) |
| 공식 troubleshooting에 bot identity gap 언급? | **없음** | — |

---

## 4. 핵심 evidence Gap

공식 docs는 bot/User 차별을 **명시 X**. 그러나 실증 데이터는 차별 존재를 **결정적으로** 입증.

이는 다음 중 하나로 해석 가능:
- (가) Gemini App이 webhook 수신 시 `sender.type == "Bot"` 댓글을 내부 필터링 (recursive 방지 표준 패턴)
- (나) GitHub 자체적으로 GitHub App installation token이 작성한 webhook 이벤트를 다른 App에 dispatch 안 함 (GITHUB_TOKEN 룰의 일반 확장)
- (다) 둘 다 / 또는 별도 정책

공식 statement가 없으므로 **공식 docs로는 trigger gap의 원인을 확정 불가**. 단 trigger gap 자체는 실증으로 100% 확정.

---

## 5. 본 task에 미치는 영향

- **OWNER PAT 도입 정당화**: 공식 docs가 bot trigger를 명시적으로 거부하지 않음에도 실증상 미작동 → OWNER user identity로만 trigger 가능 → 자동화 도구는 OWNER user PAT 사용 외에 우회로 없음.
- **단 본 task는 사전조사 only** — 실제 PAT 생성/사용 금지(회장 §명시 1, 2).
- 회장 정책 결정 필요: "bot trigger gap을 OWNER PAT로 우회"를 doctrine 예외로 승인할지 여부.

---

## 6. 박제 출처 list

1. <https://developers.google.com/gemini-code-assist/docs/use-code-assist-github>
2. <https://developers.google.com/gemini-code-assist/docs/review-github-code>
3. <https://docs.github.com/en/actions/using-workflows/triggering-a-workflow>
4. <https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens>
5. <https://github.com/marketplace/gemini-code-assist>
