# DISPATCH_PACKAGE_ENTRY_WIRING_PHASE2_AUDIT — read-only audit (회장 직접 결정)

**ts**: 2026-05-20 22:35 KST · **mode**: audit-only · proposal-only · read-only · **자동 진행 0**.

## 핵심 발견

**task-2621 wiring 으로 production-wide 결선 완료**. Phase 1 audit 의 핵심 발견(S05 dispatch/__init__.py:dispatch NOT_WIRED) 을 task-2621 ADDITIVE WIRING 이 직접 해소.

**dispatch/__init__.py 실측 wiring 라인**:
- L198-220: module-top imports (`_t2621_assert_independent_anu`, `_t2621_enforce_callback_owner`, `_t2621_build_anu_owned_callback_request`)
- L2910-2960: Site #1 composite PRE-cron contract gate
- L2962: composite cokacdir --cron 호출 (gate 직후)
- L2984-3044: Site #1 composite POST-cron fallback safety-net 자동 등록
- L3993-4041: Site #2 single-team PRE-cron contract gate
- L4043: single-team cokacdir --cron 호출 (gate 직후)
- L4065-4124: Site #2 single-team POST-cron fallback safety-net 자동 등록

## S01~S09 Phase 2 분류표 (post-task-2621)

| Site | File | Phase 2 분류 | Daily Dispatch Path | Production Gate |
|------|------|-------------|---------------------|-----------------|
| S01 | dispatch.py shim | SURFACE_REEXPORT_ONLY | ✓ (위임만) | ❌ |
| S02 | normal_fallback_callback_helper | WIRED_HELPER_BUILDER_NOW_PRODUCTION_INVOKED | ✓ | ✓ (helper 내부) |
| S03 | cron_dispatch_guard | INDEPENDENT_AUTHORITY_NOT_INVOKED_BY_PRODUCTION | ❌ | ❌ |
| **S04** | **callback_owner_enforcer** | **WIRED_AS_PRODUCTION_GATE_OWN_AUTHORITY** | ✓ | ✓ |
| **S05** | **dispatch/__init__.py:dispatch** | **WIRED_PRODUCTION_PATH** ★★ | ✓ | ✓ |
| S06 | dispatch/core.py facade | SURFACE_REEXPORT_ONLY | ❌ | ❌ |
| S07 | dispatch/prompt.py facade | SURFACE_REEXPORT_ONLY | ❌ | ❌ |
| S08 | scripts/run_batch_hold_adjudicator.py | WIRED_SCRIPT | ❌ | ❌ |
| S09 | tests/regression/* | WIRED_TEST | ❌ | ❌ |

## Daily Dispatch Path 비교

**CLI path**: `python3 dispatch.py --team ...` → shim → `dispatch.core.main` → `dispatch.__init__.main(L4226)` → **`dispatch.dispatch(L3282)`** → ★ **task-2621 wiring gate(L2910/L3993)** → `cokacdir --cron(L2962/L4043)`.

**Import path**: `import dispatch; dispatch.dispatch(...)` → 동일 dispatch.__init__.dispatch → ★ task-2621 wiring gate → cokacdir --cron.

**둘 다 task-2621 wiring 통과** — production-wide 결선 완료 판정 정당화. 단 dispatch.py shim re-export 자체를 production-wide 결선으로 표현 금지(ledger 48 정합).

## NOT_WIRED 잔여 production path

**ZERO** — 메인 리포 dispatch/__init__.py 외 production cokacdir --cron 호출 사이트 없음:
- `scripts/*` 대부분 명시적 "ZERO subprocess/cokacdir" 또는 "Layer A NO-CRON"
- `utils/error_alert.py:109` — `cokacdir <message>` 알림(--cron 아님 · dispatch path 아님)
- `utils/normal_completion_callback_collector_entrypoint.py` — binding template 만 · 실 subprocess 0
- `utils/cron_targeting_audit.py:402` — cmdline 매칭 audit 유틸 · 실 subprocess 0
- `.worktrees/*` — 격리 dev workspace · active production 아님

## 두 시스템 관계 (+49 era · task-2614 era)

| 시스템 | 권위 | 호출 시점 (task-2621 wiring) |
|--------|------|------------------------------|
| +49 era (S04 enforce_callback_owner) | DEFAULT_ANU_KEYS | **PRE-cron 직접 호출** (L2917 composite · L3998 single-team) |
| task-2614 era (dispatch_callback_contract.assert_collector_key_is_independent_anu) | ANU key c119085addb0f8b7 정본 | **Indirect via build_anu_owned_callback_request** (POST-cron fallback 등록 시 helper 내부 chain) |

→ 두 시스템 효과적 chain 완료. drift 발생 시 task-2621 wiring 게이트에서 발견 가능.

## 위험도

- **현 production 위험**: LOW — task-2621 wiring 으로 ANU-key gate 작동 · 양 시스템 병렬 chain
- **callback miss 잔여 위험**: MEDIUM — byte-limit runtime guard 미구현 · CALLBACK_PROMPT_BYTE_AUDIT 단계만 완료 · fallback safety-net mitigation 작동
- **two-system drift 위험**: LOW — task-2621 wiring 이 게이트에서 양 시스템 호출
- **Critical7**: **false** — 활성 침해 0 · defense-in-depth audit

## 수정 필요 여부

**production dispatch path: 필요 없음** — task-2621 wiring 으로 충분.

**LOW priority defense-in-depth 후보** (회장 결정 시에만):
- **P1**: S03 `cron_dispatch_guard.guard_dispatch_with_owner` 를 task-2621 wiring 의 PRE-cron 체인에 추가 — 중복 가능성 있음
- **P2**: `callback_owner_enforcer` 내부에 `dispatch_callback_contract.assert_collector_key_is_independent_anu` chain — 두 시스템 통합 (단 +49 era 모듈 변경 위험)

**MEDIUM priority 운영품질 후보**:
- **P3**: cancel-on-success 자동화 — collector adjudication durable-success 시점에 fallback safety-net 자동 제거

**Deferred by chair**:
- **P5**: byte-limit runtime guard — CALLBACK_PROMPT_BYTE_AUDIT 10표본 분석 후 별도 결정

## 다음 작업 후보 (회장 결정 사항)

(a) doctrine/guide 자연 적용 + byte 통계 누적 (현재 진행 · 자동 진행 0)
(b) P3 cancel-on-success 자동화 — MEDIUM priority
(c) P1/P2 defense-in-depth chain — LOW priority
(d) 현 상태 유지 + Phase 2 결과 박제만 — 운영 안정 우선

**ANU 권장**: (a) + (d) — 운영 안정성 우선 · P1/P2/P3 는 회장 결정 사항 · P5 는 회장 명시 결정 후.

## write/merge/credential 0 증거

- git HEAD before/after = `20456b5f83fc039f2fd6f50f4b94095c29b41bfb` **EQUAL**
- branch `task/task-2553p1-f1-clean-replacement` 불변
- commits 0 · PR/merge/branch/main/credential write 0 · ANU Layer-A no-git
- new cron 0 · new dispatch 0 · ledger append 0 · cross-watcher 간섭 0

## 산출물 5건

- `memory/events/dispatch_package_entry_wiring_phase2.decision.json` — kickoff
- `memory/events/dispatch_package_entry_wiring_phase2.result.json` — 7항목 보고
- `memory/events/dispatch_entry_wiring_matrix_v2.json` — S01~S09 post-task-2621 분류
- `memory/events/dispatch_entry_remediation_proposal_v2.json` — P1~P5 candidate (자동 진행 0)
- `memory/reports/dispatch_package_entry_wiring_phase2.md` — 이 파일

## scope 준수 (회장 verbatim)

read-only + proposal-only ✓ · 코드 수정 0 ✓ · dispatch path 변경 0 ✓ · 새 dispatch 0 ✓ · 새 cron 0 ✓ · remediation 0 ✓ · PR/merge/branch/main/credential 0 ✓ · Track C 미접촉 ✓ · zombie cron 미접촉 ✓ · CLOSED_ALL_SETTLED 산출물 byte-0 ✓ · 결선 누락 발견 시 자동 수정 0 (proposal-only) ✓

## 다음 결정 = 회장
