# task-2553+32 — EXECUTOR COMPLETION CALLBACK MANDATORY RULE 복원 (회장 GO, 코드/파일 자동화)

> **Lv**: Lv.4 — dispatch lifecycle contract 복원 (실행코드/schema/fixture/regression/result·report). **Executor**: dev3-team 다그다 (key 0b94683120a691cf) 1회 한정. **TTL**: 2.5h.
> **상태**: 회장 GO — +29/+30/+31 에서 ANU 가 "cron 신규 등록/제거 금지"를 NO-CRON 으로 과잉해석하여 executor 의 mandatory normal completion callback 까지 제거한 **ANU spec 해석 오류** 정정. 본 task = 그 rule 을 **코드/파일 자동화로 복원** — 앞으로 ANU 가 어떤 executor task 를 만들어도 normal completion callback 을 누락하지 못하게 강제. doctrine 박제 아님(이미 박제됨) — 실행 가능한 코드·schema·fixture·regression 필수.
> **dogfooding**: 본 +32 자체가 **정정된 표준 callback (a)** 적용 — executor 완료 직후 ANU 에 normal completion callback cron 발사(mandatory) + ANU fallback 등록. NO-CRON 변형 **불가**(본 task 가 복원하는 규칙의 첫 적용 사례).
> **선행**: doctrine 정정 박제(`task-2553.normal-callback-mandatory-doctrine-correction_260518.json`·`feedback_executor_completion_callback_mandatory_260518.md`). +31 checkpoint(recovery 보조 계층, read-only). **후속**: Track C = 본 복원 후.

---

## 1. 목표 (회장 verbatim)

executor completion callback mandatory rule 을 코드/파일 자동화로 복원하라. 목적 = doctrine 박제가 아니라, 앞으로 ANU 가 어떤 executor task 를 만들더라도 normal completion callback 을 누락하지 못하게 하는 코드/파일 자동화.

## 2. 배경·정정 원칙 (회장 verbatim)

+29/+30/+31 에서 ANU 가 "cron 신규 등록/제거 금지"를 NO-CRON 으로 해석하면서 executor 가 완료 직후 ANU 에 보내야 하는 normal completion callback 까지 제거 = ANU spec 해석 오류. **executor completion callback 은 mandatory lifecycle signal.** NO-CRON 은 registry/checkpoint 가 임의 cron 을 add/remove 하지 않는다는 뜻이지 executor completion callback 금지가 아니다.

## 3. 정상 구조 (회장 verbatim 1~7)

1. ANU 가 봇에 위임 2. 봇이 작업 수행 3. 봇은 완료 직후 ANU 에게 normal completion callback cron 을 발사 4. ANU collector 가 결과 회수·검증·Codex audit·ANU-Codex adjudication·loop/next action 판단 5. fallback/dead-man callback 은 normal callback 누락·봇 stuck 대비 safety 6. normal collector 성공 시 fallback cancel-on-success 적용 7. runtime registry/checkpoint 는 callback 누락·cron 혼선·NO-CRON artifact 를 read-only 로 복원하는 보조 계층

## 4. 필수 구현 (회장 verbatim 1~9)

1. dispatch 절차/spec 템플릿에 executor normal completion callback mandatory rule 추가
2. NO-CRON 정의 정정: registry/checkpoint 임의 cron add/remove 금지 / executor completion callback 은 예외가 아니라 필수 lifecycle signal
3. dispatch prompt generator 또는 task spec builder 에서 normal callback 누락 시 FAIL 또는 HOLD 처리
4. executor closeout checklist 에 normal callback registration evidence 필수화
5. callback 4-tuple 에 normal_collector_cron_id 필드 필수화
6. normal callback 미등록 task 는 RESULT_READY_NO_NORMAL_CALLBACK recovery state 로 분류하되, 정상 완료 형식으로는 인정하지 않음
7. runtime checkpoint 는 recovery layer 임을 schema/comment/test 에 명시
8. fallback 은 safety path 로 유지
9. cancel-on-success 는 normal success 후 적용 유지

## 5. 필수 파일 후보 (회장 verbatim — 실제 파일명 ANU/executor 가 repo 구조 맞게 확정, 문서/메모리만 완료 금지, 실행코드·schema·fixture·regression 필수)

- `dispatch/spec_template_validator.py`
- `dispatch/executor_completion_contract.py`
- `anu_v3/executor_callback_contract.py`
- `anu_v3/runtime_reconcile_checkpoint.py` 보강 필요 시 **additive patch**(원본 mutation 금지 — additive only)
- `schemas/executor_completion_contract.schema.json`
- `schemas/callback_4tuple.schema.json`
- `tests/regression/test_executor_completion_callback_mandatory_2553plus32.py`
- `memory/fixtures/task-2553plus31.no-normal-callback-regression.json`
- `memory/events/task-2553+32.result.json`
- `memory/reports/task-2553+32.md`

## 6. 필수 regression (회장 verbatim 1~15)

1. executor task spec 에 normal completion callback 이 있으면 PASS
2. executor task spec 에서 normal callback 이 빠지면 FAIL
3. NO-CRON registry task 도 executor completion callback mandatory 를 제거하지 않음
4. registry/checkpoint 자체는 cron add/remove 0 유지
5. executor completion callback 은 cron 신규 등록 금지 위반으로 분류하지 않음
6. fallback callback 은 safety path 로 유지
7. normal success 후 fallback cancel-on-success path 유지
8. result.json + .done 은 있지만 normal callback 이 없으면 RESULT_READY_NO_NORMAL_CALLBACK
9. RESULT_READY_NO_NORMAL_CALLBACK 은 recovery state 이지 정상 lifecycle complete 로 오분류하지 않음
10. +31 fixture 가 과거 오류 사례로 재현됨
11. dispatch prompt 생성 시 completion callback clause 가 자동 포함됨
12. callback 4-tuple 에 normal_collector_cron_id 누락 시 contract invalid
13. checkpoint 가 callback primary path 를 대체한다고 주장하면 FAIL
14. checkpoint 가 fallback safety path 를 폐기하면 FAIL
15. write/merge/closeout/cron-remove 권한이 생기면 FAIL

## 7. 허용 (회장 verbatim)

- dispatch/spec template validator 구현
- executor completion contract 구현
- schema/fixture/regression 추가
- runtime checkpoint 주석/schema/test 보강
- result/report/evidence marker 생성
- Codex audit + ANU-Codex adjudication

## 8. 금지 (회장 verbatim — D-SPEC-EXACTNESS 원문 박제)

- dev 재가동
- PR/branch/main write
- merge
- credential/OWNER PAT 조작
- cron 제거
- 기존 task 산출물 수정
- +31 산출물 원본 수정
- callback/fallback 구조 폐기
- registry를 primary completion mechanism으로 격상
- 문서만 작성하고 완료 처리

추가 scope: executor 자기작업중 신규 dispatch·delegation·executor handoff 0. live `/home/jay/workspace`(repo root) git tracked HEAD/branch/ref(`task/task-2553p1-f1-clean-replacement` `20456b5f`) 전후 assertEqual(task-2553+32.*·신규 dispatch/anu_v3/schemas/tests/fixtures=git-untracked, 위반 아님). frozen anchor `utils/anu_delegation_completion_callback.py`(83b3e307…)·durable v1 `memory/events/task-2553.parallel-batch-state.json`·anu_v3 frozen·+22~+31 원본 산출물 무변(checkpoint 보강은 additive patch only).

## 9. HOLD_FOR_CHAIR (회장 verbatim)

- dispatch/spec template 위치가 불명확해 코드화 불가
- normal callback mandatory rule 을 자동 검증할 수 없음
- 기존 dispatcher 와 충돌
- Codex HIGH/CRITICAL unresolved
- callback/fallback 구조 변경 필요
- cron/credential/write 권한 확대 필요
- regression 실패

## 10. 완료 후 보고 (회장 verbatim 1~10 — consolidated, 단독·중간 0)

1. 구현 파일 목록 2. mandatory normal callback rule 적용 위치 3. NO-CRON 정의 정정 결과 4. +31 오류 재현 fixture 결과 5. regression 결과 6. Codex audit 결과 7. ANU-Codex adjudication 결과 8. runtime checkpoint 와 callback primary path 의 관계 9. HOLD_FOR_CHAIR 여부 10. 다음 dispatch 부터 자동 적용 가능 여부

## 11. callback (a) — 정정된 표준 (본 task dogfooding, MANDATORY)

본 task 는 복원 대상 규칙의 첫 적용 사례 → **정정된 표준 callback (a) 적용**: executor 는 작업 **완료 직후 ANU 에 normal completion callback cron 발사(MANDATORY)** + ANU 는 dispatch 시 fallback/dead-man callback 등록. callback 4-tuple = {task_id=task-2553+32, dispatch_cron_id, **normal_collector_cron_id(필수)**, fallback_callback_cron_id}. normal collector 성공 시 fallback cancel-on-success. **NO-CRON 변형 불가**(본 task 가 복원하는 규칙과 모순되므로). 회수 = normal completion callback → ANU collector(primary) / 누락 시에만 fallback·checkpoint(recovery).

## 12. ANU-Codex loop (자동, 중간보고 0)

batch plan(§4§5§6) → Codex lint → ANU refine(9-R) → re-lint → **ANU(orchestrator) 1회 위임**(loop 기계; executor 자기작업중 신규 dispatch·delegation·handoff 0, 필요 시 HOLD_FOR_CHAIR) → validator/contract/schema/4-tuple/checkpoint-additive-patch + fixture(+31 오류 재현) + regression(§6 1~15) → post-result audit → adjudication → result.json + report → **executor 완료 직후 normal completion callback cron 발사(MANDATORY §11)**. §9 트리거만 회장 보고, 그외 LOW/MED·fixture·regression·false-positive 자동 수렴. 9-R 이 본문에 우선.

## 13. 9-R — Codex lint 반영 (agent a76b5838319dc3f98: C1/H0/M1/L0 → 자동 수렴)

### 9-R.1 (CRITICAL §3.6/§4.9/§6.7/§8/§11/§6.15) cancel-on-success ↔ "cron 제거" 금지 정밀 분리
회장 금지 "cron 제거" = **+32 executor/validator/checkpoint 가 구현 작업 중 임의로 cron 을 제거하는 행위 0**(ad-hoc cron-remove 금지). 이것과 **시스템 sanctioned fallback cancel-on-success** 는 별개 — 후자는 +9a/+23/+25 operational seam + live-verifier 5조건 AND 를 거치는 **설계된 lifecycle 상태전이**(정상 success 후 자기 task fallback 1건 sanctioned 취소)이며, 본 +32 task 가 직접 실행하는 것이 아니라 **그 경로를 무손상 유지(§3.6/§4.9/§6.7)** 하고 regression(§6.6/§6.7) 으로 보존 검증만 한다. 즉 +32 executor 는 어떤 cron 도 제거 0(회장 금지 준수), cancel-on-success 는 폐기 0 으로 호환 유지(assert only, 실행 0). 모순 해소: 금지='+32 행위로서의 cron 제거 0' / 유지='시스템 cancel-on-success path 무손상·regression 보존'.

### 9-R.2 (MED §4.4/§6.15) "closeout" 의미 분리
§6.15 "write/merge/closeout/cron-remove 권한이 생기면 FAIL" 의 "closeout" = **repository/task-state finalization authority(=closeout 확정 권한) 격상만 금지**. executor 자기 task 의 normal completion callback·result.json·report·.done 산출(자기 작업 lifecycle 마감)·§4.4 closeout checklist 는 **필수 유지**(권한 격상 아님 — lifecycle signal). 둘 구분 명시: "closeout 확정 authority 격상=FAIL" vs "executor 자기 task normal completion/result/report 산출=REQUIRED".

→ 9-R.1~9-R.2 로 C1+M1 해소. HIGH0/LOW0. 9-R 이 본문에 우선. Codex re-lint GO_READY 시 ANU 1회 위임.

## 14. task-2553 계열

+29 registry / +30 generic coordinator / +31 reconcile checkpoint(recovery 보조) / **+32(본건)=executor completion callback mandatory rule 코드/파일 복원(정정된 표준 callback (a) dogfooding)** / Track C(profile engine 일반화)=+32 후.
