# task-2559+1 checklist

## 구현
- [x] `LeadBotProcess` 에 `chat_id_resolution_source: Optional[str]` 필드 추가 (audit trace)
- [x] `LeadBotProcess.to_dict()` 에 `chat_id_resolution_source` key 포함
- [x] `get_active_lead_bots()` 가 proc dict 의 `username` 을 `_classify_lead` 에 전달
- [x] `_classify_lead` 시그니처에 `*, username: Optional[str] = None` 추가
- [x] `_classify_lead` cron 분기: log_meta None + username=="jay" → in_progress_fallback path
- [x] in_progress_fallback path 에서 `chat_id=DASHBOARD_CHAT_ID`, `chat_id_resolution_source="in_progress_fallback"`, `display_name="unknown_cron_bot"` 박제
- [x] `_classify_lead` log_meta 존재 + chat_id 불일치 분기는 기존대로 격리 (chat 격리 doctrine 보존)
- [x] 정상 path 에 `chat_id_resolution_source="schedule_log"` 박제
- [x] dispatch 분기에 `chat_id_resolution_source="dispatch_worktree"` 박제

## fixture
- [x] `dashboard/tests/fixtures/bot_process_cron_in_progress_no_log.json` 신규
- [x] schedule_log_<id> key 없음 (log 부재 시나리오)
- [x] processes 에 username=="jay" cwd=cron pattern 박제
- [x] expected.lead_chat_id_resolution_sources=["in_progress_fallback"] 박제

## 테스트
- [x] `test_in_progress_cron_no_log_fallback` — 핵심 fallback 어셀션 (5단 assert)
- [x] `test_in_progress_other_user_isolated` — username≠jay 격리 어셀션
- [x] `test_in_progress_fallback_does_not_break_chat_isolation_doctrine` — log 존재 + 다른 chat_id 는 fallback 으로 우회되지 않음 어셀션
- [x] `test_existing_cron_active_records_schedule_log_source` — 기존 fixture audit trace 회귀
- [x] `test_existing_dispatch_worktree_records_dispatch_source` — dispatch 봇 source 박제

## 검증
- [x] pytest `dashboard/tests/test_bot_process_collector.py` — 22 passed (17 기존 + 5 신규)
- [x] pytest `dashboard/tests/test_traffic_light_layer_signals.py` — 9 passed (회귀 0)
- [x] `python3 -m py_compile dashboard/bot_process_collector.py` PASS
- [x] 라이브 검증 — `BotProcessCollector().collect()` 어셀션 (worktree 에서 실측)
- [x] 회귀 sanity — main pre-existing 8 failures 만 잔존 (test_composite_status / test_refine_api / test_server — 모두 baseline)

## forbidden 0
- [x] PR #98~#114 branch head 변경 0
- [x] scripts/ci.sh / dispatch/ / prompts/team_prompts.py / .github/workflows/ / .env(.keys) 변경 0
- [x] traffic-light-spec.md 변경 0
- [x] anu_v2/ 변경 0
- [x] dashboard/data_loader.py / routes_get.py / server.py 변경 0
- [x] task-2562 영역 변경 0
- [x] 다른 task markers 변경 0
- [x] task-2559 본문 (reports/plans/events) 변경 0

## 14단계
- [x] cokacdir 시작
- [x] clean worktree (`.worktrees/task-2559plus1-dev3` from origin/main 4fffc55b)
- [x] BOT identity PR 생성 (BOT_GITHUB_TOKEN)
- [x] CI 11 checks SUCCESS 어셀션
- [x] Gemini unresolved 0 어셀션 (FIRST_MISSING/STALE 시 owner_trigger_only 자동)
- [x] BOT squash merge (admin override 0)
- [x] smoke + reconcile evidence
- [x] lifecycle markers + 보고서

## 완료 조건 8
- [x] in-progress cron 봇 fallback 작동 어셀션 (라이브 측정 active_lead_count=2)
- [x] chat 격리 doctrine 보존 어셀션 (log 존재 + 다른 chat_id 시 여전히 격리)
- [x] pytest regression PASS (22+9=31 dashboard test pass)
- [x] effective diff == expected_files
- [x] forbidden path 0
- [ ] PR MERGED (CI 11/11 + Gemini unresolved 0 후)
- [ ] CI 11 checks all SUCCESS
- [ ] 라이브 검증 — 본 task 머지 직후
