Repository navigation
provider: an account refused for quota has its allowance read again a… - #1071
Open
TryWorld2026 wants to merge 1 commit into
Open
TryWorld2026 wants to merge 1 commit into
TryWorld2026 wants to merge 1 commit into
Conversation
…t once, instead of the share it last said being trusted for a minute
StaleAllowance only dropped the account out of loginUsageCache and zeroed
when its allowances were last read, and left the reading itself where it
was: Allowances answered the share the vendor last said, and a reading
asked before the refusal came back and was trusted for the minute after.
The menu bar's "account in use" and the routing trace kept showing an
account the vendor had just refused for its quota.
It now goes through forgetAllowance, as a renewal does: the account leaves
the allowances last read until the next reading, and a reading begun
before the refusal is dropped rather than kept when it comes back.
TestStaleAllowanceForgetsTheReading fails without the change ("still read
as [{12 ...}]") and passes with it; the held reading is asked again and
answered with the account used up. go test ./internal/provider (the full
package), go vet, gofmt and the GOOS=windows/darwin/linux builds pass.
TryWorld2026
force-pushed
the
fix/stale-allowance-forgets-entry
branch
from
October 7, 2026 00:59
abe0758 to
97e6fec
Compare
This branch has not been deployed
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.
provider: an account refused for quota has its allowance read again at once, instead of the share it last said being trusted for a minute
What is wrong
StaleAllowancedropped the account out ofloginUsageCacheand zeroed whenits allowances were last read, and left the reading itself where it was. So
right after the vendor refused an account for its quota:
Allowances()answered the share the vendor had last said, andfigure was trusted for the minute after.
The menu bar's "account in use" and the routing trace kept showing an account
the vendor had just refused for its quota.
What changed
StaleAllowancenow goes throughforgetAllowance, the same helper a renewaluses: the account leaves the set of allowances last read (so the next read
fetches), and a reading in flight is dropped rather than kept when it returns.
The change is only the two lines that hand-wrote
usedCache.at[agent] = time.Time{}; the guard, the log line and the entry's shape are as they were.Semantic change (Providers and accounts)
which
Allowances()and the routing trace answered with for up to a minute.Allowances()reads the accountagain and the routing sees what the vendor just said.
docs/subsystems/providers-accounts.md;implementation
StaleAllowanceininternal/provider/routing.go.Verification
TestStaleAllowanceForgetsTheReadingfails without the change(
still read as [{12 ...}]) and passes with it: the held reading is askedagain and answered with the account used up.
go test -tags nogui ./internal/provider(the full package),go vet,gofmt on LF-normalized copies of the changed files (the worktree is CRLF),
and the
GOOS=windows/darwin/linuxbuilds.