# Codex Gate: is_new 메타데이터로 신규/기존 파일 구분

## 작업 레벨: Lv.1

## 배경
task-2161에서 affected_files 미존재 시 severity를 info로 낮췄지만, Codex 리뷰에서 "오타/잘못된 경로도 PASS됨" 지적.

## 수정 방안
affected_files를 단순 문자열 리스트에서 메타데이터 포함 형태로 확장:

파일: `/home/jay/workspace/scripts/codex_gate_check.py`

### 1. affected_files 입력 형식 확장
기존: `["file1.py", "file2.py"]`
변경: 문자열 + dict 혼합 지원
```python
# 기존 형식도 호환
["file1.py", "file2.py"]

# 새 형식: is_new 명시
[
  {"path": "file1.py", "is_new": True},
  {"path": "file2.py", "is_new": False}
]
```

### 2. 마아트 폴백 로직 변경 (라인 107-116)
```python
for item in affected_files:
    if isinstance(item, dict):
        file_path = item["path"]
        is_new = item.get("is_new", False)
    else:
        file_path = item
        is_new = False  # 기존 형식은 기존 파일로 간주
    
    resolved = file_path if os.path.isabs(file_path) else os.path.join(workspace_root, file_path)
    if not os.path.isfile(resolved):
        if is_new:
            risks.append({
                "severity": "info",
                "description": f"신규 파일 (아직 미생성): {file_path}",
            })
        else:
            risks.append({
                "severity": "high",  # 기존 파일인데 없으면 high
                "description": f"영향받는 파일이 존재하지 않습니다 (오타 또는 삭제됨?): {file_path}",
            })
```

### 3. 테스트 추가
- `test_codex_gate.py`에 신규 파일(is_new=True) + 기존 파일 미존재(is_new=False) 케이스 추가

## 주의
- 기존 문자열 형식 100% 호환 유지
- high는 FAIL이 아님 (critical만 FAIL). 경고 수준.
