Skip to content

Remove multi-host execution; rename experiment to bb connect - #536

Merged
SawyerHood merged 1 commit into
mainfrom
bb/remove-multi-host-execution-gpt-5-5-impl-thr_wh6ffvmzeg
Jul 8, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/remove-multi-host-execution-gpt-5-5-impl-thr_wh6ffvmzeg

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

PR #510 shipped two separable things: multi-host thread execution and bb connect. Multi-host isn't ready for prime time yet — this removes it from main while keeping every bb connect feature, and renames the gating experiment from "Multi-machine" to "bb connect" so it gates only the connect surfaces.

Multi-host execution removed (host targeting back to pre-#510, primary-only)

  • Restored assertPrimaryHostId (non-primary → 400 unsupported_host); deleted assertUsableHostId, the multi_machine_disabled error, and its experiment dependency. Reverted all call sites: routes/files.ts, routes/hosts.ts, routes/projects.ts, services/system/host-lookup.ts, services/threads/thread-request-eligibility.ts (restores the StableThreadRequestProjectData machinery), services/terminals/terminal-session-lifecycle.ts (gate + config dep, incl. the integration-harness change).
  • Deleted bb host list and bb thread spawn --host (commands, registration, tests, guide/skill/docs mentions).
  • Removed the multi-host section from docs and guide templates; deleted docs/m4-multimachine-evolution-overview.html.

Experiment renamed: multiMachine → bbConnect ("bb connect")

  • Domain schema, db data access, column rename via generated migration 0057_useful_manta.sql (RENAME COLUMN multi_machine → bb_connect — existing opt-ins carry over).
  • All consumers: server.ts isConnectEnabled, plugin-service gate + user-facing strings, routes/system.ts reconcile, CLI plugin-proxy fallback (string contract kept in sync), Settings UI, builtin skills, guide templates (regenerated), docs/configuration.md.

Untouched

plugins/connect, apps/connect, apps/web, packages/tunnel-contract, packages/connect-db, deploy workflows — verified byte-for-byte identical. The live plugin load/unload on experiment toggle from #533 keeps working under the new name.

Validation

  • Typecheck: server, cli, db, app, domain, templates, desktop — all pass
  • Tests: server (983), app (1282), cli (231), db (320), domain, templates, bb-plugin-connect, integration (54) — all pass
  • Independently reviewed (adversarial pass): diffed result against pre-bb connect: multi-host execution, cloud tunnel, getbb.app site + prod staging #510 file states (only legitimate upstream drift remains), verified generated templates reproduce, migration/journal chain drizzle-generated, grep sweep clean outside plans/ and historical migration artifacts
  • Desktop unit tests couldn't run in the worktree (broken local Electron install, unrelated); desktop typecheck passes — CI covers it here

🤖 Generated with Claude Code

@SawyerHood
SawyerHood merged commit 755fb56 into main Jul 8, 2026
6 checks passed
@SawyerHood
SawyerHood deleted the bb/remove-multi-host-execution-gpt-5-5-impl-thr_wh6ffvmzeg branch July 8, 2026 05:52
SawyerHood added a commit that referenced this pull request Jul 12, 2026
## Summary

bb becomes honestly multi-machine: the server orchestrates daemons on
any number of computers, gated behind a new **Multi-machine** experiment
(independent of bb connect). Product plan + mockups + status:
`plans/multi-machine-v1.html`.

- **Pick where work happens**: the composer's environment picker groups
options by machine (status dots, "this machine" badge, offline w/
last-seen); projectless threads get a machine chip too. Sticky last-used
per project.
- **Machine-independent projects**: a project anchors to its git remote;
each machine holds a source (checkout). Guided setup clones onto a new
machine in one dialog (or points at an existing folder); non-git
projects link manually.
- **Machines management**: Settings → Machines (rename, remove w/
revocation, live status) + Add-a-machine dialog minting a 15-min join
code with a copyable one-liner.
- **One-command install**: `curl -fsSL <server>/install.sh | sh -s --
--join-code … --host-id … --server …` — installs bb-app, joins,
registers launchd/systemd service. Works over LAN or through bb connect
(daemon `x-bb-connect-machine` credential wiring, gate `/api/v1` machine
access, defense-in-depth preserved).
- **Server-distributed updates**: the server serves its own bb-app
tarball (`/install/bb-app.tgz`); installs prefer it over npm
(unpublished versions work by construction) and daemons self-update on
protocol mismatch (newer-server-only, rate-limited, downgrade-refusing)
with a "Needs update" state in the UI.
- **Remote-correct execution**: injected skills sync via
content-addressed pull (byte-identical staging verified); workspace
`AGENTS.md` + project skills read via daemon RPC — fixes the silent
instruction/skill loss that sank the earlier multi-host attempt
(#510/#536).
- **CLI**: `bb machine list`, `--machine` on `thread spawn` / `project
source add` (+ clone variant), guide/skill/docs updated.

Also fixes two pre-existing bugs found along the way: enroll keys lived
~10.4 days instead of 15 minutes (better-auth `defaultExpiresIn` is
seconds), and join-code minting left phantom "pending" host rows.

## Verification

Every step was live-verified on a two-daemon rig (second daemon with
fresh identity/data dir) including browser QA of the picker, guided
setup (success + `target_not_empty` error paths), Machines pane,
add-machine dialog, and a projectless thread on the second machine.
Capstone: one CLI command provisioned a managed worktree on the second
machine and the agent answered from planted workspace instructions. Full
repo typecheck green; all package suites green. The bb connect machine
path is covered by a full workerd auth-matrix (cross-tenant 403s, header
stripping, revocation) — a real staging tunnel run remains (needs
staging gate/web deploys).

Migrations are consolidated into a single generated `0064` (dev data
dirs that applied interim migrations need a reset).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <[email protected]>
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