-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix(auth): preserve refreshed quota observations #5824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,7 @@ func MergeRefreshedAuth(base, current, updated *Auth) *Auth { | |
| if base != nil && current.RegistrationEpoch != base.RegistrationEpoch { | ||
| return merged | ||
| } | ||
| merged.Quota = mergeQuotaObservation(current.Quota, updated.Quota) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a subsequent Devin status response omits an optional value such as Useful? React with 👍 / 👎.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in |
||
|
|
||
| // 1. Refresh Lifecycle Timestamps | ||
| if !updated.LastRefreshedAt.IsZero() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the current credential has an active
credential_quotacooldown, the normalUpdateRefreshedAuthpath subsequently executesauth.Quota = existing.QuotainManager.updateInternal, overwriting the observation merged here. Consequently, a successful Devin refresh during that cooldown still discards its new plan and remaining-quota signals before persistence or the management UI can see them; the added test only calls this helper directly and misses the overwrite. Preserve only the existing cooldown fields at that later merge, or reapply the refreshed observation afterward.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in
5ae3e63f. The regression now exercisesRegister→ a concurrent credential-quota cooldown →UpdateRefreshedAuth, so it covers the laterManager.updateInternalmerge. Refresh mode now applies only the existing cooldown fields to the newly merged quota observation; replace and prepare behavior remains unchanged. The affected package tests,go vet, and server build pass.