Repository navigation
Conversation
ymichael
deleted the
bb/ci-flake-fix-account-pool-short-hold-affinity-thr_9gskvkmehh
branch
September 8, 2026 19:58
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.
Human comments
What was wrong
A pinned request that received a short per-minute 429 waited independently from another request for the same session. The second request could finish its remaining hold timer while the wall clock still reported the account as held; because routing tracked only that it had waited once, it returned 429 without making its permitted retry. This produced the four-attempt sequence seen in current-main CI and again in an unrelated PR run.
What changed
Account Pool now records the active per-account pacing flight with its exact hold deadline. Requests that arrive during that hold join the same completion promise and then make their one permitted retry. A completed successful flight remains observable until the wall deadline expires, while a renewed or failed attempt releases it so repeated hold extensions stay bounded. Hub restart also clears the in-memory flights.
The regression keeps the original 250 ms hold and pins the clock one millisecond before the deadline, proving the concurrent request follows the pacing completion event instead of returning a clock-bound 429. No hold duration, retry budget, timeout, wire contract, CLI, or public API changed. The separate 4096-session LRU timeout is not part of this change.
How you verified
expected 429 to be 200.pnpm exec turbo run test --filter=bb-plugin-account-pool --concurrency=1 -- --maxWorkers=1 --no-file-parallelism— 9 files and 253 tests passed.pnpm exec turbo run typecheck --filter=bb-plugin-account-pool --concurrency=1— 4 Turbo tasks passed.pnpm exec turbo run build --filter=bb-plugin-account-pool --concurrency=1— the two generated prerequisites passed; this source plugin has no package build script.pnpm exec oxfmt --check plugins/account-pool/src/hub.ts plugins/account-pool/src/server.test.tsandgit diff --checkpassed.