Skip to content

fix(ga): count only consecutive incomplete turns#689

Open
Fwind43 wants to merge 1 commit into
lsdefine:mainfrom
Fwind43:fix/reset-incomplete-retry-count
Open

fix(ga): count only consecutive incomplete turns#689
Fwind43 wants to merge 1 commit into
lsdefine:mainfrom
Fwind43:fix/reset-incomplete-retry-count

Conversation

@Fwind43

@Fwind43 Fwind43 commented Jul 16, 2026

Copy link
Copy Markdown

Summary

Count only consecutive incomplete turns toward the three-retry exit limit.

Why

_empty_ct previously accumulated across an entire run. After enough isolated stream failures, a later recoverable stream_read_error could hit the retry limit immediately instead of receiving a fresh retry budget.

The counter now resets to 1 whenever the previous incomplete response was not from the immediately preceding turn.

Testing

  • Verified three consecutive incomplete turns still exit on the third attempt
  • Verified isolated incomplete turns reset the counter and continue retrying
  • Compiled all 72 Python files with py_compile
  • git diff --check

Review principles

  • Localized to _retry_or_exit in ga.py
  • Preserves the existing three-consecutive-failure boundary
  • No dependencies or unrelated changes

@Fwind43 Fwind43 changed the title fix(ga): count only consecutive incomplete turns fix(ga): retry incomplete and metadata-only responses Jul 16, 2026
@Fwind43
Fwind43 force-pushed the fix/reset-incomplete-retry-count branch from 8e2e7e4 to c52905c Compare July 16, 2026 12:30
@Fwind43 Fwind43 changed the title fix(ga): retry incomplete and metadata-only responses fix(ga): count only consecutive incomplete turns Jul 16, 2026
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.

1 participant