Repository navigation
fix(scheduling): release concurrency slots on account hydration errors - #73
Open
xiaoguai1818 wants to merge 1 commit into
Open
xiaoguai1818 wants to merge 1 commit into
xiaoguai1818 wants to merge 1 commit into
Conversation
xiaoguai1818
marked this pull request as ready for review
November 17, 2026 08:44
Author
|
Final commit |
xiaoguai1818
pushed a commit
to xiaoguai1818/sub2api
that referenced
this pull request
Nov 21, 2026
Record fork Actions HTTP 422 despite enabled API status, pending required CI/Security Scan, and overlapping existing lite PRs CherryLover#73-CherryLover#81. Do not claim the single consolidated PR is review-ready until the final SHA checks can actually run.
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.
Problem
When the Anthropic/Gemini scheduler acquires a concurrency slot and subsequent account hydration fails,
newSelectionResultreturns an error without a release callback, leaving the Redis slot occupied until TTL expiry.Fix
Release the acquired slot before returning a hydration error. Successful hydration preserves the release callback for the caller.
Upstream
Selective backport of Wei-Shaw#8631 (commit 4ac713c); limited to the lite scheduling path and regression tests.
Local validation
go test -tags=unit ./internal/service -run TestGatewayServiceNewSelectionResult -count=10— passed.go build ./internal/service— passed.git diff --check— passed.CI status
Draft pending GitHub target-repository CI and Security Scan for commit 66a6ba5. No merge, deployment, or release requested.