# task-2553+49 — MICRO-HARDENING: executor self-collector 구조적 차단 + write-back binding conflict 코드화

**Executor**: dev6-team 페룬 (key `1e41a2324a3ccdd0`) 1회 한정 — tainted 체인(dev3/dev1) 배제·독립
**상태**: ✅ 완료 (PASS) · 문서화 아님 — 실행코드·schema·fixture·regression·decision/result JSON 산출
**HOLD_FOR_CHAIR**: 없음

---

## 핵심 설계 결정 (9-R / byte-0 우선)

§9 allowlist 는 `anu_v3/callback_4tuple_registry.py` · `dispatch/executor_completion_contract.py` 를 *additive patch* 대상으로 명시한다. 그러나 기존 **+44/+48 regression 이 두 파일의 byte-0 SHA 를 FROZEN_SHA256 autouse invariant 로 핀**한다(registry=`774d5506…`, ECC=`364caa11…`, CET=`352ad0f5…`). additive 패치 시 regression 13/14/15 회귀 + §5 "기존 +47/+48 산출물 수정 금지" 사실상 위반.

→ 회장 §9 "byte-0 우선·불가피 시 additive" + §11 9-R(본문 우선) + +42/+43/+45 carve-out 선례에 따라 **additive 는 unavoidable 이 아니다**. §2 전 통제를 **신규 standalone 모듈**(`dispatch/callback_owner_enforcer.py`)+schema+owner 4-tuple record 로 100% 코드 강제 달성. registry/ECC byte-0 유지. (allowlist = max-write set, must-write set 아님 — allowlisted 파일 미작성은 허용.) **이는 §6 HOLD 가 아니라 in-mandate 코드 강제 달성.**

cokacdir cron-direct(외부 tooling, 파일수정 불가)는 9-R.1 대로 **ANU 통제 계층**(prompt gen · 4-tuple 등록시점 · 등록후 owner 교차검증)에서 fail-closed 강제. §9 allowlist 에 `dispatch.py`·`dispatch/core.py` additive(실 entrypoint·frozen anchor 미포함·byte-0 우선·시그니처 보존) 반영.

## 산출물 (§9 allowlist 외 write 0)

신규: `dispatch/callback_owner_enforcer.py` · `dispatch/normal_fallback_callback_helper.py` · `schemas/callback_owner_enforcement.schema.json` · `tests/regression/test_callback_owner_enforcement_2553plus49.py` · `memory/fixtures/task-2553plus47.self-chain-violation.json` · `memory/fixtures/task-2553plus47-48.independent-anu.json` · `memory/events/task-2553+49.{decision,result}.json` · 본 리포트

Additive(시그니처 보존·기존 동작 byte-identical): `dispatch/cron_dispatch_guard.py`(`guard_dispatch_with_owner` 신규) · `dispatch/prompt.py`(re-export) · `dispatch/core.py`(9-R.1 re-export) · `dispatch.py`(9-R.1 shim re-export)

byte-0 유지(미작성): `anu_v3/callback_4tuple_registry.py` · `dispatch/executor_completion_contract.py`

## §7 보고 9항목

1. **self-collector 차단 위치**: `enforce_callback_owner` (owner=executor self / executor==collector / role≠ANU / prompt-mismatch / 4-tuple invalid / cron-direct bypass → FAIL+분류 기록). self-adjud=`assert_not_self_adjudication`, self-dispatch=`assert_not_self_dispatch`. cron-direct=`build_anu_owned_callback_request`(owner≠ANU→argv=None, 등록 불가) + entrypoint/ANU통제계층 게이트(`guard_dispatch_with_owner`, dispatch.py/core.py/prompt.py).
2. **owner/key validation**: owner=collector_owner_key or collector_key. `is_anu_key ∧ owner≠executor_key ∧ role=='ANU'` 만족 시만 PASS. 등록 후 `verify_post_registration_owner` 가 schedule_history/registry key·chat·role 교차검증. 4-tuple 에 executor_key/collector_key/collector_owner_key/collector_role=ANU/normal_collector_cron_id/fallback_cron_id 기록(신규 record+schema, +44 frozen 무변).
3. **idempotency conflict 처리**: `audit_writeback_binding_conflict` — +44 read-only ledger 위 +47 idempotency key(dispatch_id+chat_id+ncc) 동일 COMPLETED 의 role/fallback 대조. 동일key+다른binding → **WRITEBACK_BINDING_CONFLICT**(FAIL·conflicting_fields 기록·silent skip 금지). 동일key+동일binding → IDEMPOTENT_SKIP. 무매치 → NO_CONFLICT.
4. **+47 self-chain fixture**: `task-2553plus47.self-chain-violation.json` (dev3 자가체인 재현) → 전 limb FAIL (test_09 PASS).
5. **independent ANU fixture**: `task-2553plus47-48.independent-anu.json` (owner=독립 ANU key) → PASS·owner_is_independent_anu=True (test_10/11/12 PASS).
6. **regression 결과**: 신규 26 PASS (1~15 전수 + 8분류 + schema + Layer A + byte-0 + git). 무회귀 +32/+44/+46/+45/+48/+47 = 112 PASS. **합계 138 PASS (5.48s).**
7. **Codex audit / adjudication**: executor 세션은 self-Codex/self-adjudication **미수행**(본 task 가 코드로 금지·dispatch 모범준수). Codex audit·adjudication·회수·독립검증은 완료 직후 발사되는 **독립 ANU collector 세션**(ANU key `c119085addb0f8b7`)이 수행.
8. **다음 dispatch부터 구조적 불가 여부**: **예.** owner-pin fail-closed + cron-direct argv 생성 차단 + self-adjud/self-dispatch FAIL + post-reg owner 교차검증 → executor self-collector 구조적으로 불가능.
9. **HOLD_FOR_CHAIR**: 없음. 전 통제 코드 강제 달성. byte-0 carve-out 은 in-mandate 9-R 해소.

## 불변식 (전후 EQUAL)

- git HEAD `20456b5f83fc039f2fd6f50f4b94095c29b41bfb` · branch `task/task-2553p1-f1-clean-replacement`
- frozen anchor byte-0: anu_delegation_completion_callback `83b3e307…` · policy_profile_engine `2363e291…` · parallel_batch_coordinator `10529421…`
- +47/+48 산출물 무변(callback_event_trigger.py `352ad0f5…`, result/decision/report mtime pre-session)
- Layer A: enforcer·helper subprocess/os.system/Popen/cokacdir exec 0 (AST 검증)

## callback (a)

완료 직후 normal completion callback cron 을 **독립 ANU key `c119085addb0f8b7` (chat 6937032012)** 로만 발사. executor self key `1e41a2324a3ccdd0` 미발사 — 본 task 가 코드로 강제하므로 dispatch 자체가 모범 준수. ANU fallback 도 ANU key. 회수·검증·Codex·adjudication·후속 dispatch 는 그 독립 ANU 세션.
