Skip to content

fix: keep accounts available after transient network failures - #2467

Open
wangxiaochao19-lab wants to merge 1 commit into
jlcodes99:mainfrom
wangxiaochao19-lab:fix/network-failures-dont-disable-accounts
Open

wangxiaochao19-lab wants to merge 1 commit into
jlcodes99:mainfrom
wangxiaochao19-lab:fix/network-failures-dont-disable-accounts

Conversation

@wangxiaochao19-lab

Copy link
Copy Markdown

Summary

  • Treat statusless TLS/EOF/connection-reset failures as retryable connection-lifecycle errors.
  • Retry these failures within the configured request round.
  • Avoid reporting request-local tried-credential exhaustion as a persistent account-pool outage.
  • Preserve existing handling for authentication, rate-limit, and quota HTTP statuses.

Problem

A transient upstream transport failure such as:

Post "https://chatgpt.com/backend-api/codex/responses": utls: TLS handshake: EOF

could be classified as connection_lifecycle but remain non-retryable. After the request tried the only eligible credential, selection reported a pool failure, causing Cockpit to mark the account unavailable until manual recovery.

Tests

  • go test ./sdk/cliproxy/auth -run 'TestManager_ShouldRetryAfterError_RetriesStatuslessConnectionLifecycleFailure|TestManagerDoesNotReportTriedCredentialExhaustionAsPoolFailure' -count=10 — passes.
  • The full auth-package run still hits the existing TestResetAuthStateIgnoresResultsFromOlderAttempts failure; it reproduces on the clean v1.3.56 baseline (cc8ea89) without this patch.

Refs #2228

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