Skip to content

Bound Gemini curation requests with a timeout and log progress - #6

Merged
AlexWindels merged 1 commit into
mainfrom
fix/gemini-curation-hang
Aug 7, 2026
Merged

Bound Gemini curation requests with a timeout and log progress#6
AlexWindels merged 1 commit into
mainfrom
fix/gemini-curation-hang

Conversation

@AlexWindels

Copy link
Copy Markdown
Collaborator

Fixes #5.

Summary

  • A real run appeared to hang indefinitely with zero output during the domain curation step, running --curation-backend gemini directly in a live terminal (ruling out output buffering). genai.Client() was constructed with no http_options, so the request had no explicit timeout, and the SDK's own retry loop (tenacity, on 408/429/5xx) doesn't log anything -- a stall here was indistinguishable from a genuine hang.
  • Pass an explicit http_options=types.HttpOptions(timeout=60_000) (60s) to bound each request attempt, and log immediately before/after the call so a multi-minute wait during retries is visible instead of silent.
  • Documented in the README's Domain-name curation section.

Test plan

  • pytest -- 114 passed (new test verifies both the explicit http_options.timeout and the before/after log lines, via a mocked genai.Client)
  • Reviewer: confirm CI passes on this PR

Fixes #5.

genai.Client() was constructed with no http_options, so the SDK's
default timeout behavior applied -- its own retry loop (tenacity, on
408/429/5xx) logs nothing, and an unset timeout can mean an unbounded
wait on a stalled connection. A real run appeared to hang indefinitely
with zero output during curation as a result.

Pass an explicit 60s http_options timeout to bound each attempt, and
log immediately before/after the request so a multi-minute wait during
retries is visible and distinguishable from an actual hang. Also
documents this in the README's curation section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AlexWindels
AlexWindels merged commit 05808a7 into main Aug 7, 2026
6 checks passed
AlexWindels pushed a commit that referenced this pull request Aug 7, 2026
Patch release: bounds Gemini curation requests with a timeout and logs
progress, fixing an indefinite silent hang during domain curation (#5/#6).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AlexWindels
AlexWindels deleted the fix/gemini-curation-hang branch August 7, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini curation step can hang indefinitely with no output

1 participant