Repository navigation
Feature/#59 action analyze #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ff477a8
fix: 종료 상태 누락 기록의 완료 응답 차단
2-dayeon 30cd98e
fix: 신규 전송 기록의 종료 상태 검증 회귀 추가
2-dayeon 31dfe3a
fix: Redis 복원과 AI 종료 경합 회귀 검증
2-dayeon f024994
docs: 챗 종료 계약 수정과 검증 결과 기록
2-dayeon 9643838
Merge remote-tracking branch 'origin/main' into feature/#59-action-an…
2-dayeon 318916a
fix: 종료 상태가 잘못된 전송 완료 기록 보존
2-dayeon 806cc10
fix: 전송 완료 구 기록의 재요청 보존 검증 추가
2-dayeon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
26 changes: 26 additions & 0 deletions
26
src/test/java/com/person/repit/interview/service/InterviewResultOutboxTest.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package com.person.repit.interview.service; | ||
|
|
||
| import com.person.repit.common.config.JacksonConfig; | ||
| import com.person.repit.interview.dto.request.ChatInterviewAllRequest; | ||
| import com.person.repit.interview.type.InterviewStatus; | ||
| import org.junit.jupiter.params.ParameterizedTest; | ||
| import org.junit.jupiter.params.provider.EnumSource; | ||
| import org.junit.jupiter.params.provider.NullSource; | ||
| import org.springframework.data.redis.core.ReactiveStringRedisTemplate; | ||
| import reactor.test.StepVerifier; | ||
|
|
||
| import static org.mockito.Mockito.mock; | ||
| import static org.mockito.Mockito.verifyNoInteractions; | ||
|
|
||
| class InterviewResultOutboxTest { | ||
| @ParameterizedTest | ||
| @NullSource | ||
| @EnumSource(value = InterviewStatus.class, names = "IN_PROGRESS") | ||
| void 명시적_종료상태가_없으면_신규_outbox를_등록하지_않는다(InterviewStatus status) { | ||
| var redis = mock(ReactiveStringRedisTemplate.class); | ||
| var outbox = new InterviewResultOutbox(redis, new JacksonConfig().objectMapper()); | ||
| var request = ChatInterviewAllRequest.builder().sessionId("s").status(status).build(); | ||
| StepVerifier.create(outbox.enqueue(request)).expectError(IllegalArgumentException.class).verify(); | ||
| verifyNoInteractions(redis); | ||
| } | ||
| } |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] 이미 전송이 끝난(SENT) 구 기록도 BLOCKED로 바뀝니다.
requireTerminalStatus가 SENT/BLOCKED/PENDING 상태 확인보다 먼저 실행됩니다. 그래서 이 PR이 대상으로 삼는 interviewStatus null/IN_PROGRESS 구 기록 가운데, 이미 API 전송에 성공한 SENT 기록도recordFailure를 탑니다. outbox 기록에는 TTL이 없어서 SENT 기록이 계속 남습니다. 그 세션으로 ANSWER/COMPLETE/QUIT 재요청이 오면resume()에서 attempts가 늘고, state가 SENT에서 BLOCKED로 덮어써지고, 운영 확인 알림(repit.interview.result.attention)까지 나갑니다. 이 기록은 payload가 이미 null이어서 BLOCKED 복구 절차로 다시 보낼 원문도 없습니다.이미 BLOCKED인 경우처럼, SENT 기록은 상태를 바꾸지 말고 오류만 반환하도록 분기해야 할 것 같습니다. 새로 추가한 테스트는 PENDING 기록만 다룹니다.