[Fix] 로드맵 장소 중복 문제 해결#108
Merged
Merged
Conversation
개요이 변경사항은 Google Places API 후보를 사용할 때 선택된 장소에 대한 중복 제거 로직을 구현합니다. 변경 사항
추정 코드 리뷰 노력🎯 3 (Moderate) | ⏱️ ~20 분 관련 이슈
관련 PR
제안 레이블
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 the current code and only fix it if needed.
Inline comments:
In `@app/graph/roadmap/nodes/finalize.py`:
- Around line 73-95: The loop currently forces truthiness of place_key which
skips candidates with place_key=None and can return an already-used key as
fallback; update the checks that currently read "if place_key and place_key not
in used_place_keys" (the early-return condition and the similar check before
assigning fallback_place) to instead test membership only (e.g., "if place_key
not in used_place_keys") so candidates with None keys are considered as
fallback, and change the final duplicate flag expression "bool(fallback_key and
fallback_key in used_place_keys)" to "bool(fallback_key in used_place_keys)" so
the returned boolean correctly reflects whether the fallback_key is already
used; locate these changes around uses of _place_dedupe_key, used_place_keys,
region_bbox.contains, and the fallback_place/fallback_key logic.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3c556347-e729-413d-ae9d-139ca75b1a0e
📒 Files selected for processing (3)
app/graph/roadmap/nodes/finalize.pyapp/graph/roadmap/nodes/skeleton.pytests/test_roadmap_generation_simplified_pipeline.py
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
1. 개요
place_id가 여러 슬롯/일자에 반복 배정되는 문제를 줄입니다.2. 작업 내용
finalize단계에서place_id기준 전역 중복 제거를 추가했습니다.skeleton생성 및 복구 프롬프트에 동일place_id중복 금지 지시를 추가했습니다.3. AI 사용 및 검증
git diff --checkuv/pytest가 없어 자동 테스트는 실행하지 못했습니다.4. 스크린샷
5. 체크리스트
uv run pre-commit run --all-files를 실행했는가?Summary by CodeRabbit
릴리스 노트
버그 수정
테스트