Skip to content

Reuse non-git parent environments for child threads - #3176

Closed
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-3175
Closed

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-3175

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

Child-thread environment defaulting received only the parent thread record, so it could not distinguish a parent running directly in a non-git folder from one using a Git checkout. It therefore selected managed-worktree provisioning for every live parent. Separately, repository-directory basename validation accepted only ASCII letters and digits. The verified reproduction and root-cause report is https://get-bb.github.io/reports/issues/3175.html.

What changed

The server now supplies the parent's persisted environment to the internal default policy and reuses it only when the thread, environment, project, and host match and the workspace is unmanaged and non-git. Git parents and mismatched environments retain the managed-worktree default. Repository-directory validation now accepts Unicode letters, numbers, and combining marks while retaining the existing traversal, whitespace, and leading-dash protections. There are no wire, CLI, SDK, schema, dependency, migration, or generated-file changes.

How you verified

  • Added a focused regression test first. On unchanged trusted origin/main, it failed 3/3: the service created a different environment, policy selected managed-worktree, and the Unicode basename was rejected.
  • After the fix, the focused test passed 9/9, including five negative policy guards.
  • Relevant server tests passed 86/86 across the focused regression, thread-default policy, worktree paths, project defaults, and seed-without-run creation suites.
  • pnpm exec turbo run typecheck --filter=@bb/server passed.
  • Formatting and git diff --check passed.
  • git diff --numstat origin/main reports 194 total changed text lines across 4 files and no binary changes.

Fixes #3175

AGENT GENERATED

@SawyerHood

Copy link
Copy Markdown
Collaborator

Closing this implementation because the environment-provider rewrite replaced the infrastructure it targets. The non-Git parent/child environment selection problem in #3175 remains relevant and needs a fix against the current architecture. This closure does not mark the underlying issue as fixed.

Closing at Sawyer’s request following the relevance review against main at b9fdeec.

AGENT GENERATED

@SawyerHood SawyerHood closed this Sep 14, 2026
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.

Child thread of a parent in a plain (non-git) folder cannot be provisioned

1 participant