Inconsistent transient-error (5xx) retry across adapters #1

Closed
opened 2026-07-10 15:39:21 +00:00 by Leonard · 2 comments

Category: Reliability · Priority: HIGH

Summary
Adapters handle HTTP errors inconsistently. hackernews.py and huggingface.py retry 5xx with exponential backoff; arxiv.py, github.py, and reddit.py catch HTTPError, print the code, and drop the batch with no retry. Same failure class, different behavior per file.

Why it matters
A transient 503/500 from an upstream (common on arXiv) silently yields a zero-fetch cycle. The data is lost with no recovery attempt.

What happens if not done
Recurring gaps in the research record; trends missed because a source blipped that day. Compounds with issue #2 (no failure classification) and #3 (no degradation alerting).

Suggested approach
Add a shared retry helper in adapters/__init__.py: exponential backoff on 429/5xx only, 2 attempts, capped wait. Route all five adapters through it.

**Category:** Reliability · **Priority:** HIGH **Summary** Adapters handle HTTP errors inconsistently. `hackernews.py` and `huggingface.py` retry `5xx` with exponential backoff; `arxiv.py`, `github.py`, and `reddit.py` catch `HTTPError`, print the code, and drop the batch with no retry. Same failure class, different behavior per file. **Why it matters** A transient 503/500 from an upstream (common on arXiv) silently yields a zero-fetch cycle. The data is lost with no recovery attempt. **What happens if not done** Recurring gaps in the research record; trends missed because a source blipped that day. Compounds with issue #2 (no failure classification) and #3 (no degradation alerting). **Suggested approach** Add a shared retry helper in `adapters/__init__.py`: exponential backoff on 429/5xx only, 2 attempts, capped wait. Route all five adapters through it.
Author

Resolved by PR #12 (commit feba2fe). Shared retry helper in adapters/__init__.py with exponential backoff on 429/5xx, 2 attempts, capped wait. All adapters now route through it.

Resolved by PR #12 (commit `feba2fe`). Shared retry helper in `adapters/__init__.py` with exponential backoff on 429/5xx, 2 attempts, capped wait. All adapters now route through it.
Author

Resolved by PR #12 (commit feba2fe). Shared retry helper in adapters/__init__.py with exponential backoff on 429/5xx, 2 attempts, capped wait. All adapters now route through it.

Resolved by PR #12 (commit feba2fe). Shared retry helper in adapters/__init__.py with exponential backoff on 429/5xx, 2 attempts, capped wait. All adapters now route through it.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tony_tech/athena-oracle#1