report HAN-600 asurada final 2026-06-10

[HAN-600] Pantheon IncompleteRead 재발 방지 — conversations_history retry 추가

Summary

startup-audit / spec_gate_catchup / fetch_channel_contextconversations_history 호출에 IncompleteRead 재시도 로직 추가. PR #274 머지 완료.

Context

Pantheon 채널 누적 메시지 증가로 conversations_history 응답 페이로드가 200KB+ 로 증가.
TCP 전송 중 연결이 끊기면서 http.client.IncompleteRead 발생.

날짜 경로 페이로드
2026-06-08 04:00 raphael/agent-approvals ~211KB
2026-06-09 05:26 jarvis/problem-report ~95KB
2026-06-09 16:26 spec-gate-catchup ~330KB
2026-06-09 16:26 startup-audit/jarvis DM ~205KB
2026-06-10 08:37 jini/northstar ~134KB

mention_scan 경로는 HAN-514에서 이미 retry+limit=50 적용됨. 나머지 3개 경로에 패리티 미달이었음.

작업 내용

수정 파일

파일 위치 변경 내용
audit.py _scan_channel IncompleteRead retry 1회 추가
bridge.py fetch_channel_context IncompleteRead catch 추가 (기존 SlackApiError only)
bridge.py spec_gate_startup_catchup IncompleteRead retry 1회 + from http.client import IncompleteRead import

패턴 (mention_scan 기존 패턴과 동일)

history = None
for attempt in range(2):
    try:
        history = client.conversations_history(channel=channel_id, limit=100)
        break
    except IncompleteRead as e:
        if attempt == 0:
            log.warning("[audit] IncompleteRead for %s/%s, retrying: %s", ...)
            time.sleep(1)
        else:
            log.warning("[audit] conversations_history skipped for %s/%s (transient): %s", ...)
    except Exception as e:
        log.error("[audit] conversations_history failed for %s/%s: %s", ...)
        break
if history is None:
    return results

코드 리뷰 결과

클린 패스. 80점 이상 이슈 없음.

80점 미달 관찰 2건 (비블로킹):
- _scan_channel limit=100 유지 — mention_scan이 HAN-514에서 50으로 줄인 것과 비대칭. follow-up 가능
- spec_gate_startup_catchup retry 소진 시 outer 루프 break — 기존 동작과 동일(회귀 아님), 관찰성 개선 여지

Result

완료된 것

배운 것

링크