Allow branch checkout after workspace threads are archived - #2069
Open
hemaaanth wants to merge 1 commit into
Open
Allow branch checkout after workspace threads are archived#2069hemaaanth wants to merge 1 commit into
hemaaanth wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The physical-workspace checkout guard treated every non-deleted
idlethread as a live workspace user, even after the thread was archived. Because archiving preservesidlestatus, 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
live-threadrefusal 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./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