---
task_id: task-2515
type: plan
scope: task
created: 2026-05-09
updated: 2026-05-09
status: completed
---

# 계획서: task-2515

**task**: task-2515
**목표**: 5 모듈 runtime pipeline의 사람 개입 0 자동화를 9 PR replay × 12 검증(108 assertions) 으로 박제하는 e2e replay harness 구축
**승인**: 회장 2026-05-09 — "본 task = end-to-end 검증 코드 + replay harness. 신규 기능 추가 X."
**근거**: memory/tasks/task-2515.md (회장 §1~12, §replay, §완료조건 #1~9)

---

## 목표

`tests/e2e/test_auto_merge_e2e_replay_2515.py` + `tests/e2e/fixtures/auto_merge_replay_2515.json` 정확히 2 파일을 생성한다.

- 9 시나리오 × 12 검증 = **108 assertions PASS**
- 5 모듈 본체 + dispatch.py + automation_contracts 모두 **수정 0**
- live pilot 후보 1건 보고서에 명시
- pytest tests/regression/ 회귀 보존 (기존 56 tests + 신규 9 e2e)

## 범위

### 포함
- `tests/e2e/test_auto_merge_e2e_replay_2515.py` (NEW)
  - 9 pytest test functions (1 함수 = 1 시나리오)
  - 시나리오별 12 verification helper 호출
- `tests/e2e/fixtures/auto_merge_replay_2515.json` (NEW)
  - 9 시나리오 메타데이터 (PR/task/expected_files/effective_files/merge_state/ci_state/gemini_state/dependency/parallel_policy/queue_position/triage_threads/following_queue/expected_decision/...)
- `tests/e2e/__init__.py` + `tests/e2e/fixtures/__init__.py` 빈 패키지 마커
- 옵션 CLI entrypoint: `python3 -m tests.e2e.test_auto_merge_e2e_replay_2515 --pr <N>`

### 제외 (다음 페이즈 이후)
- live pilot 직접 실행 (회장 승인 + 본 task 완료 후)
- Critical 7종 enum redesign / contract schema 변경
- 5 모듈 본체 수정 / dispatch.py 수정
- 자동 cherry-pick 구현
- policy md 보강

## 위임 계획

- Phase 1 (fixture JSON 9 시나리오 설계): **루(Lugh)** — 백엔드. Replay metadata schema + 9 시나리오 합성.
- Phase 2 (e2e harness 본체 + 12 verification helper): **루(Lugh)** — 백엔드. evaluate_pr / verify_head_lock_then_merge / triage_pr / process_event 통합 호출.
- Phase 3 (회귀 + 신규 108 assertions PASS 검증, L1 스모크): **모리건(Morrigan)** — 테스터. pytest 실행 + 보고.
- Phase 4 (코드 리뷰 + Codex G1 gate + sanitize): **다그다(팀장)** — 통합 + Gemini PR 리뷰 + finish-task.

## 검증 기준

- `PYTHONPATH=. pytest tests/e2e/test_auto_merge_e2e_replay_2515.py -q` → **9 tests pass, ≥108 assertions executed**
- `PYTHONPATH=. pytest tests/regression/ -q` → 기존 회귀 0 fail
- effective diff = 정확히 2 신규 파일 (Merge Topology Gate 자기참조)
- forbidden path 0 / 5 모듈 본체 수정 0
- live pilot 후보 1건 보고서 명시
- Critical 7종 외 회장 보고 0건 (assertion으로 강제)
