# task-2705+3 — P1-A item 9 fix only: caller chair_authorization_id 실제 값 전달 결선

**task_id**: task-2705+3 (★ v2 포맷 정합 sub-id · task-2706 numeric 자동 발의 0)
**parent_task**: task-2705+1 (PROVISIONAL_ACCEPT_PENDING_MAAT_VERIFICATION → 본 task 결과 후 closeout 결재)
**verifier_task**: task-2705+2 (PARTIAL_ACCEPT_NEEDS_FOLLOWUP — item 9 PASS_PARTIAL 박제 · 본 task 가 fix 대상)
**chair_authorization_id**: CHAIR-AUTH-TASK-2705PLUS3-V36-CHAIR-AUTH-CALLER-FIX-260529
**level**: 4 (item 9 fix only · narrow scope)
**actor_role**: lead_integrator (Hermes) + implementer (Vulcan 또는 동등) + verifier (Maat 또는 Codex/Maat read-only · 분리 강제)
**executor**: dev1 헤르메스 (★ 회장 verbatim 야간 위임 [2/3] '유지 가능' 인가 정합)
**model**: claude-opus-4-7[1m]

## allowed_resources (본 task의 capability)

```yaml
allowed_resources:
  paths:
    - "dispatch/__init__.py"
    - "scripts/harness/v36/dispatch_marker_writer.py"
    - "tests/harness/test_v36_task_md_sha_contract.py"
    - "tests/harness/test_v36_task_md_sha_normalize.py"
    - "tests/harness/test_v36_dispatch_marker_contract.py"
    - "tests/harness/fixtures/**"
    - "memory/reports/task-2705+3.md"
    - "memory/events/task-2705+3.*"
  forbidden_paths:
    - "scripts/finish-task.sh"
    - "scripts/session-watchdog.sh"
    - "settings.json"
    - ".github/**"
    - "memory/events/task-2705.*"
    - "memory/events/task-2705+1.*"
    - "memory/events/task-2705+2.*"
    - "memory/tasks/task-2705.md"
    - "memory/tasks/task-2705+1.md"
    - "memory/tasks/task-2705+2.md"
    - "memory/reports/task-2705.md"
    - "memory/reports/task-2705+1.md"
    - "memory/reports/task-2705+2.md"
    - "memory/specs/v36_finish_task_profile_contract_design_draft_260529.md"
    - "memory/specs/v36_actor_attribution_contract_design_draft_260529.md"
    - "memory/capabilities/**"
  commands:
    - "pytest"
    - "sha256sum"
    - "git log"
    - "git diff"
    - "git add"
    - "git commit"
    - "ls"
    - "cat"
    - "grep"
    - "python3 -m py_compile"
  merge_policy: "manual"
  ttl_hours: 8
```

## expected_files (이 task 가 수정·신규생성하는 파일 명시)

```yaml
expected_files:
  edits_existing:
    - path: "dispatch/__init__.py"
      sites:
        - "L3016 (or surrounding) — caller 1: chair_authorization_id 실제 값 전달"
        - "L4057 (or surrounding) — caller 2: chair_authorization_id 실제 값 전달"
      change_type: "MINIMAL_LINE_REPLACE (None → actual value source)"
    - path: "scripts/harness/v36/dispatch_marker_writer.py"
      sites:
        - "필요 시 signature/validation 보강만 — 모듈 상수 추가 0"
      change_type: "OPTIONAL_MINIMAL"
  new_tests:
    - path: "tests/harness/test_v36_dispatch_marker_contract.py 또는 별도 file"
      content: "caller chair_authorization_id 실제 값 전달 fixture/regression + task-2705+1 / task-2705+2 replay fixture"
    - path: "tests/harness/fixtures/v36_task_md_sha_fixture_N_replay_*.json"
      content: "task-2705+1 / task-2705+2 replay fixture (★ 회장 verbatim 허용 8 #7)"
  new_marker_artifacts:
    - "memory/events/task-2705+3.dispatched-*.json (auto by dispatch.py)"
    - "memory/events/task-2705+3.task-md-sha-decision.json (dispatch_marker_writer auto)"
    - "memory/reports/task-2705+3.md (executor self report)"
  forbidden_files_strict:
    - "scripts/finish-task.sh"
    - "scripts/session-watchdog.sh"
    - "settings.json"
    - "memory/events/task-2705.*"
    - "memory/events/task-2705+1.*"
    - "memory/events/task-2705+2.*"
```

## allowed_existing_file_edits (line-level scope guard)

- `dispatch/__init__.py`:
  - **L3016 area**: `chair_authorization_id=None` → actual value (task md 또는 dispatch args 에서 추출). minimal line replace 만.
  - **L4057 area**: 동일 패턴 fix.
  - **L254-262** `_safe_compute_task_md_sha` helper: 변경 0 (★ task-2705+1 결과 유지).
  - **그 외 dispatch.py 영역**: 변경 0 (★ 회장 verbatim 'item 9 fix only' 정합).
- `scripts/harness/v36/dispatch_marker_writer.py`:
  - signature `chair_authorization_id: Optional[str] = None` 보존 (★ task-2705+1 정합).
  - validation 보강 시 minimal 만 (★ 모듈 상수 추가 0).

---

## 1. 본 task 의 본질

회장 verbatim 야간 위임 정합:
- task-2705+2 Maat 결과 = PARTIAL_ACCEPT_NEEDS_FOLLOWUP · 11 PASS + 1 PASS_PARTIAL
- item 9 = 유일 실질 blocker · `dispatch/__init__.py L3016 + L4057 chair_authorization_id=None`
- 본 task = **item 9 fix only**. 그 외 P1-A 영역 변경 0.

회장 verbatim P1-A closeout 기준 9 (정합 목표):
- caller chair_authorization_id=None 결함 해소 (★ 본 task 핵심)
- task별 chair_authorization_id 가 marker 에 정확히 기록 (★ 본 task 검증)
- task_md_sha_before null 결함 재발 없음 (★ 기존 유지)
- WHITESPACE_NORMALIZATION ALLOW 유지 (★ 기존 유지)
- semantic DENY fixture 유지 (★ 기존 유지)
- unverifiable HOLD fixture 유지 (★ 기존 유지)
- existing v36 회귀 유지 (★ 31/31 PASS 보존 + 278/278 PASS 보존)
- forbidden action 0 (★ 본 task allowed_resources 강제)
- decision.json/report integrity mismatch 분리 (★ task-2705+2 STEP 0 결과 정합)

---

## 2. 허용 8 작업 항목 (★ 회장 verbatim 야간 위임 [2/3])

1. **dispatch caller 에서 chair_authorization_id 실제 값 전달** (★ 본 task 핵심)
2. dispatch_marker_writer 가 caller 인자를 받도록 정리 (★ task-2705+1 에서 이미 완료 · 본 task 는 검증만)
3. task별 chair_authorization_id 가 marker 에 정확히 박히도록 수정
4. task_md_sha_before 측정 흐름 보존 (★ `_safe_compute_task_md_sha` helper 유지)
5. 기존 task md sha contract 로직 유지 (★ ALLOW / DENY / HOLD 분기 변경 0)
6. fixture/mock regression 추가
7. task-2705+1 및 task-2705+2 replay fixture 추가
8. 기존 task-2703/2704/2705+1 회귀 유지 (★ 278/278 PASS 또는 31/31 + delta)

## 3. 금지 10 (★ 회장 verbatim 야간 위임 [2/3])

1. finish-task.sh 수정 금지
2. session-watchdog.sh 수정 금지
3. settings.json 수정 금지
4. merge executor activation 금지
5. Goal-to-Done / PHASE_AUTO / Core-Work 이원화 금지
6. actor attribution 구현 금지
7. finish-task profile 구현 금지
8. PR 생성 / branch push / merge 금지
9. GitHub write 금지
10. task-2706 numeric 자동 발의 금지

**위반 시 즉시 task 중단 + report 박제 + ANU callback 발사.**

---

## 4. caller fix 설계 가이드 (read-only 참고)

### 4.1 현재 상태 (task-2705+2 Maat 박제 verbatim)

`dispatch/__init__.py`:
- L3016: `chair_authorization_id=None` (caller 1)
- L4057: `chair_authorization_id=None` (caller 2)

### 4.2 chair_authorization_id 값 source 옵션 (★ 구현자 판단 영역)

옵션 A: task md 본문에서 추출 (★ 본 task md L4 `**chair_authorization_id**:` 패턴 활용)
- 장점: task 별 명시적 박제 정합 · 검증 용이
- 단점: 파싱 로직 추가 필요 · 미명시 task 폴백 정의 필요

옵션 B: dispatch.py args 에 신규 옵션 추가
- 장점: 명시적 전달
- 단점: dispatch.py args expansion · 회장 verbatim 'narrow scope' 정합 미흡 가능

옵션 C: env var 또는 system context 자동 주입
- 장점: caller 수정 최소
- 단점: 출처 추적 어려움 · audit 부실

★ 구현자 (Vulcan 또는 Hermes 직접) 판단 영역. 단, 회장 verbatim 'narrow scope' + 'minimal change' 정합 우선.

### 4.3 marker 박제 검증 강제

본 task fix 적용 후 신규 dispatch 시:
- dispatch marker (`*.dispatched-*.json`) 의 `chair_authorization_id` 필드가 task md verbatim 값과 일치
- task md sha decision marker 의 `chair_authorization_id` 필드도 일치
- null 또는 task-2704 verbatim 의 다른 task 의 값으로 박힘 0

---

## 5. 신규 fixture / regression 강제 (★ 허용 #6·#7)

### 5.1 fixture-N replay (task-2705+1 / task-2705+2)

- `v36_task_md_sha_fixture_N_replay_task_2705_plus_1.json`: task-2705+1 pre/post sha 박제 + ALLOW WHITESPACE_NORMALIZATION 분기 재현
- `v36_task_md_sha_fixture_N_replay_task_2705_plus_2.json`: task-2705+2 pre/post sha 박제 + decision verbatim 박제

### 5.2 chair_authorization_id 전달 regression test

- `test_dispatch_caller_chair_auth_id_propagation`: caller 가 None 이 아닌 task md 값과 일치하는지 assert
- `test_dispatch_marker_chair_auth_id_recorded`: dispatch marker JSON 의 chair_authorization_id 가 spec 값과 byte-equal
- 기존 test 미파괴 (★ 31/31 / 278/278 PASS 보존)

---

## 6. 검증 단계 (★ executor 자체 수행)

본 task executor 가 self-verification 시 수행 권고:
1. pytest 전체 회귀 (★ 278/278 PASS 또는 그 이상 + delta)
2. pytest tests/harness/test_v36_* (★ 31/31 PASS + 신규 regression 정상)
3. sha256 cross-verify (★ task-2705 lineage 산출물 unchanged 박제)
4. dispatch.py 자체 import + py_compile 검증 (★ syntax OK)
5. dispatch_marker_writer.py py_compile

**self-verification = L1+L2 evidence_level 만**. 횡단 검증 (Maat / Codex) 은 STEP 3 별도 진행.

---

## 7. Hermes 직접 구현 caveat 강제 (★ 회장 verbatim)

회장 verbatim 야간 위임 [2/3] executor_assignment 정합:
- Hermes lead_integrator 유지 가능
- 구현자 = Vulcan 또는 동등 구현 agent
- 검증자 = Maat 또는 Codex/Maat read-only 분리
- ★ **Hermes 직접 구현이 불가피하면 반드시 caveat 로 기록 · "직접 코딩 0" 단정 금지**

### 7.1 Vulcan/Maat 분리 위임 시도 강제

본 task 진입 시:
1. worktree 격리 시도 (★ task-2705+1 fallback workspace 비-git 사고 회피)
2. Vulcan 서브에이전트 분리 위임 시도 (★ 구현 단계)
3. Maat 서브에이전트 분리 위임 시도 (★ 검증 단계)
4. 분리 실패 시 → Hermes 직접 구현 폴백 + caveat 강제 박제

### 7.2 보고서 표현 강제 (★ P1-C 설계 §4 정합)

**FORBIDDEN 표현**:
- "Hermes 직접 코딩 0 완료" (★ 단정 금지)
- "fallback 0건 확인" (★ L4 evidence 미확인 시)
- "수정 0 검증 완료" (★ negative absolute)

**ALLOWED 표현**:
- "Hermes 직접 패치 가능성 명시 박제"
- "fallback 0건 self-report + L4 schedule_history 교차검증"
- "직접 코딩 self-attestation = 자가신고이며 L5 trace 부재 caveat"

---

## 8. 산출물 표준 (★ 필수 출력)

### 8.1 self report
- 경로: `memory/reports/task-2705+3.md`
- 내용:
  - SCQA 프레임워크
  - 9 closeout 기준 정합 self-evaluation
  - caller fix 적용 site + diff verbatim 인용
  - 회귀 결과 (pytest)
  - sha256 cross-verify (★ task-2705 lineage unchanged)
  - Hermes/Vulcan/Maat 역할 보고 (★ P1-C 설계 §5.1·5.2·5.3 정합)
  - caveat 박제 (★ Hermes 직접 패치 가능성 명시)
  - linked markers

### 8.2 dispatch marker (자동 생성)
- 경로: `memory/events/task-2705+3.dispatched-*.json` (dispatch.py 자동)
- 경로: `memory/events/task-2705+3.task-md-sha-decision.json` (dispatch_marker_writer 자동)
- ★ chair_authorization_id 필드 = `CHAIR-AUTH-TASK-2705PLUS3-V36-CHAIR-AUTH-CALLER-FIX-260529` byte-equal 검증

### 8.3 ANU normal callback envelope
- collector_key: `c119085addb0f8b7` (ANU)
- envelope size: ≤ 3,900 bytes hard limit (★ UTF-8 byte 측정)
- envelope-only: 상세는 report.md / decision marker 위임
- one-line summary: caller fix 적용 site count + 회귀 결과 + 9 closeout 기준 self-evaluation 결과

---

## 9. dispatch 방식 9 정합 (★ 회장 verbatim 야간 위임 [2/3])

ANU 측 dispatch 진행 정합:
1. ✅ task md 작성 (★ 본 파일)
2. ✅ expected_files / allowed_existing_file_edits / forbidden_files 명확화 (★ §allowed_resources + expected_files)
3. ✅ dispatch.py 1차 단일 발사 (★ 본 task md 직후 진행)
4. ✅ fallback 자동 등록 금지 (★ ANU 측 fallback cron 사전 등록 0)
5. → 5신호 교차 검증 후 SPAWN_UNKNOWN/NOT_STARTED 이면 direct cron fallback 1회
6. → fallback marker 12 필드 강제
7. → duplicate spawn read-only 출처 확인 → 같은 task duplicate 명확 시 늦은 PID SIGTERM 만 허용
8. ★ SIGKILL 금지
9. → 불명확 시 HOLD_FOR_CHAIR

---

## 10. linked references

- `memory/tasks/task-2705+2.md` (Maat 검증 task)
- `memory/events/task-2705+2.decision.json` (★ authoritative verdict source · item 9 PASS_PARTIAL 박제)
- `memory/reports/task-2705+2.md` (Maat report · §5 row 9 verbatim)
- `memory/events/anu_step_0_readonly_reconcile_result_260529.json` (★ STEP 0 결과)
- `memory/events/anu_step_1_blocker_caveat_reclassification_260529.json` (★ STEP 1 결과)
- `memory/events/anu_night_delegation_chair_directive_1of3_260529.json`
- `memory/events/anu_night_delegation_chair_directive_2of3_260529.json` (★ STEP 2 spec source)
- `memory/events/anu_night_delegation_chair_directive_3of3_260529.json`
- `memory/specs/v36_actor_attribution_contract_design_draft_260529.md` (★ §5 보고 템플릿)
- `memory/specs/v36_task_md_sha_contract_design_draft_260528.md` (★ P1-A 설계 정합)
- `dispatch/__init__.py` (★ 변경 target L3016 + L4057)
- `scripts/harness/v36/dispatch_marker_writer.py` (★ 검증 target)
- `tests/harness/test_v36_task_md_sha_contract.py` (★ regression target)

---

**P1-A item 9 fix only · narrow scope · 회장 verbatim 정합 강제. Hermes 직접 구현 caveat 박제 + Vulcan/Maat 분리 위임 시도 우선.**

**callback prompt UTF-8 byte limit ≤ 3,900 bytes hard · envelope-only · 상세는 report.md / decision marker 위임.**