Skip to content

Allow usage refreshes while pooled accounts are streaming - #7419

Closed
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-7418
Closed

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-7418

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

Account Pooler returned early from usage refresh whenever an account had an active request. This also skipped forced refreshes, so authoritative usage could not remove obsolete quota windows during sustained streaming. Partial response headers legitimately preserve previously observed windows and therefore cannot repair this state by themselves.

Report: https://get-bb.github.io/reports/issues/7418.html — REPRODUCED, high root-cause confidence, repeated by the same agent in two clean checkouts of trusted main at 365d7c5237ae270be0555b5b44ea61020252713e.

What changed

  • Remove the busy-account early return from the existing usage refresh path.
  • Preserve refresh single-flight, refresh intervals, credential refresh serialization, and partial-header merge semantics.
  • Add a real-plugin CLI regression that holds a response open and verifies authoritative refresh removes an obsolete primary window without interrupting the stream.
  • Two files; 93 additions + 1 deletion = 94 changed text lines, counted with git diff --numstat origin/main. No dependency, generated, stored-data, public protocol, or CLI contract changes.

How you verified

  • The new streaming regression fails on unchanged production code in two separate trusted checkouts: CLI refresh succeeds but leaves the obsolete primary window intact. It passes after the fix.
  • Focused command: pnpm exec turbo run test --filter=bb-plugin-account-pool -- src/server.test.ts -t 'refreshes usage and drops obsolete windows while an account is streaming'.
  • pnpm exec turbo run test lint typecheck --filter=bb-plugin-account-pool: 395 tests pass across 14 files, typecheck passes, lint has no errors and three pre-existing warnings.
  • Full trusted-base build passes after building the existing Plugin SDK first; git diff --check passes; no binary changes.
  • No live provider account, production storage, or browser rendering was used. Provider responses are synthetic; real plugin routing, refresh, parsing, and streaming lifecycle execute.

Fixes #7418

AGENT GENERATED

@github-actions

Copy link
Copy Markdown
Contributor

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant