[ai-assisted] fix(mail): SSE stream 노출 조건 보강#377
Merged
Conversation
Issue: - #375 Why: - mail web notify transport가 stomp로 설정되면 SSE stream endpoint가 등록되지 않아 /api/mgmt/mail/sync/stream 요청이 static resource fallback으로 처리되고 500 응답으로 포장됐다. What: - mail web notify 전송 채널과 SSE endpoint 노출 조건을 분리했다. - SSE 연결 직후 connected 이벤트를 전송해 text/event-stream 응답이 안정적으로 열린다. - SSE/STOMP notifier가 함께 있을 때 notifier별 예외를 격리하는 CompositeMailSyncNotifier를 추가했다. - mail starter/module README에 notify와 sse 설정 책임을 문서화했다. Validation: - ./gradlew :starter:studio-application-starter-mail:test :studio-application-modules:mail-service:test: 성공 - git diff --cached --check: 성공 - curl GET /api/mgmt/mail/sync/stream: HTTP 200 text/event-stream 및 connected 이벤트 확인
donghyuck
commented
Apr 29, 2026
Owner
Author
donghyuck
left a comment
There was a problem hiding this comment.
Self-review completed.
확인 결과:
- PR diff는 이슈 #375 범위의 mail SSE/STOMP auto-configuration, notifier, 테스트, README 변경만 포함합니다.
notify=stomp구성에서도sse=false를 명시하지 않으면 SSE endpoint가 등록되어 기존 클라이언트 연결 실패를 방지합니다.CompositeMailSyncNotifier로 notifier별 예외가 격리되어 STOMP/SSE 동시 구성에서 한 전송 실패가 다른 전송을 막지 않습니다.- targeted tests와 SSE smoke test, gitleaks check가 통과했습니다.
추가 수정 필요 사항은 발견하지 못했습니다. 브라우저 alert 제거는 병합 후 프론트 dev 환경에서 최종 확인하면 됩니다.
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.
Why
/api/mgmt/mail/sync/streamSSE 연결이 500으로 실패하는 이슈를 수정합니다.studio.features.mail.web.notify=stomp설정에서 SSE 컨트롤러가 등록되지 않고, 해당 요청이 static resource fallback으로 흘러NoResourceFoundException이 500 응답으로 포장되는 구조였습니다.What
studio.features.mail.web.notify를 작업 완료 알림 전송 채널로 유지하고, SSE endpoint 노출은studio.features.mail.web.sse로 분리했습니다.notify=stomp이어도sse=false를 명시하지 않으면/sync/stream이 계속 노출되도록 자동 구성 조건을 보강했습니다.connected이벤트를 전송해text/event-stream200 응답이 안정적으로 열리도록 했습니다.CompositeMailSyncNotifier를 추가했습니다.notify와sse설정 책임을 문서화했습니다.Related Issues
Validation
./gradlew :starter:studio-application-starter-mail:test :studio-application-modules:mail-service:testgit diff --cached --checkcurl -i -H 'Accept: text/event-stream' -H 'Authorization: Bearer <token>' http://localhost:8080/api/mgmt/mail/sync/streamHTTP/1.1 200,Content-Type: text/event-stream,event:connected수신Risk / Rollback
notify=stomp구성에서도 SSE endpoint가 기본 노출되므로 기존보다 노출 surface가 넓어질 수 있습니다. 다만 기존 클라이언트 호환성과 이슈 #375의 실패 조건을 해결하기 위한 의도된 동작이며,studio.features.mail.web.sse=false로 명시 비활성화할 수 있습니다.notify값에 따라 SSE endpoint 등록 여부가 결정됩니다.AI / Subagent Usage
Checklist
AI-Assistedvalue is correct