Skip to content

Allow branch checkout after workspace threads are archived - #2069

Open
hemaaanth wants to merge 1 commit into
get-bb:mainfrom
hemaaanth:fix/archived-thread-checkout
Open

Allow branch checkout after workspace threads are archived#2069
hemaaanth wants to merge 1 commit into
get-bb:mainfrom
hemaaanth:fix/archived-thread-checkout

Conversation

@hemaaanth

Copy link
Copy Markdown
Contributor

What was wrong

The physical-workspace checkout guard treated every non-deleted idle thread as a live workspace user, even after the thread was archived. Because archiving preserves idle status, a project could archive all of its threads and still be unable to create a new branch-backed thread in that workspace.

What changed

The host-path query now applies the existing live-thread predicate, which excludes archived rows, while retaining the nonterminal-status check that protects workspaces used by unarchived threads. Focused coverage reproduces the archived-idle case without weakening the active-thread safety assertion.

How you verified

  • Added a regression test that failed before the fix with the live-thread refusal and passed afterward.
  • pnpm --filter @bb/server test -- test/threads/workspace-path-claims.test.ts — 5 tests passed.
  • pnpm --filter @bb/db typecheck — passed.
  • pnpm --filter @bb/server typecheck — passed.
  • pnpm exec prettier --check apps/server/test/threads/workspace-path-claims.test.ts packages/db/src/data/threads.ts — passed.
  • Independent correctness and testing reviews reported no findings; review receipt: /tmp/compound-engineering-1000/ce-code-review/20260820-163002-7462223f/review.json.

Post-Deploy Monitoring & Validation

No additional dashboard or metric is required for this localized guard correction. During the first release validation window, search support reports and server logs for Cannot checkout branch while another thread is using this workspace. Healthy behavior is successful branch-backed thread creation after all workspace threads are archived, while an unarchived active thread still produces the refusal. Repeated refusals with no unarchived holder, or a checkout that proceeds while an active holder exists, should trigger rollback of this commit. Owner: bb maintainer handling the release.

Fixes #2068


Compound Engineering

AGENT GENERATED: by GPT-5.6 Sol

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.

Archived idle threads block branch checkout after the workspace is released

1 participant