Skip to content

fix: 질문 음성 PENDING 응답 후 재요청에 최소 1초 간격 적용 - #174

Merged
danjee2009 merged 1 commit into
devfrom
fix/question-audio-pending-delay
Oct 19, 2026
Merged

danjee2009 merged 1 commit into
devfrom
fix/question-audio-pending-delay

Conversation

@danjee2009

Copy link
Copy Markdown
Member

개요

release PR #172 리뷰에서 나온 지적 사항 수정입니다.

기준 커밋: origin/dev 954692b

문제

useQuestionAudio는 status: PENDING을 받으면 대기 없이 바로 다시 요청했습니다. 서버의 wait=20 long-poll(Chat default-wait 20s / max-wait 25s)만 믿는 구조라, Chat 설정이 바뀌거나 프록시가 PENDING을 바로 돌려주면 180초 동안 요청이 쉬지 않고 Chat으로 몰릴 수 있었습니다.

변경

  • src/features/interview-page/interview/model/useQuestionAudio.ts
    • PENDING_MIN_INTERVAL_MS = 1_000 [가정]: 요청을 보낸 뒤 1초 안에 PENDING이 오면 남은 시간만큼 기다렸다가 다시 요청. long-poll이 정상이면(20초 대기) 추가 지연 없음
    • 오류 재시도 대기에 쓰던 Promise를 wait로 묶어 PENDING 대기에도 같이 씀. 질문 전환·종료 시 정리(releaseRetry, retryTimer)도 그대로 적용됨
  • tests/interview-browser-fixture.mjs: 오디오 요청에 시각(at) 기록
  • tests/question-audio.browser.mjs: PENDING 연속 시나리오에서 요청 간격이 900ms 이상인지 검사

테스트

  • npm run lint 오류 0(기존 router.tsx 경고 1), npm run build 통과
  • 단위(node --test tests/*.test.mjs) 51개 통과
  • 브라우저(Playwright, API 모의): tests/question-audio.browser.mjs 23개 통과(백오프 초기화·180초 마감·질문 전환 정리 회귀 포함)
  • 미검증: 실제 Chat 서버 연동

🤖 Generated with Claude Code

서버가 long-poll 대기 없이 PENDING을 바로 돌려주면 대기 없이 재요청이
반복되던 문제를 막는다. 기존 오류 재시도 대기 로직을 공용 wait로 정리했다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T05:23:36.235190Z 262f250 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danjee2009
danjee2009 merged commit 6573dd7 into dev Oct 19, 2026
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.

1 participant