Repository navigation
Keep a loaded catalog on the five-minute retry after token renewal - #70
Closed
team-humaki wants to merge 2 commits into
Closed
team-humaki wants to merge 2 commits into
team-humaki wants to merge 2 commits into
Conversation
Add test for catalog token renewal to ensure retry behavior is correct.
Owner
|
Thanks for working on this! We're going with #72 for this fix, so I'm closing this as a duplicate. Hope to see you contribute again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #69
Problem
SetAccounts cleared everLoaded on any credential change, including a routine access-token renewal for the same ChatGPT account ID. A later discovery failure then used the one-second retry ladder even though a model list had already loaded.
Changes
Clear everLoaded only when ChatGPTAccountID changes (same branch that drops last-good models). A renewal still refreshes immediately and resets the failure count, but a following failed refresh stays on the five-minute interval.
Validation
go test ./internal/codex -count=1
TestCatalogTokenRenewalKeepsFiveMinuteRetry covers renewal followed by a failing refresh: no extra call after 1s, one call after 5 minutes.