Skip to content

fix: 생성된 면접 확인 시 N:1 면접관 순서 차이를 불일치로 보지 않음 - #173

Merged
danjee2009 merged 1 commit into
devfrom
fix/created-interview-persona-order
Oct 19, 2026
Merged

danjee2009 merged 1 commit into
devfrom
fix/created-interview-persona-order

Conversation

@danjee2009

Copy link
Copy Markdown
Member

개요

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

기준 커밋: origin/dev 954692b

문제

getCreatedInterview가 요청 때 보낸 personaIds와 /api/interviews/get 응답의 personaIds를 순서까지 비교했습니다.
API(InterviewService.orderForMulti)는 N:1 면접관을 기술 면접관 먼저로 재정렬해 personaOrder로 저장합니다. 그래서 기술 면접관을 첫 자리에 두지 않은 설정은 이미 만들어진 면접인데도 "생성된 면접관 정보가 선택한 설정과 일치하지 않습니다"가 떴습니다. 사용자가 재시도하면 면접이 중복으로 생길 수 있었습니다.

변경

  • src/features/interview-page/interview/api/create-interview/index.ts: 길이와 포함 여부만 비교하고 순서는 비교하지 않음. API가 중복 ID를 거절하므로 길이와 포함 여부만 맞으면 같은 구성으로 봄

테스트

  • npm run lint 오류 0(기존 router.tsx 경고 1), npm run build 통과
  • 단위(node --test tests/*.test.mjs) 51개 통과
  • 브라우저(Playwright, API 모의): tests/profile-preparation.browser.mjs 28개 통과
    • 신규 시나리오 start 404 links to materials (server reorders personas): /api/interviews/get이 면접관을 역순으로 돌려줘도 다음 단계로 진행
    • 수정 전 코드에서는 이 시나리오가 타임아웃으로 실패하는 것 확인
  • 미검증: 실제 API 연동

🤖 Generated with Claude Code

API가 N:1 면접관을 기술 면접관 먼저로 재정렬해 저장하므로
getCreatedInterview는 구성만 비교하고 순서는 비교하지 않는다.

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:04.219943Z 2c29900 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c2990020b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 224 to +225
if ("personaIds" in params && (params.personaIds.length !== data.personaIds.length ||
params.personaIds.some((id, index) => data.personaIds[index] !== id))) {
params.personaIds.some((id) => !data.personaIds.includes(id)))) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve persona-to-slot mapping after accepting reordered IDs

When the server returns the same persona IDs in a different order—the exact N:1 scenario this change now accepts—the returned data.personaIds remains in server order. buildPreparedView later pairs those IDs by index with the original settings.slots (prepareView.ts:22-25), so questions from one persona highlight and display another interviewer's name, role, image, and traits. After validating set equality, restore the request order or explicitly map each ID to its originating slot before returning the data.

Useful? React with 👍 / 👎.

@danjee2009
danjee2009 merged commit 5a0e481 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