Skip to content

#69: keep loaded catalog on 5m retry interval when access token is renewed - #72

Merged
deyna256 merged 1 commit into
deyna256:mainfrom
teddyvj:69
Sep 22, 2026
Merged

deyna256 merged 1 commit into
deyna256:mainfrom
teddyvj:69

Conversation

@littfed

@littfed littfed commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Resolves #69

Summary

  • Move entry.everLoaded = false into the entry.account.Credentials().ChatGPTAccountID != a.Credentials().ChatGPTAccountID branch in SetAccounts.
  • When an account's access token is renewed for the same ChatGPT account ID, everLoaded is preserved as true.
  • If a refresh following token renewal fails, the account remains on the standard 5-minute interval (catalogTTL) rather than reverting to the 1-second backoff ladder.
  • When an account connects with a different ChatGPTAccountID, everLoaded is reset along with cached models.
  • Added TestCatalogRenewalRetainsFiveMinuteRetryIntervalOnFailure asserting that an immediate refresh attempt is made upon token renewal, and subsequent retries adhere to the 5-minute interval for both transient (500) and permanent (403) failure modes.

@deyna256 deyna256 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@deyna256
deyna256 merged commit e38f09a into deyna256:main Sep 22, 2026
1 check passed
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.

Keep a loaded catalog on the five-minute retry interval when its access token is renewed

3 participants