feat(core): HTTP 재시도/백오프 + 전송계층 에러분류 (opt-in)#37
Closed
ArcSolver wants to merge 1 commit into
Closed
Conversation
감사(전수 논증)의 최대 레버리지 코어 약점 상환 — 행복경로 전용이던 http 핫패스에 견고성 원시기능을 코어 한 곳에 도입. 20개+ 서비스로 복붙되던 429/일시오류 처리를 옵트인으로 흡수할 토대. - _send() 단일 진입점으로 통합(_request_raw·get_text가 공유). 모든 동사에 retry 인자 추가. - Retry(attempts, statuses=(429,503), backoff, respect_retry_after): 지수 백오프 + 응답 Retry-After(delta-seconds) 우선 존중. - NetworkError: 전송계층 실패(연결/타임아웃) 분류. 원본 httpx 예외를 __cause__로 보존. 핵심 설계: **기본값(retry 미지정)은 동작 완전 무변경** — 재시도 0회, 전송 예외는 원본 httpx 그대로 전파. zotero가 9곳에서 쓰는 `except httpx.ConnectError`를 깨지 않기 위해 래핑·재시도를 모두 opt-in으로 둠. 서비스는 필요 시 retry=Retry(...)로 점진 채택. 864 passed(신규 5: 503 복구·Retry-After 존중·소진 시 UpstreamError·전송오류→NetworkError· 기본 무재시도 raw httpx 전파) · ruff clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
무엇을 / 왜
감사의 최대 레버리지 코어 약점 상환 — 행복경로 전용이던 http 핫패스에 견고성 원시기능을 코어 한 곳에 도입. 20개+ 서비스로 복붙되던 429/일시오류 처리를 옵트인으로 흡수할 토대.
변경
_send()단일 진입점으로 통합(_request_raw·get_text공유). 모든 동사에retry인자 추가.Retry(attempts, statuses=(429,503), backoff, respect_retry_after): 지수 백오프 + 응답Retry-After(delta-seconds) 우선 존중.NetworkError: 전송계층 실패(연결/타임아웃) 분류. 원본 httpx 예외를__cause__로 보존.핵심 설계 — 기본 동작 100% 무변경
retry미지정(기본)이면 재시도 0회, 전송 예외는 원본 httpx 그대로 전파. zotero가 9곳에서 쓰는except httpx.ConnectError를 깨지 않기 위해 래핑·재시도를 모두 opt-in으로 둠. 서비스는 필요 시retry=Retry(...)로 점진 채택.검증
864 passed(신규 5: 503 복구·Retry-After 존중·소진 시 UpstreamError·전송오류→NetworkError·기본 무재시도 raw httpx 전파) ·ruffclean.🤖 Generated with Claude Code