Discover plugin RPC contracts and move usage displays into Provider Usage - #3449
Merged
ymichael merged 53 commits intoSep 14, 2026
Merged
Conversation
ymichael
added a commit
that referenced
this pull request
Sep 11, 2026
## Human comments ## What was wrong The Provider Usage footer coverage put plugin import/registration, the content-script preload and focus listener lifecycle, disclosure rendering, two Radix machine-menu sessions, provider mouse and keyboard navigation, disconnected state, dismiss, manual refresh, and disposal inside one asynchronous test with the default 5-second budget. Package-shard concurrency and Vitest worker oversubscription made that serial UI sequence slow enough to expose the test architecture: the unchanged test reproduced at 6.610 seconds under bounded Intel contention and timed out at 5 seconds. The CI failure was therefore not a deterministic regression in PR #3449, and scheduler contention was the trigger rather than the root cause. ## What changed `plugins/provider-usage/app.test.tsx` now loads and captures the plugin registration once outside test clocks, reuses one response fixture, and divides coverage into registration, content-script focus refresh, disconnected/manual refresh, and connected machine/provider interaction scenarios. Content-script disposal is protected by `finally`. The disconnected case starts from the active Intel machine, removing a second Radix menu lifecycle while the connected case still proves all machines are aggregated and exercises machine selection plus provider mouse and keyboard navigation. No assertions were disabled, no timeout was increased, and there are no wire, CLI, or documentation changes. ## How you verified - Before: on enrolled Intel host `host_nwqfteeqz4`, a warmed run with 12 bounded CPU competitors reproduced the exact failure: 6.610 seconds and `Test timed out in 5000ms`. - After: the same 12-worker warmed stress passed all four scenarios; the slowest scenario was 833 ms. - After: five fresh focused iterations under 12 CPU competitors passed 20/20 scenario executions; the slowest scenario was 1.202 seconds. - `pnpm exec turbo run test --filter=bb-plugin-provider-usage` — 3 files and 7 tests passed. - `pnpm exec turbo run typecheck --filter=bb-plugin-provider-usage` — passed. - `pnpm exec turbo run build --filter=bb-plugin-provider-usage` — passed the package's available upstream generator tasks; this package has no build script. - `bb plugin build` from `plugins/provider-usage` — emitted validated server and app bundles. - Every test/build/load command ran in a bounded process group; teardown and the final process scan found no surviving Vitest, Turbo, plugin-build, or load workers. > AGENT GENERATED
ymichael
force-pushed
the
bb/improve-plugin-surface-compatibility-thr_2iguhd9c6n
branch
from
September 11, 2026 20:50
14869a0 to
7874efb
Compare
ymichael
marked this pull request as ready for review
September 11, 2026 20:55
ymichael
force-pushed
the
bb/improve-plugin-surface-compatibility-thr_2iguhd9c6n
branch
2 times, most recently
from
September 12, 2026 04:03
2114294 to
13f98a1
Compare
ymichael
force-pushed
the
bb/improve-plugin-surface-compatibility-thr_2iguhd9c6n
branch
2 times, most recently
from
September 14, 2026 16:58
bf5e432 to
a027665
Compare
ymichael
force-pushed
the
bb/improve-plugin-surface-compatibility-thr_2iguhd9c6n
branch
from
September 14, 2026 17:22
981086a to
7b6ca66
Compare
ymichael
deleted the
bb/improve-plugin-surface-compatibility-thr_2iguhd9c6n
branch
September 14, 2026 20:22
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
Plugins could call schema-validated RPC methods but could not discover implementations or inspect their contracts. Usage displays had no common resource model for pooled and machine-local accounts, targeted fetching, or deduplicating known accounts. Usage settings lived in core instead of the display plugin.
What changed
experimental_discoverable, registration/method descriptions, JSON Schemas, and SDK discovery. CLI supportsrpc list [plugin-id],rpc inspect <plugin-id> [method], andrpc call. Discovery advertises live registrations; it does not change authorization or negotiate versions. SDK minimum is0.4.87.provider-usage.v1.listResources(cheap inventory) andprovider-usage.v1.getResource(actual usage for one resource, with optional cache reuse throughrefresh: false). Account Pooler, Codex, Claude Code, and ACP explicitly implement copied contracts. No shared schema package or core adapter is introduced./settings/usageredirect. Existing enable/disable choices remain intact. Settings and footer share aggregation/cache; settings fetches the selected location and the footer fetches its selected provider tab. Each settings account uses the same provider icon/header, email and plan-tag layout.How you verified
pnpm start:worktree.cgWindowNotFound; no Safari pass is claimed.Preview: https://ymichael-latest--25451.getbb.app/settings/plugins/provider-usage