# task-2621 — DISPATCH_INIT_PRODUCTION_PATH_CALLBACK_CONTRACT_WIRING (회장 직접 결정 · chair-authorized 신규 task)

> **Lv**: Lv.3. **Executor**: dev6-team 페룬 (key 1e41a2324a3ccdd0) 1회 한정 — task-2614/2620 원 executor(dispatch_callback_contract + dispatch/__init__.py callback 영역 직접 인지). **TTL**: 3h. **분류**: 회장 명시 chair-authorized 신규 task — DISPATCH_PACKAGE_ENTRY_WIRING_AUDIT 결과 production path NOT_WIRED 확인(non-Critical HIGH·Critical7 false) 후속 좁은 ADDITIVE wiring. 문서-only 금지. **callback: 반드시 독립 ANU key c119085addb0f8b7(executor self key 1e41a2324a3ccdd0 절대 금지·+49 코드 정본).**
> **HOLD/진입 근거**: `memory/events/dispatch-package-entry-wiring-audit.{result,wiring_matrix,remediation_proposal}.json` (회장 ACCEPT) · task-2620 scope-clarification (ledger line 48) byte-0 보존.

## 1. 목표 (회장 verbatim)

일상 dispatch production path 에서 **normal callback mandatory + ANU-key fallback safety-net contract** 가 실제로 강제되도록 **좁은 ADDITIVE wiring** 을 구현한다. dispatch.py shim re-export 를 production-wide 결선으로 오인하지 않고, 실제 `dispatch/__init__.py:dispatch` production path 에 결선한다.

## 2. 범위 (회장 verbatim)

- `dispatch/__init__.py:dispatch` 경로(L3282 production fn) — 본체 4336 lines 의 **두 cokacdir --cron 호출 사이트(L2881·L3850) 직전·직후** 좁은 ADDITIVE wiring
- `build_prompt` 또는 `cokacdir --cron` 호출 직전 경로에 normal callback registration contract 검증 게이트 추가
- `cokacdir --cron` 호출 직후/직전 ANU-key fallback safety-net registration contract(자동 등록 — 현재 live ANU 수동 등록 의존 → 자동화)
- cancel-on-success / recovery-only 원칙 보존
- executor self-key collector/adjudication/dispatch 금지(`assert_collector_key_is_independent_anu` 또는 `enforce_callback_owner` 호출로 fail-closed)

## 3. 필수 원칙 (회장 verbatim 9건)

1. 기존 task-2620 scope-clarification(ledger line 48) byte-0 유지
2. dispatch.py shim re-export 를 production-wide 결선으로 오인 금지(보고/문서에 명확 표기)
3. 실제 `dispatch/__init__.py` production path 에 결선(facade 만 추가 금지)
4. fallback 은 recovery-only · progress trigger 아님(고정시각/dead-man 진행 트리거 금지)
5. no-dual-purpose watcher 유지(recovery safety-net 과 final-report trigger 분리 · feedback_no_dual_purpose_watcher 정합)
6. callback/fallback 둘 다 없으면 `DISPATCH_CONTRACT_VIOLATION` 분류
7. result exists + callback missing + fallback missing → recovery watcher required(idempotent 1회 spawn)
8. self-chain authoritative 금지(executor self-key 가 collector/adjudication/dispatch 권위 불가)
9. independent ANU collector(key c119085addb0f8b7) 만 authoritative

## 4. 제한 (회장 verbatim — scope 제외 명시)

- **ADDITIVE only** · 기존 dispatch.dispatch() 시그니처/PASS-path 동작 byte-0
- blast radius 최소화: 우선 1~2 사이트만 결선·필요 시 단계적 enable·기존 동작 break 위험 0
- S03~S07 5 사이트 = **이번 scope 제외**(별도 backlog)
- §2.C telemetry T01~T05 = **이번 scope 제외**(별도 backlog)
- Track C task-2619 = **이번 scope 제외**(별도 회장 승인 동결 유지)
- zombie cron 정리 = **이번 scope 제외**(cross-watcher 간섭 0)
- baseline 13 regression fails / `tests/regression/test_orchestration_runtime_2514.py` import error = **이번 scope 제외**(별도 backlog)
- PR/merge/branch/main/credential write 금지
- existing CLOSED_ALL_SETTLED 산출물 변조 금지 (task-2610~2615·task-2620·`callback_4tuple_index.jsonl` 48행 byte-0 prefix)
- `anu_v3/dispatch_callback_contract.py` API 시그니처 byte-0 · `dispatch/normal_fallback_callback_helper.py` Site #2 enforcement chain byte-0 · +49 era 모듈(`callback_owner_enforcer.py`/`cron_dispatch_guard.py`/`executor_completion_contract.py`) byte-0

## 5. 필수 검증 (회장 verbatim 10건 — 전수 PASS 필요)

1. **production path 호출 증거**: `dispatch/__init__.py` production path 에서 contract 함수(예: `enforce_callback_owner` 또는 `build_anu_owned_callback_request` 또는 `assert_collector_key_is_independent_anu`)가 실제 호출되는 runtime trace 캡처 — `memory/events/task-2621.production-path-wiring-trace.json` 에 caller·callee·call-site line·증거 stdout 기록
2. **normal callback mandatory fixture**: 정상 ANU-key 가 부재한 dispatch 시도 시 fail-closed
3. **ANU-key fallback safety-net mandatory fixture**: dispatch 시 fallback safety-net 자동 등록 검증(–cron-list 또는 schedule_history 증거)
4. **self-key fail-closed fixture**: executor self-key(예 1e41a2324a3ccdd0)가 callback owner 로 지정될 때 fail-closed
5. **DISPATCH_CONTRACT_VIOLATION fixture**: callback·fallback 둘 다 없으면 분류
6. **recovery watcher required fixture**: result exists + callback missing + fallback missing → recovery watcher required(idempotent 1회 spawn 실증·중복 0·진행트리거화 0)
7. **existing task-2620 regression 무회귀**: tests/regression/test_dispatch_callback_contract.py 전수 PASS (기존 12 case + 추가 case 모두) + 기존 BATCH_LEVEL_HOLD regression 77 PASS 무회귀
8. **Codex HIGH/CRITICAL 0**: 재audit 결과 0/0 또는 non-Critical forward-candidate 명확 분류
9. **git HEAD/branch EQUAL · commit 0**: ANU Layer-A no-git 유지
10. **PR/merge/credential/write 0**

## 6. expected_files allowlist (자기 deliverable 한정)

`dispatch/__init__.py`(ADDITIVE wiring at L~2881·L~3850 직전·기존 dispatch.dispatch flow byte-0 preserve·시그니처 변경 0) · `tests/regression/test_dispatch_init_callback_wiring.py`(신규 production-path enforcement regression) · `memory/events/task-2621.production-path-wiring-trace.json` · `memory/events/task-2621.before-after-wiring-matrix.json` · `memory/events/task-2621.{decision,result}.json` · `memory/reports/task-2621.md`. 이 외 write 0. **anu_v3/dispatch_callback_contract.py·dispatch/normal_fallback_callback_helper.py·dispatch/callback_owner_enforcer.py·dispatch/cron_dispatch_guard.py·dispatch/executor_completion_contract.py·dispatch.py shim·dispatch/core.py·dispatch/prompt.py·anu_v3/critical7_classifier.py·schemas/* byte-0 · CLOSED_ALL_SETTLED 산출물(task-2610~2615 + task-2620 + scripts/run_batch_hold_adjudicator.py + sample.*.json + ledger 48행 byte-0 prefix) byte-0 · Track C task-2619 미접촉 · S03~S07 미접촉 · zombie cron 미접촉**. git HEAD `20456b5f83fc039f2fd6f50f4b94095c29b41bfb` · branch `task/task-2553p1-f1-clean-replacement` 전후 EQUAL · commits 0.

## 7. 금지

ADDITIVE 범위 외 임의 리팩터링 · dispatch.dispatch 시그니처 변경(caller 영향) · dispatch_callback_contract API 변경 · normal_fallback_callback_helper Site #2 enforcement chain 변경 · callback_owner_enforcer / cron_dispatch_guard / executor_completion_contract 수정 · CLOSED_ALL_SETTLED 산출물 변조 · task-2620 scope-clarification(ledger 48) 정정 · Track C task-2619 수정 · zombie cron 정리 · S03~S07 결선 · §2.C T01~T05 telemetry 구현 · baseline 13 fails 수정 · executor self-callback/self-collector/self-adjudication/self-dispatch · PR/branch/main write·merge·credential · premature write-back(독립 ANU Codex HIGH/CRITICAL 0 확정 전) · 문서-only/disposition-only 완료 · fallback 을 final-report trigger 로 묶기(no-dual-purpose 위반).

## 8. HOLD_FOR_CHAIR

신규 Critical7 또는 shared invariant 파손 시에만 CHAIR_HOLD. 그 외 non-Critical 잔여는 AUTO_REMEDIATION 자동 수렴 계속(분류 후 멈춤 금지). 동일 함수/file-boundary HIGH 가 3회 이상 반복되면 AUTO_REMEDIATION_LOOP_BOUNDARY_REVIEW 요약 보고. dispatch.dispatch() PASS-path 무회귀가 깨지면 즉시 CHAIR_HOLD(blast radius mitigation 검증).

## 9. callback (a) — 독립 ANU key 강제 + recovery-only fallback safety-net (no-dual-purpose 정합)

완료 직후 normal completion callback **ANU key c119085addb0f8b7 로만 발사** → 독립 ANU collector 회수·검증·Codex 재audit·adjudication. dispatch 시점에 **recovery-only fallback safety-net(ANU key·cancel-on-success·진행 트리거 아님·final-report 책임 0·feedback_no_dual_purpose_watcher 정합)** 동시 등록(mandatory contract — 본 task 가 결선하는 동일 계약을 본 task dispatch 자체에도 적용). collector adjudication durable-success 확정 즉시 fallback cancel-on-success 제거(노이즈 0). Codex 재audit HIGH/CRITICAL 0 일 때만 +53 durable-success write-back. **잔여 non-Critical HIGH 시 회장 보고 없이 task-2621+1 자동 수렴**(단 동일 함수/file-boundary HIGH 3회 반복 시 loop-boundary review). executor self key 1e41a2324a3ccdd0 절대 금지. authoritative 판정원=독립 ANU only.

## 10. 완료 보고 (회장 verbatim 8건)

1. **production path 결선 위치**(file·line·caller·callee·call-site)
2. **before/after wiring matrix**(task-2621.before-after-wiring-matrix.json — Site #1/#2/dispatch.dispatch/build_prompt/cokacdir 호출 사이트 분류 before vs after)
3. **regression 결과**(전수 PASS·기존 무회귀·신규 fixture PASS)
4. **Codex audit 결과**(HIGH/CRITICAL 0 또는 non-Critical forward-candidate 명확 분류)
5. **self-key 차단 결과**(fail-closed 실증)
6. **fallback recovery-only 증거**(no-dual-purpose 정합·final-report 책임 0·cancel-on-success 작동)
7. **no-dual-purpose watcher 증거**(recovery safety-net 과 final-report trigger 분리 유지)
8. **남은 out-of-scope backlog**(S03~S07·§2.C T01~T05·Track C·baseline 13 fails·test_orchestration_runtime_2514·zombie cron·두 시스템 통합 — 전부 자동 진행 0)

## 11. 9-R (확정 — 본 절 본문 우선 · PRE-DISPATCH SPEC)

본 task md 는 dispatch 전 작업 명세(spec). 산출물 부재·baseline 일치 정상. lint 기준=spec 정합성(구현 검증 아님·feedback_spec_lint_not_implementation_check). 회장 직접 결정 chair-authorized — 새 범위 0(DISPATCH_PACKAGE_ENTRY_WIRING_AUDIT remediation_proposal 정합) · ADDITIVE only · blast radius 최소화(2 사이트 한정) · production path 실 결선 증거(runtime trace) 강제 · before/after wiring matrix 요구 · 5건 fixture 전수 PASS(normal mandatory·fallback mandatory·self-key fail-closed·DISPATCH_CONTRACT_VIOLATION·recovery watcher required idempotent) · 기존 BATCH_LEVEL_HOLD/task-2620 regression 무회귀 · 모든 contract 모듈(dispatch_callback_contract·normal_fallback_callback_helper·callback_owner_enforcer 계열)·CLOSED_ALL_SETTLED 산출물 byte-0 · Track C 동결·S03~S07·§2.C·baseline fails·zombie cron 미접촉 · PR/merge/credential 0 · self-* 금지 · ANU-key callback 정합 · recovery-only fallback(no-dual-purpose) · loop-boundary review 정합. **ANU-Codex re-lint GO_READY 확정 후 dispatch**. ANU key 로 dev6 페룬 1회 위임.
