feat: AiRun 진행 상태 SSE 구독 추가 - #101
Merged
Merged
Conversation
AiRun 상태 변화를 개인정보 없는 공개 이벤트로 변환하고 사용자·사업장별 SSE 구독, 재연결, heartbeat 및 연결 제한을 적용합니다. 기존 GET 상세 조회는 최종 상태의 기준으로 유지합니다.
이벤트 순서와 민감정보 미노출, Last-Event-ID 재연결, 사업장 격리, 연결 제한, CORS 및 OpenAPI 계약을 자동 테스트로 고정합니다.
hywznn
marked this pull request as ready for review
August 6, 2026 10:31
AiRun을 QUEUED 상태로 저장한 뒤 202 응답을 먼저 반환합니다. 별도 실행기에서 RUNNING 전환과 Runtime 호출을 수행해 최초 SSE 상태를 실시간으로 구독할 수 있게 합니다.
krestar
approved these changes
Aug 6, 2026
krestar
left a comment
Contributor
There was a problem hiding this comment.
요구사항과 테스트 범위 확인했습니다. Tenant 격리, 안전한 SSE payload, 재연결·heartbeat 처리가 적절하고 CI도 통과해 승인합니다.
Contributor
Author
리슨 투마 핫 빝 포유 |
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜 필요한가요?
Client가 AiRun 진행 상태를 polling보다 빠르게 확인할 수 있도록 Server → Client 단방향 SSE 구독을 추가합니다.
Refs #75
무엇이 바뀌나요?
GET /api/v1/ai-runs/{aiRunId}/events를 추가했습니다.Last-Event-ID기반 재연결과 heartbeat를 지원합니다.기존 동작과의 관계
SSE는 화면 편의 기능이며 실행의 기준은 계속 Server DB입니다. 연결이 끊겨도 AiRun은 계속 실행되고 기존
GET /api/v1/ai-runs/{aiRunId}polling API도 그대로 유지됩니다.검증
./gradlew clean test성공