Skip to content

Resolve server-move source access before freezing writes - #4838

Merged
SawyerHood merged 2 commits into
mainfrom
slopcop/issue-4837
Oct 5, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
slopcop/issue-4837

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The server-move coordinator freezes public writes before obtaining the source host's Connect grant. Grant acquisition can require a POST to the account plugin, which the existing freeze middleware rejects with HTTP 503. The move then fails before handoff. Reproduced on trusted main in two clean checkouts: https://get-bb.github.io/reports/issues/4837.html

What changed

Resolve the source grant before freezing writes, honoring cancellation before entering the frozen stage. Keep the existing freeze exemptions, schedule pausing, stop-work, plugin suspension, and handoff behavior. Extend the existing Connect coordinator test to exercise account RPC availability through the real freeze middleware and a migrated SQLite database. No public protocol, authorization, dependency, or stored-data changes.

How you verified

  • Added the regression before changing production code. On unchanged main, it fails with account RPC status [503] instead of [200]; the same failure repeats in a second clean checkout.

  • After the fix, pnpm exec turbo run test --filter=@bb/server -- test/server-move/coordinator.test.ts -t 'source grant requires' passes.

  • pnpm exec turbo run test --filter=@bb/server -- test/server-move: 97 tests pass across 16 files, including cancellation, recovery, write fences, and handoff.

  • pnpm exec turbo run typecheck --filter=@bb/server, the configured formatter check, and git diff --check pass.

  • Changed-line count against origin/main: 55 text lines (42 additions + 13 deletions), 2 files, no binary changes, one existing subsystem.

  • Scope: coordinator/HTTP-boundary regression; no live authenticated cloud or macOS desktop run.

  • Review follow-up: the regression's freeze middleware now reads coordinator.isFrozen(), the same predicate the production /api/v1/* freeze gate uses, instead of the SQLite freeze flag. Against the unfixed coordinator it still fails with [503] instead of [200], and after the fix it passes: 24 coordinator tests pass and 97 server-move tests pass across 16 files, with lint/typecheck for @bb/server green.

Fixes #4837

AGENT GENERATED

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SawyerHood
SawyerHood merged commit 055c15d into main Oct 5, 2026
34 checks passed
@SawyerHood
SawyerHood deleted the slopcop/issue-4837 branch October 5, 2026 18:49
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.

Server move (connect mode) always fails at "Stop running work" on 0.45.0: freeze blocks the bb-account RPC needed for the source host's grant

1 participant