# task-2771+1 — PR #247 Gemini HIGH/medium micro-fix (content qc, guard-native)

## 목표 (goal-enabling correction — PR #247 merge 가능화)
PR #247 의 Gemini HIGH 2 + medium 2 (전부 `teams/content/qc/qc_verify.py`)를 **micro-fix**로 닫아
PR #247 을 merge 가능 상태로 만든다. ★ 새 설계/리팩터 0 — ANU 가 만든 **fix 완료본(bundle)** 적용만.
PR #247 **업데이트**(기존 branch 위 commit) 우선. ANU 직접 push/수기 lock 금지.

## micro-fix bundle (source of truth, fix 완료본)
```text
/home/jay/workspace/memory/handoffs/content_qc_high_fix_pr247/
  qc_verify.py             : fix 완료본 (sha256 b786d91c…, 10792B)
  test_content_qc_2769.py  : fix 완료본 (sha256 17b8e83e…, 8145B)
  manifest.json            : 2파일 sha256/size
  fix_summary.md           : HIGH1/HIGH2/medium3/medium4 대응 명세
base_pr_commit: 772508c5 (PR #247 head)
```

## fix 내용 (이미 ANU 가 완성·검증 — 그대로 반영, 재구현 0)
```text
HIGH-1: run_gate task_id 검증(_SAFE_TASK_ID, "/"·".." FAIL) — 경로 구성 전 거부.
HIGH-2: 산출물 paths 절대경로 거부 + resolve 후 workspace 내부 검증(traversal 거부).
medium-3: _parse_allowed_paths 폴백 제거(블록 없으면 빈 리스트) + trailing comment 무시.
medium-4: 산출물 디렉토리/읽기 예외 → structured FAIL(traceback crash 방지).
검증완료(ANU): content QC 17 passed, 전체 174 passed. dispatch/finish-task/gate_shadow/shared QC 무수정.
```

## 절차 (guard-native, 수기 금지)
```text
1. PR #247(branch task/task-2771-dev1) 업데이트 우선 — 기존 worktree/branch 재사용해 commit 추가.
   재사용 불가 시에만 새 PR 판단(기본은 PR #247 업데이트).
2. bundle 의 2파일을 worktree 의 teams/content/qc/qc_verify.py + tests/regression/test_content_qc_2769.py 로
   **교체(ANU fix = source of truth, 재구현 0)**.
3. 교체 후 2파일 sha256 == manifest.json 일치 확인. 불일치 → STOP_REPORT.
4. git diff 변경 == 정확히 위 2파일. 2파일 밖 수정 → STOP_REPORT.
5. regression PASS: pytest tests/regression/test_content_qc_2769.py + test_gate_shadow_runner_2765.py
   test_gate_shadow_finish_task_2766.py test_goal_contract_strict_template_2767.py test_v213_phase1_gate_2757.py
6. commit + push → PR #247 업데이트. ★Gemini HIGH thread 는 코드 fix push 로 해소(임의 resolve 금지).
7. PR 업데이트 후 diff 파일 목록 1회 + PR 상태 1회 확인 후 report 종료. CI/Gemini polling 0.
```

## 수정 허용 파일 (정확히 2개)
```text
teams/content/qc/qc_verify.py
tests/regression/test_content_qc_2769.py
```

## 금지
```text
위 2파일 밖 수정 · matrix/산출물(memory/work)/memory artifact · dispatch/__init__.py·scripts/finish-task.sh·
dispatch/gate_shadow_runner.py·teams/shared/qc_verify.py 수정 · 재설계/리팩터 · content QC 동작 광범위 재설계 ·
자동 merge/squash(owner 승인 전) · Gemini thread 임의 resolve · CI/Gemini polling · 반복 gh pr checks · 수기 lock.
```

## 중단 조건 (하나라도 → STOP_REPORT)
```text
2파일 밖 수정 필요 · 재설계 필요 · shared/dev/design QC 영향 · dispatch/finish-task/gate_shadow 수정 필요 ·
sha256 manifest 불일치 · regression 실패 · PR 업데이트 실패 · HIGH 를 dismiss 해야 하는 상황 · 자동 merge 시도.
```

## 보고 (ANU callback envelope + report)
```text
변경 파일 목록 · PR #247 업데이트 여부(새 PR이면 번호) · HIGH 2 대응 내용 · medium 2 대응 내용 ·
테스트 결과 · 2파일 밖 수정 0 증거 · merge 미승인 유지 · base/PR head.
```

## allowed_resources

```yaml
allowed_resources:
  paths:
    - "teams/content/qc/qc_verify.py"
    - "tests/regression/test_content_qc_2769.py"
  forbidden_paths:
    - "dispatch/**"
    - "scripts/finish-task.sh"
    - "teams/shared/**"
    - "memory/state/automation_capability_matrix.json"
    - "memory/work/**"
    - ".env*"
  commands:
    - "git"
    - "pytest"
    - "python3"
    - "gh"
  merge_policy: "manual"
  ttl_hours: 12
```