# task-2719-check — PR #165 bot-invoked one-shot check (runner+adapter 사용, read-only)

## 회장 인가 (2026-05-31)
ANU 직접 manual-gated verification 금지. 이미 만든 자동화 부품을 **봇이 실행**해서 PR #165 를 체크한다.
ANU 세션-bound polling 금지 / 회장 복붙 루프 금지. 봇은 terminal result JSON 만 작성, ANU 는 그것만 수집·보고.
★ 이건 active watcher 가 아니다 — **bot-invoked one-shot check** 단계. wired/active 승격 금지.

## 사용 부품 (이미 main/PR 존재 — 신규 구현 금지)
- `anu_v2/ci_gemini_watcher_runner.run_watch_cycle` (main `4e080d58`)
- `anu_v2/ci_gemini_watcher_gh_adapter` (PR #165 `af05d588` — `build_readonly_gh_runner` / `run_one_shot_dry_run`)

## check 범위 (회장 verbatim 1~9)
1. PR #165 head `af05d588` 확인
2. diff 2파일 only 확인 (anu_v2/ci_gemini_watcher_gh_adapter.py, tests/regression/test_ci_gemini_watcher_gh_adapter_2719.py)
3. gh_adapter 로 op 5종 read-only 조회: actual_head / diff_paths / ci_rollup / reviews / findings
4. `run_watch_cycle` 실행 (adapter 주입, dry_run=True)
5. owner_gemini_trigger = decision-only
6. auto_gemini_triage = finding 분류에 사용
7. GitHub write 0
8. 실제 `/gemini review` comment 0 (단 trigger 필요 판정만 가능)
9. terminal enum 1개 출력:
   MERGE_READY_CANDIDATE / LOOP_BOUNDARY / BLOCKED_BY_CAPABILITY / GEMINI_EXTERNAL_TRIGGER_REQUIRED /
   CI_FAILED_NON_REMEDIABLE / HOLD_STALE_HEAD / HOLD_SCOPE_UNCLEAN

## 실행 방법 (read-only)
- 봇은 origin/main(또는 PR #165 worktree)에서 두 모듈 import.
  단 adapter 는 PR #165 head 에만 있으므로 PR #165 worktree(`af05d588`)에서 실행하거나 해당 파일 경로로 import.
- `run_one_shot_dry_run(pr_number=165, expected_head="af05d588...", expected_files=[2개], gh_cli=<실 gh GET>)` 1회 실행.
- gh_cli 는 실 `gh` GET 호출 허용(read-only). adapter 의 GhWriteForbiddenError guard 가 write 차단.
- 결과 WatchResult.to_json() → terminal enum + decision JSON.

## 산출물 (result JSON only)
`memory/events/task-2719-check-result.json` 작성:
- pr_number, head_sha, diff_files, terminal_enum, decision_json(있으면), github_writes(=0 이어야), gemini_trigger_needed(bool), reason
- ANU 는 이 JSON 만 수집해 보고.

## 금지 (회장 verbatim)
ANU 직접 polling 금지(봇 작업) · session-bound sleep loop 금지 · 실 GitHub write 금지 ·
실제 `/gemini review` comment 금지 · code fix 금지 · push/merge/rebase/admin 금지 ·
OS-level crontab/systemd/inotify 금지 · hook/key봉인/completion_contract 금지 ·
PR #162/#163/#164 접촉 금지 · adapter/runner 코드 수정 금지(실행만).

## finalize
- 코드 수정 0 (실행/조회만). result JSON + `memory/events/task-2719-check.done` + 짧은 `memory/reports/task-2719-check.md`.
- ANU normal callback = ANU key `c119085addb0f8b7`, envelope-only.
- ★ dispatch 템플릿 G3(PR/머지) 본 task 적용 안 됨 — 코드 변경 0 이므로 PR 생성 자체가 없다. finish-task.sh --action pr 금지.

## allowed_resources

```yaml
allowed_resources:
  paths:
    - "memory/events/task-2719-check-result.json"
    - "memory/reports/task-2719-check.md"
  forbidden_paths:
    - "anu_v2/**"
    - "tests/**"
    - "dispatch/**"
    - ".github/**"
  commands:
    - "gh"
    - "python3"
    - "pytest"
    - "python3 -m pytest"
  merge_policy: "none"
  ttl_hours: 24
```