DOCS/journey/troubleshooting/260204_coldmail_confirm_route_after_wait.md
2026-02-04 17:56:08 +09:00

1.7 KiB

콜드메일 확인 "아니오→예" 순서 시 리스트 미등록 수정

날짜: 2026-02-04 작성자: happybell80 관련 파일: rb8001/app/services/workflows/coldmail_workflow.py


문제 상황

  • 콜드메일 확인 메시지 2건 동시 도착 시, 1번 "아니오" → 2번 "예" 순서로 클릭하면 2번 "예"가 리스트에 반영되지 않음.
  • 로그: 2번 "예" 시 Workflow resumed and completed for {email_id}, confirmed=True만 있고, confirm_node·process_coldmail·"리스트 등록 완료" 로그 없음.

원인

  • route_after_wait: confirmed_email_id가 없으면 무조건 "send" 반환.
  • 1번 "아니오" 클릭 시 confirmed_email_id 비움 → send → 워크플로우 END.
  • 2번 "예" 재개 시 스레드는 이미 END라 실행할 노드 없음 → confirm_node 미실행 → 리스트 등록 안 됨.

해결 방안

  • coldmail_workflow.py: route_after_wait 수정
    • confirmed_email_id 있음 → "confirm"
    • 없고 waiting_confirmation 남음 → "wait_confirmation" (인터럽트 유지)
    • 없고 waiting_confirmation 비었음 → "send"
  • 위치: route_after_wait 함수 (L355 부근), 조건 2개 추가.

구현 완료

  • 커밋: fix(coldmail): route_after_wait에서 남은 확인건 있으면 wait_confirmation 재진입
  • rb8001 main 푸시 후 Gitea Actions 자동 배포.

교훈

  • 원인: interrupt 재개 후 라우팅에서 "이번 응답"만 보지 말고, 남은 대기 건(waiting_confirmation) 존재 여부를 반드시 조건에 포함해야 함.
  • 방지: 다중 확인 UX(아니오→예, 예→아니오 등 버튼 순서 조합)를 시나리오/테스트에 포함해 재현 후 라우팅 검증.