Skip to content

refactor: SessionManager 채널 기반 다중 세션 구조로 변경#81

Open
kangsiwoo wants to merge 1 commit intomainfrom
refactor/channel-based-sessions
Open

refactor: SessionManager 채널 기반 다중 세션 구조로 변경#81
kangsiwoo wants to merge 1 commit intomainfrom
refactor/channel-based-sessions

Conversation

@kangsiwoo
Copy link
Copy Markdown
Owner

Summary

  • ConversationSessionchannel_id 필드 추가, 세션 키를 user_idchannel_id로 변경
  • get_or_create_session(channel_id, user_id) 시그니처로 같은 유저가 여러 채널에서 독립 세션 보유 가능
  • on_message에서 message.channel.id 기반 세션 조회, to_dict()channel_id 포함

Test plan

  • test_session_manager.py 22개 테스트 통과 (채널 기반 + 다중 채널 세션 격리 테스트 추가)
  • test_on_message.py 15개 테스트 통과
  • test_integration.py 5개 테스트 통과
  • 총 42개 테스트 전부 통과

Closes #72

🤖 Generated with Claude Code

세션 키를 user_id에서 channel_id로 변경하여 같은 유저가
여러 채널에서 독립적인 세션을 가질 수 있도록 리팩토링.

- ConversationSession에 channel_id 필드 추가
- get_or_create_session(channel_id, user_id) 시그니처 변경
- to_dict()에 channel_id 포함
- on_message에서 channel.id 기반 세션 조회
- 전체 테스트 채널 기반으로 수정 + 다중 채널 세션 테스트 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Session-API] refactor: SessionManager를 채널별 다중 세션 구조로 변경

1 participant