---
task_id: task-2696
type: context
scope: task
created: 2026-05-27
updated: 2026-05-27
status: in-progress
---

# 맥락 노트: task-2696

**task**: task-2696

---

## 결정 근거

### 결정 1 — fresh re-extract (conflict resolve 아님)
- PR #152(head bd3f7ee, base 319170b9 stale)는 PR #155(a2a20f94) 머지 후 CONFLICTING. helper/schema/finish-task.sh 텍스트 충돌.
- session propagation 기능은 PR #155 enforcement(EnforceResult/assert_normal_callback_actually_registered)와 **기능 직교** (다른 함수 추가).
- 대안 기각: merge main into bd3f7ee = PR #155 enforce 덮어쓸 위험 + 수동 병합 복잡 (회장 금지).

### 결정 2 — schema additive merge (PR #155 보존, 3 SID 추가)
- a2a20f94 schema = PR #155 모델 (`chair_facing_sid` 단수, schedule_type enum, owner_key pattern, additionalProperties:true, required 8필드).
- PR #155 validator(`utils/normal_callback_registration_validator.py` L379)가 `chair_facing_sid`를 읽음 → **rename 금지**.
- PR #155 test `test_schema_blocks_deferred.py` hard constraint: base payload(schema/task_id/schedule_id/schedule_type/owner_key/chat_id/chair_facing_sid/emitted_at) validate PASS, chair_facing_sid required, schedule_type enum reject(deferred/pending/to_be_registered_by_finish_task_sh), owner_key pattern.
- 결정: 3 SID(`chair_facing_session_id`/`collector_session_id`/`delivery_session_id`) + `callback_resume_required` + `collector_role`(enum ANU)를 **additive optional** 추가. required/additionalProperties/owner_key/schedule_type 무변경.
- 명명 정합(요구 #3): `chair_facing_session_id` = `chair_facing_sid`의 long-form alias (동일 값) — schema description 에 명시. PR #155 validator 호환을 위해 단수형 보존.

### 결정 3 — PR #152 test_envelope_schema_fields.py reconcile (allowed_resources)
- PR #152 test는 stale 독립 schema(additionalProperties:false, collector_role, owner_key const, chair_facing_session_id required) 기준 작성.
- **수학적 불가피성**: chair_facing_session_id를 required에 넣으면 PR #155 base payload(chair_facing_sid만 보유)가 깨짐. 두 schema 모델을 동시에 만족하는 required 집합은 존재 불가.
- PR #155 test = 머지된 정본(훼손 금지), PR #152 test = 재추출 대상(allowed) → PR #152 test의 충돌 assertion 3개(required/const/additionalProperties)만 PR #155 현실로 reconcile. session 가치(3 SID 존재 + UUID pattern + 명명 정합) assertion은 보존.

### 결정 4 — callback_resume_required 필요성 입증 (요구 #4)
- prompt.py `_inline_chair_facing_sid`가 prompt에 `callback_resume_required: true` inline.
- test_prompt_inline.py가 해당 라인 존재 검증.
- → schema에 boolean optional 추가 정당.

## 3 Step Why 자문 (G1 2nd Why 포함)

- **1st Why (왜 이 설계가 필요한가) → A**: PR #152가 stale base라 CONFLICTING. session 기능은 PR #155 enforce와 직교하므로 fresh base 위 additive 재적용 시 충돌 0 + enforce 보존.
- **2nd Why (대안은 무엇이며 왜 이 접근이 최선인가) → B**: 대안1 conflict resolve=enforce 덮어쓸 위험(금지). 대안2 schema 교체=PR #155 validator/test 깨짐(훼손). 대안3(채택) additive+reconcile=enforce 0 훼손 + session 가치 전달 + 충돌 0. PR #152 test는 allowed + stale 기준이라 reconcile 정당.
- **3rd Why (왜 B가 다른 대안보다 나은가) → C**: required 집합 충돌의 수학적 불가피성 — 두 schema 모델 동시 만족 불가. PR #155 test=정본(훼손금지), PR #152 test=재추출(allowed)이므로 PR #152 reconcile이 유일 정합.
- **일관성**: A(직교) → B(additive 보존) → C(수학적 불가피성) 논리 일관 ✓

## 참조 자료
- conflict packet: `memory/reports/pr-152-conflict-decomposition-packet-260527.md`
- PR #152 diff base: `319170b9`(stale) / origin/main: `a2a20f94`(PR #155)
- PR #155 schema test: `tests/regression/normal_callback_registration_enforcement/test_schema_blocks_deferred.py`

## 주의사항 (위험/제약)
- ★ ANCHOR-2: PR #155 enforce 코드(validator/marker/helper EnforceResult+assert/finish-task.sh L1014-1026) 0 훼손. git diff로 evidence.
- ★ ANCHOR-4: dispatch/__init__.py 결선 불필요 입증 — 테스트는 helper module 직접 import(_load_real), prompt.py/finish-task.sh도 module 직접 경유(`python3 -m dispatch.normal_fallback_callback_helper`). package re-export 없이 동작 → 전역 변경 0, HOLD_FOR_CHAIR 불요.
- ★ ANCHOR-5: --session argv는 helper/wrapper 범위만. cokacdir CLI / dispatch.py 전역 변경 0.
- ★ helper build_anu_owned_callback_request/launch_callback는 PR #155 미변경 확인됨 → PR #152 param 추가 깨끗이 적용.
