Repository navigation
fix(scheduler): recover snapshot accounts after cooldown expiry - #8729
Merged
Wei-Shaw merged 2 commits intoNov 16, 2026
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #8709.
An account cooling down when a bucket is built is omitted until the next full rebuild, even after the block expires. Snapshot membership now uses the existing configured-account query; both cache hits and DB fallback apply
Account.IsSchedulablewhen returning candidates. Rate-limit, overload and temporary-unschedulable expiry can therefore recover without a DB write, outbox event or rebuild.The regression crosses each cooldown with virtual time and checks expiry revocation and manual/disabled accounts. PostgreSQL/Redis integration coverage exercises 18 combinations of platform, simple/group/ungrouped scope and forced/mixed routing, including deleted accounts and mixed-scheduling opt-in. Existing retirement/epoch tests use the configured-pool source.
Validation:
go test -p=2 -tags=unit ./...: passed.golangci-lintv2.14.0: 0 issues.go test -p=2 -tags=integration -overlay <local-bootstrap.json> ./...: passed. The repository TestMain bootstrap used a fresh UTC PostgreSQL 16.15 database and Redis 8.10.2 in place of Docker; production code and test assertions were unmodified. All 18 new cases ran. Both suite runs retained their environment-gated skips.AI-assisted implementation and local verification; no live provider or deployed gateway was used.