READY 필수 필드를 못 채운 plain 추출을 헤드리스로 에스컬레이트 - #24
Conversation
- 부분 SSR SPA(카카오 톡딜 실측: 이름·이미지 OG 만 SSR 에 있고 가격은 JS 렌더 뒤에만 존재)는 fetch 가 성공해도 문서에 가격이 없어 LLM 도 못 뽑는다. 기존 승격 축(PageFetchException.escalatable)은 fetch 실패만 봐서 이 경우 브라우저를 안 써 보고 UNTRUSTWORTHY_VALUE 확정 실패로 닫혔다 - READY 판정(name·imageUrl·currentPrice)을 ProductSnapshot.missingReadyField 로 올려 응답 경계(ExtractionResponse.from)와 승격 판정이 한 조건을 공유하게 했다 - 불완전 승격은 plain 의 try 바깥에서 호출해 headless 실패가 catch 로 새어 재승격되는 축을 차단하고, 기존 escalation 카운터에 category=INCOMPLETE_SNAPSHOT 으로 집계한다 - 이 승격이 없으면 해당 host 는 HEADLESS_FIRST 정책이 유일한 성공 경로(정합성 조건)가 된다. 정책을 느린-실패 낭비 제거(최적화)로만 남긴다는 설계를 지키는 변경
|
Warning Review limit reached
Next review available in: 30 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesREADY 필드 검증과 응답 매핑
불완전 스냅샷 Headless 승격
Fallback 경계 동작 검증
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant FallbackProductLinkExtractor
participant ProductSnapshot
participant headless_strategy
participant metrics
FallbackProductLinkExtractor->>ProductSnapshot: missingReadyField()
ProductSnapshot-->>FallbackProductLinkExtractor: 누락 여부 반환
FallbackProductLinkExtractor->>headless_strategy: INCOMPLETE_SNAPSHOT 승격 요청
headless_strategy-->>FallbackProductLinkExtractor: ProductSnapshot 반환
FallbackProductLinkExtractor->>metrics: 승격 성공 또는 실패 기록
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/depromeet/piki/extractor/extraction/FallbackProductLinkExtractor.java`:
- Line 123: Update escalateToHeadless to immediately enforce that category is
non-null at method entry using Objects.requireNonNull(category, descriptive
message), before any other processing or Micrometer tag use.
🪄 Autofix
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4746baf0-7c38-4a72-aefd-a8d8e935516d
📒 Files selected for processing (5)
src/main/java/com/depromeet/piki/extractor/api/ExtractionResponse.javasrc/main/java/com/depromeet/piki/extractor/domain/ProductSnapshot.javasrc/main/java/com/depromeet/piki/extractor/extraction/FallbackProductLinkExtractor.javasrc/test/java/com/depromeet/piki/extractor/domain/ProductSnapshotTest.javasrc/test/java/com/depromeet/piki/extractor/extraction/FallbackProductLinkExtractorTest.java
- outcome=success 가 "예외 없이 snapshot 반환"이라, READY 필드가 빈 결과(경계에서 확정 실패로 닫힘)도 success 로 집계돼 구제 성공률·직행 성공률이 실제보다 부풀었다 - 판정을 outcomeOf(snapshot)로 모아 escalation·headless_first 두 카운터가 같은 규칙(완전한 READY snapshot 확보 = success)을 공유한다 - INCOMPLETE_SNAPSHOT category 는 목적 자체가 구제 성공률 관측이라 이 어긋남이 지표를 직접 오염시키는 것이 계기. 기존 fetch 실패 category 도 같은 결함이 있어 함께 정정
- category 는 Micrometer 태그 값이라 null 이면 계약 위반이 카운터 생성 시점에야 드러난다. 진입 시 Objects.requireNonNull 로 실패 지점을 고정 (CodeRabbit 리뷰 반영)
Situation
Task
Action
Result
연관 이슈
Summary by CodeRabbit
개선 사항
버그 수정