# task-2713 — CALLBACK_ENVELOPE_LOCATION_METADATA

> 상태: **후속 task 후보 — dispatch 회장 승인 대기 (미승인 위임 금지)**
> 발단: task-2712+1 WORKTREE_CONTEXT_MISMATCH (finish_task_cwd ≠ target_worktree 미탐지)
> 설계 단일소스: `memory/specs/system_callback_envelope_location_metadata_enhancement_spec_260530.md`
> 분리 근거: 회장 verbatim 2026-05-30 — "11필드 코드 결선은 task-2712 에 지금 섞지 말고 별도 task 로 분리"

## 목표
callback envelope(및 failure marker envelope)에 location metadata 11필드를 추가하여, ANU collector 가 worktree mismatch 를 **envelope 만으로 즉시 감지**하게 한다.

## 추가 11 필드
`execution_cwd` · `target_worktree` · `artifact_root` · `git_branch` · `git_head` · `report_path` · `decision_path` · `verification_commands` · `finish_task_cwd` · `goal_assertion_cwd` · `worktree_role`

## 핵심 요구
1. envelope schema 에 11필드 additive 추가 (기존 필드/마커 호환 유지, legacy envelope = `location_metadata_present=false` 플래그).
2. collector 가 `finish_task_cwd != target_worktree` 또는 `git_head != target worktree HEAD` 탐지 시 `WORKTREE_CONTEXT_MISMATCH` 분류 → goal/scope gate 실패를 task 성패에서 분리(infra caveat).
3. `artifact_root` 가 ephemeral temp(`/tmp/...`)면 `EVIDENCE_NOT_DURABLE` 경고.
4. 회장 doctrine: callback prompt UTF-8 ≤3900 bytes — 11필드 추가로 byte 초과 시 envelope-only(경로만) 유지.

## 금지
- task-2712 산출물 코드 수정 금지 (task-2712 는 PR-ready 동결).
- PR/push/merge 는 별도 회장 승인.

## 검증 시나리오 (성공 기준)
- mismatch envelope 입력 시 collector 가 `WORKTREE_CONTEXT_MISMATCH` 반환.
- match envelope 입력 시 정상 진행.
- legacy(11필드 없음) envelope 도 fail 없이 `location_metadata_present=false` 처리.
- `artifact_root=/tmp/...` 입력 시 `EVIDENCE_NOT_DURABLE` 경고.
