Skip to content

[Fix] 모의지원 홈 응답에 자소서 채점중 여부 추가 - #231

Merged
whc9999 merged 2 commits into
devfrom
fix/mock-apply-analysis-progress-flag
Jul 30, 2026
Merged

[Fix] 모의지원 홈 응답에 자소서 채점중 여부 추가#231
whc9999 merged 2 commits into
devfrom
fix/mock-apply-analysis-progress-flag

Conversation

@whc9999

@whc9999 whc9999 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

  • MockApply 홈 카드 응답에 analysisInProgress 필드 추가
  • PENDING/RUNNING 분석 비동기 작업 기준으로 채점중 여부 계산
  • 홈/최근/검색 목록에서 동일한 채점중 플래그를 내려주도록 수정
  • 홈 목록 응답의 채점중 상태 검증 테스트 추가

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [ ]

Summary by CodeRabbit

  • 새로운 기능

    • 모의 지원서 목록에서 분석 진행 여부를 확인할 수 있습니다.
    • 분석이 대기 중이거나 실행 중인 항목에는 진행 상태가 표시됩니다.
    • 분석이 완료된 항목에는 진행 중 상태가 표시되지 않습니다.
  • 버그 수정

    • 모의 지원서 목록 및 검색 결과에서 분석 상태가 일관되게 표시됩니다.

- MockApply 홈 카드 응답에 analysisInProgress 필드 추가
- PENDING/RUNNING 분석 비동기 작업 기준으로 채점중 여부 계산
- 홈/최근/검색 목록에서 동일한 채점중 플래그를 내려주도록 수정
- 홈 목록 응답의 채점중 상태 검증 테스트 추가
@whc9999 whc9999 self-assigned this Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@whc9999, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4b8a9f8d-3033-46df-8fbb-f13387d4c72b

📥 Commits

Reviewing files that changed from the base of the PR and between d1d3446 and 7a09c6f.

📒 Files selected for processing (3)
  • ops/db/migrations/20260730_analysis_async_tasks_home_lookup_index.sql
  • src/main/resources/schema.sql
  • src/test/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyServiceTest.java
📝 Walkthrough

Walkthrough

MockApply 목록 응답에 analysisInProgress 필드를 추가하고, 사용자별 PENDING/RUNNING 분석 작업을 조회해 홈·최근·검색 목록에 상태를 반영합니다. 서비스 테스트는 진행 중 및 완료 항목의 상태 값을 검증합니다.

Changes

MockApply 분석 진행 상태 표시

Layer / File(s) Summary
분석 상태 조회 및 응답 계약
src/main/java/com/jobdri/jobdri_api/domain/analysis/repository/AnalysisAsyncTaskRepository.java, src/main/java/com/jobdri/jobdri_api/domain/mockapply/dto/response/MockApplyHomeItemResponse.java
사용자, MockApply ID 목록, 상태 목록으로 분석 작업을 조회하는 메서드와 analysisInProgress 응답 필드가 추가되었습니다.
목록 변환 및 상태 반영
src/main/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyService.java
홈·최근·완료·검색 목록 변환이 공통 변환 로직을 사용하며, PENDING/RUNNING 작업이 있는 MockApply에 analysisInProgress=true를 전달합니다.
목록 상태 검증
src/test/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyServiceTest.java
진행 중 분석 작업이 있는 항목은 true, 완료 항목은 false인지 검증합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MockApplyService
  participant AnalysisAsyncTaskRepository
  participant MockApplyHomeItemResponse
  MockApplyService->>AnalysisAsyncTaskRepository: 활성 분석 작업 조회
  AnalysisAsyncTaskRepository-->>MockApplyService: PENDING/RUNNING MockApply ID 반환
  MockApplyService->>MockApplyHomeItemResponse: 상태 플래그와 MockApply 전달
  MockApplyHomeItemResponse-->>MockApplyService: 목록 응답 항목 반환
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 변경의 핵심인 모의지원 홈 응답에 채점중 여부를 추가한 내용을 간결하게 잘 요약합니다.
Description check ✅ Passed 필수 템플릿 섹션과 작업 내용, 체크리스트가 대부분 채워져 있어 설명으로 충분합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mock-apply-analysis-progress-flag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/test/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyServiceTest.java (1)

346-393: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

RUNNING 상태도 검증하세요.

현재는 PENDING 태스크만 저장합니다. TaskStatus.RUNNING이 조회 조건에서 빠지거나 잘못 매핑돼도 테스트가 통과하므로, 동일 카드가 analysisInProgress=true가 되는 RUNNING 케이스를 추가하세요.

As per path instructions, src/test/**/*.java에서는 비동기 시나리오를 충분히 검증해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyServiceTest.java`
around lines 346 - 393, Update the test around MockApplyServiceTest’s
getMyMockApplies scenario to also persist an AnalysisAsyncTask with
TaskStatus.RUNNING for a mock apply and assert that the corresponding response
item has analysisInProgress=true. Keep the existing PENDING coverage and ensure
the RUNNING task uses the same card relationship and lookup conditions as
production.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/repository/AnalysisAsyncTaskRepository.java`:
- Around line 20-24: findByUserIdAndMockApplyIdInAndStatusIn 쿼리의 접근 패턴을 지원하도록 배포
스키마에 user_id, mock_apply_id, status 순서의 복합 인덱스를 추가하세요. 기존 단일 또는 created_at 포함
인덱스와 중복되지 않도록 마이그레이션에 반영하고, 해당 인덱스가 실제 배포 스키마에 생성되는지 검증하세요.

---

Outside diff comments:
In
`@src/test/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyServiceTest.java`:
- Around line 346-393: Update the test around MockApplyServiceTest’s
getMyMockApplies scenario to also persist an AnalysisAsyncTask with
TaskStatus.RUNNING for a mock apply and assert that the corresponding response
item has analysisInProgress=true. Keep the existing PENDING coverage and ensure
the RUNNING task uses the same card relationship and lookup conditions as
production.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7ff09281-eccf-4ff8-b314-d2ad3f072dbc

📥 Commits

Reviewing files that changed from the base of the PR and between 98e105c and d1d3446.

📒 Files selected for processing (4)
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/repository/AnalysisAsyncTaskRepository.java
  • src/main/java/com/jobdri/jobdri_api/domain/mockapply/dto/response/MockApplyHomeItemResponse.java
  • src/main/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyService.java
  • src/test/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyServiceTest.java

- analysisInProgress 조회 패턴을 위한 analysis_async_tasks 복합 인덱스 추가
- 운영 수동 migration과 schema.sql에 동일 인덱스 반영
- PENDING/RUNNING 분석 작업 모두 홈 응답에서 채점중으로 내려가도록 테스트 보강
@whc9999
whc9999 merged commit 80e7bb5 into dev Jul 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant