Skip to content

Add bb cloud AI: hosted titles and commit messages for signed-in accounts - #4254

Draft
SawyerHood wants to merge 1 commit into
bb/account-stack-4-client-thr_5npmg24byifrom
bb/account-stack-5-bb-ai-thr_5npmg24byi
Draft

SawyerHood wants to merge 1 commit into
bb/account-stack-4-client-thr_5npmg24byifrom
bb/account-stack-5-bb-ai-thr_5npmg24byi

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

#4232 reverted the bb-ai plugin (#4230) together with the rest of the bb account stack. Its code wasn't implicated in the 2026-09-24 outage.

What changed

#4230 re-landed with one change: complete() checks the opt-in again right before sending, so turning bb cloud off while the account check is still pending sends nothing (from SlopCop). The bb-ai plugin serves bb's thread title and commit message tasks through the bb-ai-gateway for bbs signed in to a bb account. It calls the gateway through bb-account.v1.fetch, so it never sees the credential.

How you verified

Rollout

Ships in a bb release, after:

Merge it with the client PR or after it; on its own it changes nothing for a bb that isn't signed in.

Watch: bb-ai-gateway request volume and 4xx/5xx, OpenRouter spend, and ai_usage_day rows. Titles and commit messages keep working for signed-out bbs through their existing services.

Rollback

Revert this PR (and ship a patch release if it was released). Users can also turn the plugin off in Settings → Plugins.

Stack: 4 of 4. Base: #4253.

AGENT GENERATED

🤖 Generated with Claude Code

@SawyerHood
SawyerHood added this pull request to stack #4255 September 24, 2026 04:37
@bb-slop-cop

bb-slop-cop Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · review

This PR adds hosted AI for thread titles and commit messages for signed-in BB accounts. I’m reviewing security, code quality, performance, and architectural duplication, and checking the available end-to-end verification.

AGENT GENERATED

const key = accountKey(account.account);
const until = exhaustedUntil(key);
if (until !== null) throw new Error(limitReachedMessage(until));
const response = await accountFetch(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — [P2] Recheck opt-in before sending the prompt

enabled is checked before await accountStatus(). If the user turns cloud AI off while that RPC is pending, this continuation still starts a new POST containing the prompt or diff after the disable operation succeeds. I reproduced this with the actual complete() function body and a deferred account-status response: disable first, release the response, then observe the POST with enabled === false.

Recheck enabled immediately before accountFetch, and add a regression test that holds account status pending while switching off. The current off-state tests only cover completions started after disabling.

AGENT GENERATED

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ccf52e8. complete() checks enabled again right before accountFetch. New test: the account-status response is held, setEnabled(false) runs, then the response is released. The completion now rejects with the off message and sends nothing; on the previous code it sent the POST.

AGENT GENERATED

@bb-slop-cop bb-slop-cop Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

This adds an optional cloud service that writes thread titles and commit messages using your BB account. It starts off, includes a disclosure and on/off switch, and shows usage and daily-limit status in Settings and the CLI.

I found one P2 issue: a generation request waiting on account status can still send its prompt or diff after the user switches cloud AI off. Inline finding and suggested regression test. A deterministic harness using the actual completion function reproduced the POST after disabling.

The parallel security, code-quality, and performance reviews found no additional actionable issues. The architecture scan found that this correctly reuses the existing AI service registry and account transport; no substantial duplicate implementation needs extracting.

Verification: all 23 plugin tests and the plugin typecheck passed through Turbo. An isolated dev server and daemon started successfully. Using BB Browser Automation, I verified the signed-out settings disclosure, off-by-default state, enabling, persistence across reload, and switching back off. Signed-in cloud generation and budget exhaustion were not exercised. The verification inventory check separately reports an unmapped browser CLI family, outside this change.

AGENT GENERATED

@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from f540d0a to 9b5e109 Compare September 24, 2026 04:49
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from 9b5e109 to ccf52e8 Compare September 24, 2026 04:53
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from ccf52e8 to b3d2191 Compare September 24, 2026 05:59
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch 2 times, most recently from 6e3d6f3 to 8278744 Compare September 24, 2026 19:28
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from 8278744 to c42f8fc Compare September 24, 2026 21:04
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from c42f8fc to 9477749 Compare September 24, 2026 21:52
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from 9477749 to 363e931 Compare September 24, 2026 22:49
@SawyerHood
SawyerHood removed this pull request from stack #4255 September 24, 2026 22:49
@SawyerHood
SawyerHood added this pull request to stack #4306 September 24, 2026 22:50
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from 363e931 to 127abca Compare September 24, 2026 23:19
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from 127abca to 7516c81 Compare September 24, 2026 23:28
…unts

Re-lands #4230: the bb-ai plugin serves bb's title, branch
name and commit message tasks through the bb-ai-gateway, for bbs signed
in to a bb account. It calls the gateway through bb-account.v1.fetch, so
it never sees the credential.

One change from #4230: it checks the opt-in again right before sending,
so turning bb cloud off while the account check is still pending sends
nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@SawyerHood
SawyerHood force-pushed the bb/account-stack-5-bb-ai-thr_5npmg24byi branch from 7516c81 to 152c87f Compare September 25, 2026 02:51

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant