Add bb cloud AI: hosted titles and commit messages for signed-in accounts - #4254
SawyerHood wants to merge 1 commit into
Conversation
|
🚨 SLOP COP 🚨 · 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.
|
| const key = accountKey(account.account); | ||
| const until = exhaustedUntil(key); | ||
| if (until !== null) throw new Error(limitReachedMessage(until)); | ||
| const response = await accountFetch( |
There was a problem hiding this comment.
🚨 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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
🚨 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
f540d0a to
9b5e109
Compare
9b5e109 to
ccf52e8
Compare
ccf52e8 to
b3d2191
Compare
6e3d6f3 to
8278744
Compare
8278744 to
c42f8fc
Compare
c42f8fc to
9477749
Compare
9477749 to
363e931
Compare
363e931 to
127abca
Compare
127abca to
7516c81
Compare
…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>
7516c81 to
152c87f
Compare
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 throughbb-account.v1.fetch, so it never sees the credential.How you verified
pnpm exec turbo run typecheck --filter="...[HEAD^1]"andtest --filter="[HEAD^1]"on this layer: pass.vibecodethis.site, 2026-09-25,mainwith Ride bb connect through tunnel resets instead of failing visitors #4313, Add the bb-ai-gateway worker #4252's gateway and Add the bb account plugin and move connect onto it, safe to roll back #4253's client on one data dir):bb ai on, thenbb settings ai-services set thread-title bband… commit-message bb;bb settings ai-services test thread-title→bb cloud (576ms): Add dark mode toggle to settings page;… test commit-message→bb cloud (586ms): feat(settings): add DarkModeToggle component and persist theme in …;bb ai status→Ready,Usage: <$0.01 of $0.50 today;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_dayrows. 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.
🤖 Generated with Claude Code