Skip to content

Add experimental server migration between machines - #3783

Merged
SawyerHood merged 1 commit into
mainfrom
bb/make-machines-use-proper-english-thr_tu3jfpi3hi
Sep 16, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/make-machines-use-proper-english-thr_tu3jfpi3hi

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The machine running the bb server could not hand that role to another enrolled machine. Moving from a laptop to an always-on machine required a manual migration, and the Machines screen did not clearly explain where shared thread history and settings live.

What changed

  • Add Move server here behind the default-off serverMove experiment, with a preflight checklist, progress overlay, cancellation and recovery, automatic reconnection, and old-server-copy cleanup.
  • Transfer server-owned data and plugin state while preserving machine identities and leaving repositories, workspaces, and provider sessions on their owning machines. Support both bb connect and direct addresses.
  • Stop running work and pause schedules before taking the snapshot; fence writes, verify archive downloads, journal imports, reconcile interrupted moves, and retain the old server in recovery when takeover cannot be confirmed. Hold bb connect on manually imported stores until explicitly enabled.
  • Add CLI and SDK surfaces for move checks/start/status/cancel, export/import, and old-copy recovery. Update the CLI guide, configuration documentation, and API audit entries.
  • Add daemon, launcher, desktop, and mobile handling for the server handoff. Increment HOST_DAEMON_PROTOCOL_VERSION from 210 to 211.
  • Clarify server roles in Machines, put the connection explanation in an information notice, simplify move messaging, and prevent row-menu actions from navigating to the machine page.

How you verified

  • After rebasing onto main: 354 migration and lifecycle tests passed, plus 42 daemon-contract tests and seven wake-policy tests. Typechecks passed for app, CLI, server, host daemon, SDK, and daemon contract. Migration RPCs explicitly preserve the new no-incidental-wake policy.

  • Latest UI and copy changes: 53 tests passed across MachinesSettingsSection, MoveServerDialog, ServerMoveOverlay, and the server move checklist, run through Turbo with @bb/app and @bb/server filters. The app build passed. Checked the information-notice layout in Chromium at desktop and 390px widths.

  • Earlier branch verification included packaged A → B → A transfers on one Linux host, cancellation and process-interruption cases, database row-count comparisons, and attachment SHA-256 checks with approximately 161 MB of test attachments.

  • Prepared two Ubuntu VMs with systemd services, paired the source with a separate bb connect endpoint, and enrolled the target through it. Seeded 1,202 threads and 402,182 events into a 498 MB database, retaining 161 MB of attachments. Integrity and foreign-key checks passed, a seeded timeline loaded, both machines connected, and move preflight passed.

  • The large-fixture migration through production bb connect completed between the Ubuntu VMs. Verified the new server role, both machines connected, matching content hashes for 1,202 threads, 402,182 events, 14 projects and the queued message, and matching hashes for all eight attachments (160 MiB). Database integrity and foreign-key checks passed; a migrated timeline and the public version endpoint responded successfully. Reboot persistence, native desktop/mobile reconnection, and launchd handoff still need manual verification.

Known gaps: no UI recovery command for direct-address machines that remain offline and cannot reach the old server; uninstall protection for the provider plugin managing the server machine is not implemented. Export/import are CLI and SDK only. Direct HTTP transfers are unencrypted and the checklist warns about this.

AGENT GENERATED

@SawyerHood
SawyerHood force-pushed the bb/make-machines-use-proper-english-thr_tu3jfpi3hi branch from 3215087 to 75c2f29 Compare September 16, 2026 17:11
@SawyerHood
SawyerHood merged commit 40ec794 into main Sep 16, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the bb/make-machines-use-proper-english-thr_tu3jfpi3hi branch September 16, 2026 17:18
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