fix(news): 동작하지 않는 GDELT combined 모드 제거 + 질의 오류 무재시도 (ai#22) - #73
Open
choigod1023 wants to merge 1 commit into
Open
fix(news): 동작하지 않는 GDELT combined 모드 제거 + 질의 오류 무재시도 (ai#22)#73choigod1023 wants to merge 1 commit into
choigod1023 wants to merge 1 commit into
Conversation
이슈 #22 에서 확정된 3안(즉시 제거)을 적용한다. combined 는 요청 수를 72 → 24 로 줄이려던 것인데, GDELT 가 첫 요청부터 질의 길이 초과로 거부한다. rate limit 이 아니다. combined risk_candidate 261자 → "Your query was too short or too long." split raw_material 172자 → 정상 도달은 하지만 항상 실패하는 경로였다. 남겨두면 다음 사람이 같은 곳에서 막힌다. - COMBINED_GDELT_QUERIES 삭제. GDELT_QUERY_MODE=combined 는 조용히 split 으로 넘어가지 않고 ValueError 로 실패한다. 설정한 사람이 combined 로 돌아간다고 믿은 채 다른 결과를 받는 편이 더 나쁘다. - .env.example 을 split 으로 변경. - 질의 길이 거부를 GDELTPermanentQueryError 로 분리해 재시도하지 않는다. 종전에는 GDELTTransientResponseError 로 잡혀 재시도 횟수를 그대로 소진했다. 질의 길이는 기다린다고 바뀌지 않는다. 429·5xx·timeout 만 backoff 대상이다. - 회귀 테스트 2건. combined 거부(요청 0회), 길이 거부 무재시도(urlopen 1회). 키워드를 임의로 쳐내는 1안은 택하지 않았다. recall 평가 없이 줄이면 수집 대상이 조용히 작아진다. 고정 2분할도 최종 규칙으로 두지 않는다. 후속 과제는 카테고리 의미 축을 유지한 채 내부를 검증 가능한 크기로 동적 분할하는 것이다(#22 잔여). 주의: GDELT 문서에 문자 수 상한이 명시돼 있지 않다. 261/172 는 재현된 관측이지 계약이 아니다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks
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.
이슈 #22 에서 sehyeon 님이 확정한 방향(3안 즉시 제거 + 영구/일시 오류 분리)을 적용합니다.
문제
combined는 요청 수를 72 → 24 로 줄이려던 것인데, GDELT 가 첫 요청부터 질의 길이 초과로 거부합니다. rate limit 이 아닙니다.도달은 하지만 항상 실패하는 경로였습니다. 남겨두면 다음 사람이 같은 곳에서 막힙니다.
변경
COMBINED_GDELT_QUERIES삭제GDELT_QUERY_MODE=combined는 조용히split으로 넘어가지 않고ValueError로 실패합니다. 설정한 사람이 combined 로 돌아간다고 믿은 채 다른 결과를 받는 편이 더 나쁩니다.env.example을split으로 변경GDELTPermanentQueryError로 분리해 재시도하지 않습니다. 종전에는GDELTTransientResponseError로 잡혀 재시도 횟수를 그대로 소진했습니다. 질의 길이는 기다린다고 바뀌지 않습니다. 429·5xx·timeout 만 backoff 대상입니다docs/2026-07-11_01_NEWS_DATA_GUIDE.md) 갱신택하지 않은 안
1안(키워드 축소) — recall 평가 없이 줄이면 수집 대상이 조용히 작아집니다.
2안(고정 2분할) — 최종 규칙으로 두지 않습니다. 후속 과제는 감염병·의료용품·원자재라는 감사 가능한 의미 축은 유지한 채, 각 카테고리 내부를 검증 가능한 크기의 여러
query_id로 동적 분할하는 것입니다(#22 잔여).테스트
회귀 2건 추가:
test_gdelt_combined_mode_is_rejected— combined 지정 시ValueError, 실제 요청 0회test_query_length_rejection_is_not_retried— 길이 거부 시urlopen1회로 종료전체 230 passed. 실패 3건(
test_material_pipeline)은 본 변경 이전부터 있던 로컬 WSLbash충돌이며,git stash로 대조 확인했습니다.주의
GDELT 공식 문서에 정확한 문자 수 상한이 명시되어 있지 않습니다. 위 261/172 는 재현된 관측이지 시스템 계약이 아닙니다. URL 인코딩 길이와 연산자 구성도 영향을 줍니다.
남은 과제 (이 PR 범위 밖)
sehyeon 님이 지적하신 수집 완전성 문제가 요청 수보다 먼저입니다. PR #69 handoff 9개 파트가 모두 249~250건으로 포화이고, 2,248행 중
source_month와 실제 기사 월이 다른 행이 1,546건(68.8%)입니다.sort=datedesc + maxrecords=250월 단위 수집은 "그 달 전체" 가 아니라 상한에 걸린 특정 시점 표본입니다.관련: #22, #69
🤖 Generated with Claude Code