# task-2760 — P0B event strategy 구현 PR (live inbox + processed ledger, canary 실행 금지)

## ★ 회장 결정 (2026-06-17)
B 설계 packet(`P0B_EVENT_STRATEGY_REDESIGN_PACKET`) 수용 → **구현 PR 1개 준비** 승인. **canary 실행 승인 아님.** 상태 `P0B_EVENT_STRATEGY_IMPLEMENTATION_PR_APPROVED_ACTIVE_FALSE`. ACTIVE=false. 단일소스 설계: `memory/plans/p0b_event_strategy_redesign_packet_260617.md`.

## 목표
PathExistsGlob ↔ retained legacy `memory/events/task-*.result.json` 반복 발화 차단. "파일 존재" 감시 → "신규 이벤트(live inbox)" 감시 전환.

## base / branch / PR
- base = clean origin/main `f641cd58`(task-2758 merged). fresh branch `task/task-2760`. isolated worktree. branch push only(ANU가 fresh PR 통제).

## ★ expected_files (먼저 고정 — 밖 수정 필요 시 STOP_REPORT)
- `dispatch/anu_pickup_driver.py` — scan 경로를 **live inbox 한정**(`memory/events/p0b_live_inbox/`)으로, legacy `memory/events/task-*.result.json` **구조적 제외**, 처리 성공 시 **processed ledger**(append-only jsonl) 기록, 원본 `memory/events/p0b_processed/` 이동, idempotency `(task_id, source_result_sha256)`. **기존 로직/공개 함수 시그니처 보존**(P0B core 회귀 민감).
- `tests/regression/test_p0b_event_strategy_2760.py` — 신규 fixture regression.
- (필요 시) `dispatch/` 내 작은 헬퍼 1개까지 허용하되 **새 모듈 최소화**. systemd `.path`/`.service` 수정은 **이번 PR 제외**(systemd enable/install 금지 — 별도).

## 구현 경계
- 좁은 단일 PR · code change는 event strategy 최소 파일만 · fixture 기반 regression만.
- **real callback/wake/systemd 실행 0 · production activation 0 · ACTIVE=true 0 · canary 실행 0.**
- busy-skip = **지연(delayed/pending)**, 누락 아님. self-collector 방지 = 기존 owner_proof gate 재사용(신규 구현 금지). dedupe = ledger 조회로 `(task_id,sha256)` 재처리 0. atomic = dev write tmp→fsync→rename(runner는 `*.partial` scan 제외).

## 필수 검증 테스트 (각각)
1. retained legacy result가 **scan 안 됨**
2. live inbox 신규 result **1개만 감지**
3. processed ledger **중복 방지**
4. 동일 `(task_id, sha256)` **재처리 0**
5. busy 상태에서 skip 아닌 **delayed/pending** 잔존
6. **self-collector 차단**(ANU key만 fire, executor self-key 차단)
7. **ACTIVE=false 유지**
8. 기존 task-2758 non-matching thin gate **상태 불변**(import/동작)
9. matching_axis **DESIGN_REVIEW_REQUIRED 유지**(matching 재도입 0)

## 금지 (위반 시 STOP_REPORT)
canary 실행 · systemd enable/install · 실제 callback 발사 · wake launch · external probe/key custody/ANU-Control daemon 구현 · matching/allowlist detector 재구현 · _coerce 구현 · type-safety hygiene 착수 · Gemini watcher/replacement runner 확장 · auto merge/remediation · direct push to main · ACTIVE=true · expected_files 밖 수정 · PR 생성/merge.

## 중단 조건 (STOP_REPORT)
expected_files 밖 수정 필요 · 새 파일/모듈 필요(헬퍼 1개 초과) · 기존 driver 공개 시그니처 변경 필요 · matching 재도입 필요 · HIGH/Critical7 · systemd/callback/wake/production/merge 축 터치.

## ★ background cron 산물 분리 (회장 보정)
작업트리에 `memory/specs/anu-system-spec*.md` 등 변경이 보이면 이는 **update-system-spec 6h cron 백그라운드 산물**(ANU task-2760 작업 아님). diff/result.json에 ANU 산출물(expected_files)만 포함하고 cron 산물 혼입 0 확인.

## 산출물 / callback
`task/task-2760` branch commit + push(PR 0). 종료 전 ANU normal callback 필수 — ANU key `c119085addb0f8b7`(self-key 금지·UTF-8 wc -c ≤3900 bytes·envelope만: task_id/branch/head/result_path/sha256/collector_role=ANU/expected_files·테스트수 1줄).

## allowed_resources
```yaml
allowed_resources:
  paths:
    - "dispatch/anu_pickup_driver.py"
    - "tests/regression/test_p0b_event_strategy_2760.py"
  forbidden_paths: ["**/*.service","**/*.path",".github/**","memory/state/automation_capability_matrix.json","dispatch/v2_13_gate.py"]
  commands: ["pytest","python3 -m py_compile","git"]
  merge_policy: "none"
  ttl_hours: 12
```
